http://www.perlmonks.org?node_id=83512


in reply to Can I use Win32::OLE to insert a TIFF in a Word document?

Basically, (as mentioned in another response) the docs that will get you anywhere are found on the Microsoft Developer Network. These are all geared toward Visual Basic, but you just need to translate them into perl (arrows instead of dots, for instance).

One gotcha occurs when you want to assign a value to a property. To get a proper lvalue for assignment, you need to enclose the property name in braces:

$sheet->Cells(3,3)->Font->{Bold}=1
would be an example in Excel.

Replies are listed 'Best First'.
Re: Can I use Win32::OLE to insert a TIFF in a Word document?
by mikeB (Friar) on May 29, 2001 at 22:46 UTC

    I've found MSDN to be useful for the latest version of M$ products, but not for older ones. At this point, Office 98, which I use, is "really old" :-)

    If you have Visual Basic installed, you can use its Object Browser to help ferret out the details. Create a new project, use Project/References to add the approprate library (Microsoft Word 8, or whatever). Then use the object browser.

    The descriptions are not as good as the MSDN docs, when available, and there is no "usage" information, but it will certainly point you in the right direction, and helps immensely when dealing with M$ "upgrades".

      I found some excel examples that helped me understand how to convert some of the code. With MSWord open, I recorded a macro to do the task I was interested in, then I edit the code. I also searched for other examples and got lucky with one hit on the Microsoft Knowledge Base. I'm new on this site so I don't know yet where to post a large file with lots of samples in it. Email me at KTOMIAK@ATTGLOBAL.NET