Can anybody tell me, why this script freezes after 70 iterations of the
outer loop?


use Win32::OLE qw(in with);
use Win32::OLE::Const 'Microsoft Word';

my $appWD=Win32::OLE->new('Word.Application', 'Quit')
        or die "Oops, cannot start Word";
$counter=0;
while(1) {
  {
    my $aktDoc=$appWD->Documents->Open("Test.doc")
         or die "Cannot open WordDoc\n";
    foreach my $aktPara (in $aktDoc->Paragraphs)
    {
      foreach my $aktWort (in $aktPara->Range->Words)
      {
        # do nothing}
    }
    $aktDoc->Close;
    $counter++;
    print "$counter\n";
  }
}


---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to