dickep
asked on
How to save bookmark formatting in VBA
I have a macro that saves the range of a bookmark, but I want to keep the formatting of the text in the bookmark also. How can I do that?
Here is some code I use:
Set Rng1 = ActiveDocument.Bookmarks(" SerialNumb er").Range
Rng1.Delete
Rng1.Text = SerialNumber
SO, you can see that I am trying replace the SerialNumber in the range. I have formatted the bookmark, but it appears that also gets deleted and the default formatting is used.
Thanks
Ep
Here is some code I use:
Set Rng1 = ActiveDocument.Bookmarks("
Rng1.Delete
Rng1.Text = SerialNumber
SO, you can see that I am trying replace the SerialNumber in the range. I have formatted the bookmark, but it appears that also gets deleted and the default formatting is used.
Thanks
Ep
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.