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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[b]Open existing word doc[/b]

Status
Not open for further replies.

Radman

Programmer
Jan 20, 2000
22
AU
In code, how would i open an existing word document using&nbsp;&nbsp;a on_click event procedure for a button in access.<br><br>Thanks
 
refer to the post i put for your other question.<br><br> <p>Brian Famous<br><a href=mailto:bfamous@ncdoi.net>bfamous@ncdoi.net</a><br><a href= > </a><br>
 
&nbsp;&nbsp;&nbsp;&nbsp;Dim objWord As Word.Application<br>&nbsp;&nbsp;&nbsp;&nbsp;Dim objdoc As Word.Document<br><br>&nbsp;&nbsp;&nbsp;&nbsp;worddoc=&quot;S:\SHARED\YOURDOC.DOC&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;Set objWord = New Word.Application<br>&nbsp;&nbsp;&nbsp;&nbsp;Set objdoc = objWord.Documents.Open(worddoc)<br><br>&nbsp;&nbsp;&nbsp;&nbsp;'other code here<br><br>&nbsp;&nbsp;&nbsp;&nbsp;objdoc.Close wdDoNotSaveChanges<br>&nbsp;&nbsp;&nbsp;&nbsp;objWord.Quit<br><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top