Hello,
I'm hoping someone might be able to "donate" some code for two seperate
case:
1- Create a page after the last page in the document wish would be in a new
section.
2- Change the page setup of the current document so that the current page
would be the start of a new section
Thanks for the help. I'm having a really hard time programming anything to
do with section management?!
Daniel
Sabaka - 08 Jan 2005 05:35 GMT
Sub AddSect()
'add a new section at end of document
Dim char As Range
'set char to the last character in the document
Set char = ActiveDocument.Range.Characters.Last
'With sections collection object, use add method to add a section
ActiveDocument.Sections.Add Range:=char
End Sub
> Hello,
>
[quoted text clipped - 10 lines]
>
> Daniel
Daniel - 14 Jan 2005 02:41 GMT
Thank you for the help, it was exactly what I was looking for!
> Sub AddSect()
> 'add a new section at end of document
[quoted text clipped - 19 lines]
> >
> > Daniel
Sabaka - 14 Jan 2005 02:51 GMT
you're welcome!
> Thank you for the help, it was exactly what I was looking for!
>
[quoted text clipped - 24 lines]
> > >
> > > Daniel
Daniel - 17 Jan 2005 02:08 GMT
Sabaka,
After testing the code you gave me, I have one more request to ask of
you. Could you illustrate how I can insert a section but having a different
header and footer than the previous section?
Thank you once again,
Daniel
> you're welcome!
>
[quoted text clipped - 26 lines]
> > > >
> > > > Daniel
Sabaka - 08 Jan 2005 05:51 GMT
About your second question, what do you mean by "current page"? My
understanding is that Word isn't really designed around pages. As I
understand it, Word sees a document as a collection of sections, ranges,
paragraphs and characters. If the "current page" is just the one where the
cursor is blinking, then why not just use the insert menu to insert a break
at the cursor? If the current page is something else, I think you need to
define it in terms of a range or a section or something Word understands.
> Hello,
>
[quoted text clipped - 10 lines]
>
> Daniel