Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Win32::OLE and Word: accessing all headers and comments

by roho (Canon)
on Mar 19, 2019 at 11:00 UTC ( #1231425=note: print w/replies, xml ) Need Help??


in reply to Re: Win32::OLE and Word: accessing all headers and comments
in thread Win32::OLE and Word: accessing all headers and comments

I was facing a similar issue and your code sample was just the thing I needed. For my system (Windows 10 -- Office 2016) I had to make Win32::OLE::Const more generic, and I added "close" and "quit" to close the document and end MS Word. Thank you poj for the sample code.
use Win32::OLE::Const "Microsoft Office .* Object Library"; # Close document $Doc->Close(); undef $Doc; # Close MS Word $Word->Quit(); undef $Word;

"It's not how hard you work, it's how much you get done."

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2019-12-07 08:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (160 votes). Check out past polls.

    Notices?