Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Perl+MSWord (via Win32::OLE) events handling

by MZSanford (Curate)
on Sep 26, 2002 at 13:31 UTC ( #200870=note: print w/ replies, xml ) Need Help??


in reply to Perl+MSWord (via Win32::OLE) events handling

Depending on what you want to make it do, it is possible the OLE interface has a method to do it. You can use something like OLESpy, or the OLE/COM Viewer tool that comes with Visual C++ (and i think elsewhere too) to verify. If there is no method, i do not believe there is a was to 'fire' and event, as events are supposed to signal something within the COM Object, and the external execution of that would be, well, icky (Technical Term®).


from the frivolous to the serious


Comment on Re: Perl+MSWord (via Win32::OLE) events handling
Replies are listed 'Best First'.
Re: Re: Perl+MSWord (via Win32::OLE) events handling
by charnos (Friar) on Sep 26, 2002 at 14:04 UTC
    Have you used the ActiveState OLE Browser? I've had to use Win32::OLE to automate some Word events en masse, but nothing this complicated (plus I cheated..I used a word template file and navigated around it using bookmarks), and when trying to RTFM on my own, I decided to use the browser. I thought it was overall pretty lousy, there was absolutely no documentation for the libraries, just class/method/property names. Are these tools much better? If so, I think it would be very useful to other monks using Win32.

    As for the original question, I'd agree..poke around the OLE library, also perhaps the Win32::API documentation, it would be a whole lot messier, but if you truly, absolutely, positively need it done, it may be the only way.
Re: Re: Perl+MSWord (via Win32::OLE) events handling
by Courage (Parson) on Sep 26, 2002 at 14:48 UTC
    Thank you for help,
    Actually event processing is quite okay in Win32::OLE module, although it is in alpha state. (as perldoc Win32::OLE says), so I was dreaming about a possibility to send not only standard event, but some kind of my own notification.

    One way exists to solve my task for sure, but it is too complicated, and I am afraid of implementing it.
    Idea is to use PerlScript engine from MS-Word to communicate my initial script via, say, "PostThreadMessage" or alike. (PerlScript from ActiveState was mentioned somewhere at this site)
    but I really afraid of such complications: there should be too much conditions to be met in order to run a program, one of them - perl-5.8.0 will not be able to do that currently, as it is not PerlScript-aware, AFAIK.

    Courage, the Cowardly Dog

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://200870]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2015-07-30 04:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls