G
gromit12
Hi,
Just trying to open a Word file from Excel. The code below compiles
OK, and gets as far as opening Word, but then a dialog box pops open
with this:
Run-time error '-2147417851 (80010105)':
Automation Error
The server threw an exception.
I have both Office 2000 and 2007 installed on XP. Any ideas what could
be causing this?
Cheers
Gromit
=========================
Sub test()
Dim sPath As String
Dim sDoc As String
Dim objWord As Word.Application
Set objWord = New Word.Application
sPath = Application.ThisWorkbook.Path
sDoc = sPath & "\testform.doc"
With objWord
.Visible = True
.Activate
.WindowState = wdWindowStateMaximize
.Documents.Open Filename:=sDoc
End With
End Sub
Just trying to open a Word file from Excel. The code below compiles
OK, and gets as far as opening Word, but then a dialog box pops open
with this:
Run-time error '-2147417851 (80010105)':
Automation Error
The server threw an exception.
I have both Office 2000 and 2007 installed on XP. Any ideas what could
be causing this?
Cheers
Gromit
=========================
Sub test()
Dim sPath As String
Dim sDoc As String
Dim objWord As Word.Application
Set objWord = New Word.Application
sPath = Application.ThisWorkbook.Path
sDoc = sPath & "\testform.doc"
With objWord
.Visible = True
.Activate
.WindowState = wdWindowStateMaximize
.Documents.Open Filename:=sDoc
End With
End Sub