I put Perl "win32::ole" word into DuckDuckGo and got plenty of sites. The first was http://www.adp-gmbh.ch/perl/word.html, which seems to have well documented code examples. Another technique is to record a macro in Word that does what you want and then translate the VBA to Perl. This can be very powerful, but do remember that the recorded VBA is unlikely to be well written.
Regards,
John Davies
| [reply] [d/l] |
You can try searching PerlMonks (use super search to search inside posts, not the box you see in upper left corner on every page, that is titles only). Then Google.
At the end of the day Win32::OLE can ONLY do what VB can do, nothing more (Win32::OLE only supports VB style IDispatch interfaces, not IUnknown (without IDispatch) C++/C interfaces). WithEvents is buggy in Win32::OLE, see rt://43574. Anything you can do in VB (not C++/C) you can do in Win32::OLE. If you want to know every possible method in the world with a OLE control, use oleview.exe, here is a screenshot http://www.sapnet.ru/examples/oleview_typelib.gif. Ultimately, the info you see with MSDN, oleview, plus the IDispatch-only are the only limitations you have with Win32::OLE. What will hold you (or me) back probably are poor knowledge of VB (so its hard port VB code to Perl with Win32::OLE since you know Perl, and Win32::OLE, but can't read VB), and MSDN's dry, terse and confusing docs, and not being able to figure out how to create the objects you want to use, and that you see in oleview, in VB or Perl, because you (often) cant create them from scratch (must come from a parent class/object), and the method that generates that object instance has an 8 word description on MSDN. | [reply] |
| [reply] |