D
Dale
I cannot open an instance of word from an Access 2007 database with the
following code. I've tried a repair of office and that has not fixed
the problem (I found references to this as a solution). I have all the
references set. This code only works if I have an instance of word
open. Any assistance is greatly appreciated.
On Error Resume Next
Set objWord = GetObject(, "Word.Application")
'An error indicates there was no Word instace open
' so we need to create a new Word Instance
If Err.Number = 429 Then
Set objWord = CreateObject("Word.Application")
'Set flag to indicate we created a New Word Instance
bolCreated = True
End If
'Enable Built in Error handling
On Error GoTo 0
'Show Word Instance
objWord.Visible = True
'Open selected File
Set doc = objWord.Documents.Open("filepath", False, True)
--
following code. I've tried a repair of office and that has not fixed
the problem (I found references to this as a solution). I have all the
references set. This code only works if I have an instance of word
open. Any assistance is greatly appreciated.
On Error Resume Next
Set objWord = GetObject(, "Word.Application")
'An error indicates there was no Word instace open
' so we need to create a new Word Instance
If Err.Number = 429 Then
Set objWord = CreateObject("Word.Application")
'Set flag to indicate we created a New Word Instance
bolCreated = True
End If
'Enable Built in Error handling
On Error GoTo 0
'Show Word Instance
objWord.Visible = True
'Open selected File
Set doc = objWord.Documents.Open("filepath", False, True)
--