Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
@macropod
....or use a macro.
Could you give me some pointers? thanks |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
@macropod
" wrote:
....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 |