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

Opening Files in Word with Coding from Visual Basic 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I'm making a database in MS Access and I was wondering what the coding would be if I wanted to open a specific file in Word. For example I have a
 
You will need to include the Microsoft Word Object Library in your project references.

Dim wdApp as Word.Application

Set wdApp = New Word.Application
wdApp.Visible = True
wdApp.WindowState = wdWindowStateMaximize

wdApp.Documents.Open FileName:="C:\Temp\MyDoc.doc", ConfirmConversions:= _
False, ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top