From: Jonathan Paton <[EMAIL PROTECTED]> > > print "$fileName\n"; > > $doc->ActiveDocument->SaveAs({FileName => $fileName, > > FileFormat => wdFormatRTF}) > > 'Can't call method "SaveAs" on an undefined value'. > > That clearly means that "$doc->ActiveDocument" evaluates to be > undefined. I think you need: "$doc->ActiveDocument()->SaveAs", > those brackets telling perl it should be calling SaveAs on the value > returned by the ActiveDocument() method.
I think ActiveDocument is not a method, but a property. So the right syntax would be $doc->{ActiveDocument}->SaveAs(... Mark, you may need to play with the syntax a bit, Perl is in these parts more strict than VB(Script) and you do have to distunguish between methods and properties in Perl even on places where you could treat them the same in VB(Script). It may be helpful to use the OLE Viewer installed with ActivePerl and see what properties and methods do the object have. Jenda ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>