perl win32::ole question

Darren Duncan darren at DarrenDuncan.net
Mon Jan 27 22:40:05 CST 2003


Hello Andrew. 

P.S.  This message is CCd to victoria-pm at pm.org, which is a newish local Perl users group (that also meets in person).  This is a good place to discuss questions or interesting topics, as more people can see them.  But don't send anything there without subscribing to the list first (see http://victoria.pm.org for instructions).  Please tell the other students about it if you can, as we could always use more people here.

I see that Darrell is putting you through all sorts of interesting assignments such as I never had to do when I was a student.  But if this Win32::OLE assignment is any example, it seems to be good to get stretched in ways that just doing core language based assignments (like text file processing) would never go.  The thousands of CPAN modules are good for this.  Doubtless you will get a GD assignment soon for drawing a map using GPS data, if not already. 

I have never used Win32::OLE before, but I did a quick Google search, and following several tries I got something that might be what you need:

http://www.ngbdigital.com/perl_ole_word.html

Note that the line containing just "Word" looks like a comment but it doesn't have the # in front; probably a typo.

I found this with a Google search of "Win32::OLE Application.Word" or something like that.  Generally speaking, you have to realize that Win32::OLE is mostly a Perl interface to a different programming language, so beyond the basic documentation in Win32::OLE itself for how to use the interface, it would help just to read up on OLE.  But the above example should get you a good way there.

Have a good day. -- Darren Duncan

Your letter said:
>Dear Darren,
>
>Dr Wick (Camosun) mentioned I should ask you a perl question we were
>stuck on.
>
>I'm trying to write an application that creates custom brochures from
>a template word document and from form inputs (web based).  CPAN's Win32::OLE
>module has helped in terms of opening, saving, and adding formatted text;
>but I'm looking for any way to replace phrases in the template with values
>from the web form.
>
>Do you have any ideas on how to do the search/replace with OLE?
>
>Thank-you
>
>Andrew
>mailto:andrewd at users.sourceforge.net
>icq: 191875245




More information about the Victoria-pm mailing list