UPDATE: I figured it out!
'macro to update bookmarks Sub UpdateBookmark(BookmarkToUpdate As String, TextToUse As String) Dim BMRange As Range Set BMRange = ActiveDocument.Bookmarks(BookmarkToUpdate).Range BMRange.Text = TextToUse ActiveDocument.Bookmarks.Add BookmarkToUpdate, BMRange End Sub 'called like this: UpdateBookmark "NameOfBookMark", "String to insert"
cheers then,
hillsider
hillsider wrote:
[Quoted Text] > Great tutorial, I just finished and my UserForm works (once). The > fields from the UserForm are placed into the document at the bookmarks > using the .InsertBefore feature. Now I would like to add a 'reset' > button to clear the document (after printing) so it can be filled out > again. If I use the .InsertBefore " ", it just adds a space before my > previous entry. I tried using .Delete but that deleted my bookmark. > Please help. > > Cheers then, > Hillsider
|