pankaj_it09 has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use Win32::OLE; use Win32::OLE::Enum; parseAndScanWord($filename); sub parseAndScanWord { my ($fileName) = @_; my $document = Win32::OLE -> GetObject($fileName) or return; my $paragraphs = $document->Paragraphs(); my $enumerate = new Win32::OLE::Enum($paragraphs); while(defined(my $paragraph = $enumerate->Next())) { $text = $paragraph->{Range}->{Text}; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Parsing MSWord File
by Corion (Patriarch) on Oct 02, 2008 at 12:41 UTC | |
| |
|
Re: Parsing MSWord File
by jplindstrom (Monsignor) on Oct 02, 2008 at 13:30 UTC | |
by pankaj_it09 (Scribe) on Oct 03, 2008 at 07:13 UTC | |
|
Re: Parsing MSWord File
by GrandFather (Saint) on Oct 06, 2008 at 23:56 UTC | |
by pankaj_it09 (Scribe) on Oct 07, 2008 at 05:47 UTC | |
by Corion (Patriarch) on Oct 12, 2008 at 07:22 UTC |