Tue 4 Jul 2006
Over in the Forums (http://www.roth.net/forums) a question was asked about converting VBScript into Perl. This reminded me of a question that I am still frequently asked about: how do you use COM objects in Perl? It just so happens that we have a PowerPoint presentation that I gave at the 2000 Perl Conference on this very subject: http://www.roth.net/conference/perl/2000/Perl2000.ppt
In brief, a Perl script can interact with most COM objects. This is done using the Win32::OLE extension which comes as part of Activestate’s Win32 Perl. There is experimental support for COM eventing but it has unfortunately been experimental for several versions now.
One Response to “Using COM objects in Perl”
Leave a Reply
You must be logged in to post a comment.
February 3rd, 2007 at 9:34 am
Your presentation was excellent. It’s one of the few resources on the web for a real application of Win32::OLE. I’ve been trying to use Win32::OLE to extract text from a powerpoint presentation. We’re mainly doing conversions of .ppt to .swf and in the automated process the text becomes inaccessible. To get around this, I wanted to automate parsing the text out of the .ppt file. You can see the results here:
http://techdad.wordpress.com/2007/02/03/extract-text-from-powerpoint-using-perl/