use strict;
use Win32::OLE::Const 'Microsoft Word';
use Tk;
#### my $mw = MainWindow->new;
my $file = "c:\\TEMP\\test.doc";
my $Word = Win32::OLE->new('Word.Application', 'Quit');
$Word->Documents->Open($file) || die("Unable to open document", Win32::OLE->LastError());
my $last_printer=$Word->{ActivePrinter};
$Word->{ActivePrinter} ='PS2FILE';
$Word->ActiveDocument->PrintOut({
Background => 0,
Append => 0,
Range => wdPrintAllDocument,
Item => wdPrintDocumentContent,
Copies => 1,
PageType => wdPrintAllPages,
});
$Word->{ActivePrinter} = $last_printer;
### MainLoop;
####
use strict;
use Win32::OLE::Const 'Microsoft Word';
use Tk;
my $mw = MainWindow->new;
my $file = "c:\\TEMP\\test.doc";
my $Word = Win32::OLE->new('Word.Application', 'Quit');
$Word->Documents->Open($file) || die("Unable to open document", Win32::OLE->LastError());
my $last_printer=$Word->{ActivePrinter};
$Word->{ActivePrinter} ='PS2FILE';
$Word->ActiveDocument->PrintOut({
Background => 0,
Append => 0,
Range => wdPrintAllDocument,
Item => wdPrintDocumentContent,
Copies => 1,
PageType => wdPrintAllPages,
});
$Word->{ActivePrinter} = $last_printer;
MainLoop;
####
-----------------------------------
--the good, the bad and the physi--
-----------------------------------