Find & Replace Bookmarks

J

jbc

Hello,

I'm looking to find & replace bookmarks throughout a document. Is there a
code for bookmarks?

I want to locate all bookmarks and replace with *B*.

Thanks.
 
G

Greg Maxey

jbc,

Not sure that I follow your intent. I don't think that you can "Find"
bookmark and "Replace" with B, however if you want to replace any bookmarked
text with the letter "B" and delete the bookmark, then the following macro
may do:

Sub ScratchMarcro()
Dim oBM As Bookmark
For Each oBM In ActiveDocument.Bookmarks
oBM.Select
oBM.Delete
Selection.Text = "B"
Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top