J
Joe Cilinceon
I'm sending the contents of a form to Microsoft Word as a merge file. The
code for this procedure is from http://support.microsoft.com/?kbid=210271 It
works great except for removing the bookmarks which gives me an error.
The line that hangs is as follows
'If a field on the form is empty, remove the bookmark text, and
'continue.
If Err.Number = 94 Then
objWord.Selection.Text = "" ' Chokes on this line
Resume Next
Else
MsgBox Err.Number & vbCr & Err.Description
End If
The error I get is Run Time Error #91
Object varialble or With Block variable no set
Any one have a clue as to what I'm missing. I'm new at this and have asked a
couple of times.
code for this procedure is from http://support.microsoft.com/?kbid=210271 It
works great except for removing the bookmarks which gives me an error.
The line that hangs is as follows
'If a field on the form is empty, remove the bookmark text, and
'continue.
If Err.Number = 94 Then
objWord.Selection.Text = "" ' Chokes on this line
Resume Next
Else
MsgBox Err.Number & vbCr & Err.Description
End If
The error I get is Run Time Error #91
Object varialble or With Block variable no set
Any one have a clue as to what I'm missing. I'm new at this and have asked a
couple of times.