G
Guest
Hi,
I wonder if anyone can help me. I have Access 2000
database that I have written to interact with word and
print letters and envelopes of contacts by using
predefined bookmarks in a word template. When the code is
first run it works fine, but on subsequent runs I receive
an error 462: the remote server machine is does not exist
or is unavailable. I have to quit Access & restart for it
to run once again. MS technical help does not help. The
code is below
With objWord
objWord.Documents.Add strWordTemplate
.ActiveDocument.Bookmarks("Name").Select
.Selection.Text = strName
ActiveDocument.Bookmarks.Add _
Name:="EnvelopeName", Range:=Selection.Range (Code
fails here)
.ActiveDocument.Bookmarks("Address").Select
.Selection.Text = strAddress
.ActiveDocument.Bookmarks.Add Name:="EnvelopeAddress",
Range:=Selection.Range
Thanks in advance
Stuart
I wonder if anyone can help me. I have Access 2000
database that I have written to interact with word and
print letters and envelopes of contacts by using
predefined bookmarks in a word template. When the code is
first run it works fine, but on subsequent runs I receive
an error 462: the remote server machine is does not exist
or is unavailable. I have to quit Access & restart for it
to run once again. MS technical help does not help. The
code is below
With objWord
objWord.Documents.Add strWordTemplate
.ActiveDocument.Bookmarks("Name").Select
.Selection.Text = strName
ActiveDocument.Bookmarks.Add _
Name:="EnvelopeName", Range:=Selection.Range (Code
fails here)
.ActiveDocument.Bookmarks("Address").Select
.Selection.Text = strAddress
.ActiveDocument.Bookmarks.Add Name:="EnvelopeAddress",
Range:=Selection.Range
Thanks in advance
Stuart