As I say, it's hokey but it seems to work for this specific case.$icount = $word->Documents->Count(); $done = 0; while ($done == 0) { if ($word->Documents) { if (($mycnt = $word->Documents->Count()) != $icount) { $done = 1; } } else { undef $word; $word = Win32::OLE->GetActiveObjectord.Application') || Win32::OLE->new('Word.Application'); $done = 1; } sleep 5; }
In reply to Re: Avoiding Win32::OLE errors
by esr
in thread Avoiding Win32::OLE errors
by esr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |