Word VBA - Get size of rest of text when flagging bookmarks

Hi
I was given the following code by an expert to flag the bookmarks in a Word document but as shown
in the image the font size is very small. Is there a way to change the font size of the bookmarks to the same
as the rest of the text
I used rng.Font.Size = 12, guessing that the font size is 12. How do I automatically get the font size

Sub FlagBookmarks()
Dim bmk As Bookmark
Dim rng As Range

For Each bmk In ActiveDocument.Bookmarks
    Set rng = bmk.Range
    rng.Collapse wdCollapseEnd
    rng.Text = bmk.Name
    rng.Font.Superscript = True
    rng.Font.Color = wdColorRed
Next bmk
End Sub

Open in new window


Image1.jpg
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rgonzo1971Commented:
Hi,

the code give the bookmark in superscript like in 1st of july

Sub FlagBookmarks()
Dim bmk As Bookmark
Dim rng As Range

For Each bmk In ActiveDocument.Bookmarks
    Set rng = bmk.Range
    rng.Collapse wdCollapseEnd
    rng.Text = bmk.Name
    rng.Font.Size = 12
    rng.Font.Color = wdColorRed
Next bmk
End Sub

Open in new window

Regards
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Word

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.