B
BRC
I have a client database and would like to be able to address a letter
to a single record in that database. What i envision is a button on a
form that will start Word, plug in the appropriate client information
and allow and leave the letter open so I can edit etc.
At this point I know how to open Word to the correct template however
the examples of code I have use bookmarks in the word document. the
following code was from an earlier post
If objWord.ActiveDocument.Bookmarks.Exists("FName") = True Then
objWord.ActiveDocument.Bookmarks("FName").Range.Text = Me!Fname
End If
(the code goes on with this process through each variable Fname, Mi,
Lname etc.)
Which works fine as long as Me!Fname is not blank or null. What I
would like to do is insert only fields that are populated. For instance
if MI (middle initial) is blank, i don't want to leave an empty space
where that would be. I am not sure if I should be using "bookmarks" or
fields in the Word template.
Can anyone direct me to any example code that deals with this sort of
procedure. Thanks
BRC
to a single record in that database. What i envision is a button on a
form that will start Word, plug in the appropriate client information
and allow and leave the letter open so I can edit etc.
At this point I know how to open Word to the correct template however
the examples of code I have use bookmarks in the word document. the
following code was from an earlier post
If objWord.ActiveDocument.Bookmarks.Exists("FName") = True Then
objWord.ActiveDocument.Bookmarks("FName").Range.Text = Me!Fname
End If
(the code goes on with this process through each variable Fname, Mi,
Lname etc.)
Which works fine as long as Me!Fname is not blank or null. What I
would like to do is insert only fields that are populated. For instance
if MI (middle initial) is blank, i don't want to leave an empty space
where that would be. I am not sure if I should be using "bookmarks" or
fields in the Word template.
Can anyone direct me to any example code that deals with this sort of
procedure. Thanks
BRC