Word Macro

O

OceanMat

Hi
I want to select all instances of text in a Word document that are bold,
then using document mapping - promote it to Level 2
I will have about 30 lines of text that have this format.
all other lines of text should remain the same.

Selection.Range.Paragraphs.OutlineLevel = wdOutlineLevel2 ????

I have been messing around for ages but just cannot seem to make it work -
can anyone please help me from going mad ?
Many thanks...
 
H

Helmut Weber

Hi OceanMat,

like that:

Sub Test9087A()
Dim rTmp As Range
Set rTmp = ActiveDocument.Range
With rTmp.Find
.Font.Bold = True
While .Execute
rTmp.Paragraphs(1).OutlineLevel = wdOutlineLevel2
Wend
End With
End Sub

--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP
 

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