J
Joe Cilinceon
Here is the need:
When a tenant rents a unit I need to send the information at the time it is
paid to a Lease.doc file for printing in the background. Now I've looked at
and tried several of the methods listed in various articles for doing this
with the automation methods working the best so far for Access to Word
current form printing. The reason for Word is the lease is 5 pages long (27
paragraphs, that must be fully justified).
I have the lease doc with 27 bookmarked areas. The problem I'm having with
it, is that it isn't removing the bookmark name when there is nothing in
the field. It is also leaving a piece of the name at the end of some fields.
The code I'm using comes from MS Article 210271.
Now I'm using Office XP Pro (2002) for this. The code that is supposed to
remove the book mark name is as follows:
'If the field on the form is empty, remove the bookmark text and continue
If Err.Number = 94 Then
objWord.Selection.Text = ""
Resume Next
the lines sent to the document are similar to the following:
..ActiveDocument.Bookmarks("ax1").Select
..Selection.Text = (Cstr(Trim(Me.AccountName ) ) )
I posted this about 4 days ago in the report group with no response and
would appreaciate any help I can get with this. Also if anyone has a better
way please let me know.
When a tenant rents a unit I need to send the information at the time it is
paid to a Lease.doc file for printing in the background. Now I've looked at
and tried several of the methods listed in various articles for doing this
with the automation methods working the best so far for Access to Word
current form printing. The reason for Word is the lease is 5 pages long (27
paragraphs, that must be fully justified).
I have the lease doc with 27 bookmarked areas. The problem I'm having with
it, is that it isn't removing the bookmark name when there is nothing in
the field. It is also leaving a piece of the name at the end of some fields.
The code I'm using comes from MS Article 210271.
Now I'm using Office XP Pro (2002) for this. The code that is supposed to
remove the book mark name is as follows:
'If the field on the form is empty, remove the bookmark text and continue
If Err.Number = 94 Then
objWord.Selection.Text = ""
Resume Next
the lines sent to the document are similar to the following:
..ActiveDocument.Bookmarks("ax1").Select
..Selection.Text = (Cstr(Trim(Me.AccountName ) ) )
I posted this about 4 days ago in the report group with no response and
would appreaciate any help I can get with this. Also if anyone has a better
way please let me know.