#!/usr/bin/perl -w # Uses use strict; use Win32::OLE; use Win32::OLE::Const; # Create MSWord object and load constants my $MSWord = Win32::OLE->new('Word.Application', 'Quit') or die "Could not load MS Word\n"; my $wd=Win32::OLE::Const->Load($MSWord); # Open document (full path) my $doc = $MSWord->Documents->Open('c:\full\path\to\document.doc'); # Ask word to print the contents of a field named "TheFieldIWant" print $doc->FormFields("TheFieldIWant")->Result,"\n"; # Close document (without save) $doc->Close({SaveChanges=>$wd->{wdDoNotSaveChanges}});
In reply to Re: Snarfing data from microsoft word
by t0mas
in thread Snarfing data from microsoft word
by Preceptor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |