sub CompareWord {
my( $doc1, $doc2, $outfile) = @_;
require Win32::OLE;
$Win32::OLE::Warn = 3; # die on errors...
my $Word = Win32::OLE->GetActiveObject('Word.Application')
|| Win32::OLE->new('Word.Application', 'Quit');
my $WordFile = $Word->Documents->Open($doc1);
$Word->{Visible} = 0;
$WordFile->Compare( $doc2 );
$Word->WordBasic->FileSaveAs( $outfile);
$WordFile->Close();
undef $WordFile;
undef $Word;
}
That is a bit like saying what is the use of diff(1) when you can just use checksums. Checksums only indicate change, they do not quantify it.
cheers
tachyon
perlmonks.org content © perlmonks.org and StrifeChild, tachyon
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03