![]() |
#1
|
|||
|
|||
![]()
I have a user form that I use to put information into bookmarks and docvariables. When I insert the text from the userform into a bookmark I do the following to reestablish the bookmark.
Code:
pStr = Replace(.PropName.Value, Chr(10), Chr(10) + Chr(9)) Set oRng = ActiveDocument.Bookmarks("PropName").Range oRng.Text = pStr ActiveDocument.Bookmarks.Add "PropName", oRng 1) So the best solution would be if I can somehow protect a bookmark from being deleted when inside the document but unlock it when I run the vba code above. 2) An alternative solution would be to add several spaces at the end of the text inside the bookmark when the above vba code creates the bookmark. This would make it harder to select everything and delete the bookmark. I would like to make it impossible but I will take what I can get. Thank you ahead of time. |
Tags |
bookmarks, protect bookmarks |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Table of Contents does not update, when document is opened on other computer | jaybo | Word | 1 | 01-25-2011 04:56 PM |
Update Document Template when Saving the Document File | bjbercaw | Word | 3 | 11-16-2010 02:03 PM |
Bookmarks for a PDF? | Ownaholic | Word | 0 | 10-30-2010 12:27 AM |
Using bookmarks in a protected document | Bill Stemp | Word | 0 | 10-16-2010 06:47 AM |
Envelopes with Document Variables | mailtobln | Word | 0 | 02-11-2009 10:48 PM |