PDA

Click to See Complete Forum and Search --> : common object model - how can i get its methods


pelegk2
Feb 17th, 2005, 05:42 AM
i want to use the word application com
how can i get its methods?
thnaks in advance
Peleg

Calibra
Feb 17th, 2005, 11:16 AM
In what programming lang?

if it's VB then it's simple, just add an reference to your project to the word object and :


Dim wrdApp as word.application
set wrdApp = createobject("word.application")

wrdApp.whateveryouwant

set wrdApp = nothing




yes i know it's not the most beutifull code ;-)

Dave Sell
Feb 18th, 2005, 08:45 AM
i want to use the word application com
how can i get its methods?
thnaks in advance
Peleg
Add a reference to:
C:\Program Files\Microsoft Office\OFFICE11\MSWORD.OLB

Then in the IDE, hit F2. You can then select the WORD library and check it out:

pelegk2
Feb 18th, 2005, 10:14 AM
first thanks alot good to know:)
second : how can i or when can i read about each one of the methods or propertis that i read?
thnaks in advance
peleg

Dave Sell
Feb 18th, 2005, 10:18 AM
Buy this book:

http://www.oreilly.com/catalog/writewordmacro/index.html

BrianMacDonald
Mar 8th, 2005, 05:32 PM
I have done a fair bit of programming with the Word object library. One thing that I do a lot of is to use the macro recorder to generate code and then paste the code into the stuff you are doing. You can parameterize all of the hard references that the maro recorder will make.

Also, really get to know the .range object. It is the key.