Hi Everyone,
I am having a problem printing my report
within the script that's creating the report.
Here's my code:
if (eof ERROR_RPT) {
close (ERROR_RPT);
use Win32::OLE;
use Win32::OLE::Const 'Microsoft Word';
my $Word = Win32::OLE->new('Word.Application', 'Quit');
$Word->{'Visible'} = 1; # if you
want to see what's going on
$Word->Documents->Open("f:\\systemerrors1.txt");
$Word->ActiveDocument->PrintOut({
Background => 0,
Append => 0,
Range => wdPrintAllDocument,
Item => wdPrintDocumentContent,
Copies => 1,
PageType => wdPrintAllPages,
});
}
The script exits with a Error: Runtime exception.
Does anyone know why and what to do?
I can run this code manually outside of the script creating the report.
thanks in advance,
John
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs