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

Open a Specific Word Document from Access

Status
Not open for further replies.

jaaret

Instructor
Jun 19, 2002
171
0
0
I'm hoping someone can point me to the correct thread. I've tried the following code that I found on this site but it it errors out on the first line at "wdApp As Word.Application"

Dim wdApp As Word.Application, wdDoc As Word.Document
On Error Resume Next
Set wdApp = GetObject(, "Word.Application")
If Err.Number <> 0 Then 'Word isn't already running
Set wdApp = CreateObject("Word.Application")
End If

On Error GoTo 0
Set wdDoc = wdApp.Documents.Open("C:\path\DocName")
wdApp.Visible = True

I'm using Office 2010 beta.

Thanks in advance!
Jaaret
 
You need to set a reference to the MS Word object model. Check your references.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top