#1   Report Post  
Posted to microsoft.public.word.docmanagement
[email protected] shahar.oleh@gmail.com is offline
external usenet poster
 
Posts: 8
Default @macropod

....or use a macro.

Could you give me some pointers?

thanks
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jean-Guy Marcil[_2_] Jean-Guy Marcil[_2_] is offline
external usenet poster
 
Posts: 373
Default @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
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:32 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"