@macropod

  • Thread starter Thread starter shahar.oleh
  • Start date Start date
....or use a macro.

Could you give me some pointers?

It is genreally better to keep all follow up questions within the same
thread.. Luckily, the thread you are refering to is not that far away...

Here is an example:


Sub InsertSecHeading()

Dim rgeCurrent As Range

Set rgeCurrent = Selection.Range

'In case user has selected a range, collpase it so that we do _
not delete anything. If you would rather collapse to the end, _
change "wdCollapseStart" with "wdCollapseEnd"

With rgeCurrent
.Collapse wdCollapseStart
'You did not specify the type of break you wanted _
You might want to use wdSectionBreakContinuous, _
wdSectionBreakEvenPage or wdSectionBreakOddPage
.InsertBreak wdSectionBreakNextPage
.Style = wdStyleHeading1
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

Back
Top