jaaret
Instructor
- Jun 19, 2002
- 171
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
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