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

Opening word documents

Status
Not open for further replies.

rhintintin

Technical User
Jan 31, 2001
12
GB
Is it possible to open a specific word document from an access macro, i can make it open word, but even if i specify the document path in the command line it still only opens word. Can anyone help?
:-0
 
This example captures the file name from a ListBox named lstPath

Dim wordobj As Word.Application
On Error GoTo errHandler
Set wordobj = GetObject(, "Word.Application")
wordobj.Application.Visible = True
wordobj.Documents.Open (Me.lstPath)
Exit Sub
errHandler:
Set wordobj = CreateObject("Word.Application")
Resume Next


HTH
PaulF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top