Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

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

by mpolo (Chaplain)
on May 26, 2001 at 21:03 UTC ( #83512=note: print w/ replies, xml ) Need Help??


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.


Comment on Re: Can I use Win32::OLE to insert a TIFF in a Word document?
Download Code
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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2014-12-28 13:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (181 votes), past polls