K
Keith
I'm running XP SP3 and Office 2003 SP3. I have 2GB RAM and tons of drive
space.
Same app, same code, etc. on my machine as on my clients' machines.
Here's an excerpt of my code. When the line "Set docWord =
objWord.Documents.Add(Template:=sWordFormsPath & "evidence.dot")" runs as in
the code below:
Option Compare Database
Option Explicit
'Global mywordform As Object
Global objWord As Word.Application
Global docWord As Word.Document
Global rngWord As Word.Range
Public Sub blahblah()
...
...
Call subOpenWord
Set docWord = objWord.Documents.Add(Template:=sWordFormsPath &
"evidence.dot")
...
...
...
End Sub
Public Sub subOpenWord()
On Error Resume Next
Set objWord = GetObject(, "Word.Application")
If Err.Number > 0 Then
Set objWord = CreateObject("word.application")
objWord.Visible = True
objWord.WindowState = wdWindowStateMaximize
End If
End Sub
Word is running in the background before this point.
I get the error "object variable or with block variable not set".
I tried some of the solutions here: http://support.microsoft.com/kb/319832
but this seems like a total waste of time since it's all working fine on
several machines at 2 separate client offices. Something's amiss on my
machine or my Office setup or ????
Thanks,
Keith
space.
Same app, same code, etc. on my machine as on my clients' machines.
Here's an excerpt of my code. When the line "Set docWord =
objWord.Documents.Add(Template:=sWordFormsPath & "evidence.dot")" runs as in
the code below:
Option Compare Database
Option Explicit
'Global mywordform As Object
Global objWord As Word.Application
Global docWord As Word.Document
Global rngWord As Word.Range
Public Sub blahblah()
...
...
Call subOpenWord
Set docWord = objWord.Documents.Add(Template:=sWordFormsPath &
"evidence.dot")
...
...
...
End Sub
Public Sub subOpenWord()
On Error Resume Next
Set objWord = GetObject(, "Word.Application")
If Err.Number > 0 Then
Set objWord = CreateObject("word.application")
objWord.Visible = True
objWord.WindowState = wdWindowStateMaximize
End If
End Sub
Word is running in the background before this point.
I get the error "object variable or with block variable not set".
I tried some of the solutions here: http://support.microsoft.com/kb/319832
but this seems like a total waste of time since it's all working fine on
several machines at 2 separate client offices. Something's amiss on my
machine or my Office setup or ????
Thanks,
Keith