Make a sentence after a bookmark Bold

R

RoVo

Hello All,
I am attempting to set a range or selection equal to the first
sentence after a bookmark and set it to be bold and underlined in VBA.
However, I am not too sure as of the most appropriate syntax to use and
was wondering if someone could lend a helping hand. Thanks in advance
for any help received.

Rob
 
H

Helmut Weber

Hi Rovo,

something along these lines.

I think, underlining and bolding would not be a problem,
though Word's definition of "sentence" might be.

Sub Test2()
Dim rTmp As Range
Set rTmp = Selection.Range
With ActiveDocument.Bookmarks("Test01").Range
rTmp.Start = .End + 1
rTmp.End = rTmp.Paragraphs(1).Range.End
rTmp.Sentences(1).Select
End With
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