Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

objWord.** Methods

Status
Not open for further replies.

Ouch

Programmer
Jul 17, 2001
159
GB
any one know where i can find a list of methods for this object?

Set oApp = CreateObject("Word.Application")
oApp.Visible = True
Set objWord = CreateObject("Word.Basic")
objWord.FileNew
'creates a new document which you can then use


objWord.Insertfile "a:1CoversecBulletin.rtf"
objWord.InsertPara 'inserts a space
objWord.Insert

i am trying to insert reports directly into a word file

i think i can do it by saving the reports as documents first but its a bit messy


 
What version of Word are you trying to automate? The wordbasic declaration isn't needed/won't work for A97 and later. You should be working with the oApp variable you set first. Also, the InsertFile method works wiht a Range or Selection object. For instance, to insert the file at the beginning of your document you would use this line: oApp.ActiveDocument.Range(Start:=0, End:=0).InsertFile("a:1CoversecBulletin.rtf").

As far as a list of methods, if you set a reference to Word you can use the object browser to view all the properties and methods under the Word object model.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top