harryC has asked for the wisdom of the Perl Monks concerning the following question:
now we want to move from office to openoffice (we like open source)use Win32::OLE; use Win32::OLE::Const 'Microsoft Word'; use Win32::OLE qw(in with); use Win32::OLE::Variant; sub wordprinterout{ my $filetoopen= shift @_; my $aantal= shift @_; #word open my $Word = Win32::OLE->new('Word.Application', 'Quit'); #$Word->{'Visible'} = 1; # if you want to see what's going on my $printer1 = $Word->{ActivePrinter}; $Word->Documents->Open("$filetoopen") or Carp::croak (print "unable to open document", Win32::OLE->LastError()); my $doc1 = $Word->{ActiveDocument}; $Word->ActiveDocument->PrintOut( Background => 0, Append => 0, Range => wdPrintAllDocument, Item => wdPrintDocumentContent, Copies => $aantal,<br/> PageType => wdPrintAllPages}); #$Word->ActiveDocument->PrintOut; unlink $filetoopen; }
2006-07-17 Retitled by Corion, as per Monastery guidelines
Original title: 'Openoffice'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Moving from MS Office OLE code to Openoffice for printing RTF documents
by gellyfish (Monsignor) on Jul 17, 2006 at 09:49 UTC | |
|
Re: Moving from MS Office OLE code to Openoffice for printing RTF documents
by Ieronim (Friar) on Jul 17, 2006 at 16:54 UTC | |
|