RichardP1978
Registered User.
- Local time
- Today, 00:58
- Joined
- Nov 14, 2006
- Messages
- 89
OK, I am learning loads.
I have made it so when a user clicks a certain button, it starts word up, fills in name and address of the recipient, and fills in who the letter is in reference to. Works a treat UNTIL
a field tries to be inserted in to the bookmark, the code crashes out to debug, and stops filling in rest of word bookmarks.
I have done a search and cant really find an answer to my problems.
I need the code to omit blank fields. It would also be great if it could 'close' up the text in word, so if an address only has 3 lines, when most are 4, there are no gaps inbetween.
Any suggestions.
I think there are many ways of doing the bookmarks, but I am doing mine using the following code
objWord.ActiveDocument.Bookmarks("To").Select
objWord.Selection.Text = Forms![frmletterMenu]![GPName]
I have made it so when a user clicks a certain button, it starts word up, fills in name and address of the recipient, and fills in who the letter is in reference to. Works a treat UNTIL
a field tries to be inserted in to the bookmark, the code crashes out to debug, and stops filling in rest of word bookmarks.
I have done a search and cant really find an answer to my problems.
I need the code to omit blank fields. It would also be great if it could 'close' up the text in word, so if an address only has 3 lines, when most are 4, there are no gaps inbetween.
Any suggestions.
I think there are many ways of doing the bookmarks, but I am doing mine using the following code
objWord.ActiveDocument.Bookmarks("To").Select
objWord.Selection.Text = Forms![frmletterMenu]![GPName]