Click here to get back home

searching a "text" in a word document using perl

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
searching a "text" in a word document using perl Chakravarthy Bollapalli \(IFIN 01-28-2005
Posted by Chakravarthy Bollapalli \(IFIN on January 28, 2005, 3:39 pm
Please log in for more thread options
Hi,
I have a word document which has some 10+ pages. I need to search this
document for a particular key words.
I need information like section name, page number of all occurrences of
these key words using perl. It would be nice if any one could give me a
sample code that does this or some thing similar or even pointers on how to
do this.

TIA

warm regards,
kalyan




Posted by Nick Pomponio on January 29, 2005, 11:42 pm
Please log in for more thread options
"Chakravarthy Bollapalli (IFIN SCC AI)"
> Hi,
> I have a word document which has some 10+ pages. I need to search this
> document for a particular key words.
> I need information like section name, page number of all occurrences
of
> these key words using perl. It would be nice if any one could give me a
> sample code that does this or some thing similar or even pointers on how
to
> do this.

Ron Savage has some examples for using
OLE to extract text from a Word document
in the tutorials on his site:

http://savage.net.au/

Together with VBA Reference for Word, these
should get you started.

-Nick




Posted by Ron Savage on January 31, 2005, 8:52 pm
Please log in for more thread options
On Sun, 30 Jan 2005 14:42:19 +1100, Nick Pomponio wrote:

Hi Folks

> Ron Savage has some examples for using
> OLE to extract text from a Word document
> in the tutorials on his site:

You're right! Tutorials 16 & 17:

http://savage.net.au/Perl-tuts-1-30.html

I sure hope the code still works.
--
Cheers
Ron Savage, ron@savage.net.au on 31/01/2005
http://savage.net.au/index.html
Let the record show: Microsoft is not an Australian company



Posted by Jim Keenan on January 30, 2005, 12:34 am
Please log in for more thread options
Chakravarthy Bollapalli (IFIN SCC AI) wrote:
> Hi,
> I have a word document which has some 10+ pages. I need to search this
> document for a particular key words.

Since I'm not currently working on Windows or a system that supports MS
Word, I can't help you. But a good place for questions like this is the
perl-win32-users@activestate.com mailing list.

jimk


Posted by John Bokma on January 30, 2005, 2:59 am
Please log in for more thread options
Chakravarthy Bollapalli (IFIN SCC AI) wrote:

> Hi,
> I have a word document which has some 10+ pages. I need to search
> this
> document for a particular key words.
> I need information like section name, page number of all
> occurrences of
> these key words using perl. It would be nice if any one could give me
> a sample code that does this or some thing similar or even pointers on
> how to do this.

Use VBA for this. Or maybe you can do it using OLE.


--
John Small Perl scripts: http://johnbokma.com/perl/
Perl programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html



Similar ThreadsPosted
Convert a PDF document into MS Word docuemnt October 6, 2006, 7:26 am
Convert MS-Word to plain text May 9, 2008, 1:29 pm
Re: Searching for drives and files on drives perl July 24, 2008, 1:03 pm
searching for module providing menus with special abilities October 25, 2004, 11:13 pm
ANNOUNCE: OpenOffice-OODoc for Open Document format August 15, 2005, 9:39 pm
Building Perl module GD::Text on Solaris 10 August 3, 2007, 3:37 pm
Win32::OLE and Word January 12, 2006, 1:29 pm
Word frequency analyser October 23, 2005, 2:51 pm
text-chm May 6, 2005, 10:53 pm
Help reading PDF to get text... November 26, 2004, 3:50 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap