a question on multiple sections

C

Chip Orange

I'm creating a template for a document which will be very complex and have
many sections. I'm going to have to implement in vba ways for the user to
create, move, or delete a section, and each section will have its own
particular headers/footers. Therefore, I'm creating and moving each section
with its following section-nextpage code.

This is causing me to end up with a blank page at the end of the document.

The user can print anywhere in this process, and so in order to prevent the
blank page from being printed I thought I would have to intercept the print
commands and print all but the last section.

Is there a better way of handling this?

thanks.

Chip
 
C

Charles Kenyon

I doubt you'll get much help unless you specify:

Which version of Word you are using, and

What you are doing with the many sections, that is, why you need many
sections.

You may want to review <URL:
http://word.mvps.org/FAQs/Formatting/WorkWithSections.htm>.
--

Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
C

Chip Orange

ok, it's word 2002, and I've read the article you mention (thanks).

We need multiple sections because the headers and footers change with each
section.

Chip
 
M

Margaret Aldis

Try setting the starting condition on the final section (the document shell)
to 'Continuous'?

--
Margaret Aldis - Microsoft Word MVP
Syntagma partnership site: http://www.syntagma.co.uk


Chip Orange said:
ok, it's word 2002, and I've read the article you mention (thanks).

We need multiple sections because the headers and footers change with each
section.

Chip
 
C

Charles Kenyon

We need multiple sections because the headers and footers change with each
How do they change? You may want to look into the StyleRef field and use
that to make the changes you need instead of adding sections. It will repeat
the text of the first paragraph on a page in a given style (or if there is
none on the page, the last paragraph in a given style on previous pages).
There are other options for it as well. If each of your chapter headings is
in the Heading 1 style and the change you need in your headers/footers is
the name of your chapter, this works quite handily, without a section break.
You can set the formatting of (for example) Heading 1 to have a page break
before.

It is just that, as you've discovered, adding unnecessary sections makes
editing a lot harder.
--

Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.



Chip Orange said:
ok, it's word 2002, and I've read the article you mention (thanks).

We need multiple sections because the headers and footers change with each
section.

Chip
 
C

Chip Orange

Yes, that would work, but I'm never sure when the final section is the final
section, so I think I'd have to do this by intercepting the print commands
(or I'd have to get the end users to say when the document is finalized and
cannot be changed any longer, and they won't do it, except for the times
when they did do it and then decided they were wrong and tried to change it
afterwards!!!). ;)

Chip


Margaret Aldis said:
Try setting the starting condition on the final section (the document shell)
to 'Continuous'?

--
Margaret Aldis - Microsoft Word MVP
Syntagma partnership site: http://www.syntagma.co.uk


message news:umZOomx%[email protected]...
 
C

Chip Orange

thanks, I will go track down some documentation on styleref right away!!!

Chip


Charles Kenyon said:
We need multiple sections because the headers and footers change with each
section.
How do they change? You may want to look into the StyleRef field and use
that to make the changes you need instead of adding sections. It will repeat
the text of the first paragraph on a page in a given style (or if there is
none on the page, the last paragraph in a given style on previous pages).
There are other options for it as well. If each of your chapter headings is
in the Heading 1 style and the change you need in your headers/footers is
the name of your chapter, this works quite handily, without a section break.
You can set the formatting of (for example) Heading 1 to have a page break
before.

It is just that, as you've discovered, adding unnecessary sections makes
editing a lot harder.
--

Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.



message news:umZOomx%[email protected]...
 
C

Chip Orange

Close, but unfortunately, no cigar!!! :(

We need a blank header at the start of each section, then, second and
subsequent pages do have their own unique header requirements which could be
handled by styleref (thank you).

Is there a way to supress a header for just the current page???

thanks.

Chip


Charles Kenyon said:
We need multiple sections because the headers and footers change with each
section.
How do they change? You may want to look into the StyleRef field and use
that to make the changes you need instead of adding sections. It will repeat
the text of the first paragraph on a page in a given style (or if there is
none on the page, the last paragraph in a given style on previous pages).
There are other options for it as well. If each of your chapter headings is
in the Heading 1 style and the change you need in your headers/footers is
the name of your chapter, this works quite handily, without a section break.
You can set the formatting of (for example) Heading 1 to have a page break
before.

It is just that, as you've discovered, adding unnecessary sections makes
editing a lot harder.
--

Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.



message news:umZOomx%[email protected]...
 
S

Suzanne S. Barnhill

No easy way, no. Which is why I still use an Odd Page section break between
chapters so I can use "Different first page" in each chapter/section. I also
use "Different odd and even," but I still use a StyleRef field to pick up
the chapter title, which allows me to use Same As Previous headings
throughout.



Chip Orange said:
Close, but unfortunately, no cigar!!! :(

We need a blank header at the start of each section, then, second and
subsequent pages do have their own unique header requirements which could be
handled by styleref (thank you).

Is there a way to supress a header for just the current page???

thanks.

Chip
 
C

Chip Orange

thanks for the tip; in this case however, no blank pages are allowed in the
document.


Suzanne S. Barnhill said:
No easy way, no. Which is why I still use an Odd Page section break between
chapters so I can use "Different first page" in each chapter/section. I also
use "Different odd and even," but I still use a StyleRef field to pick up
the chapter title, which allows me to use Same As Previous headings
throughout.



message news:[email protected]...
Close, but unfortunately, no cigar!!! :(

We need a blank header at the start of each section, then, second and
subsequent pages do have their own unique header requirements which
could
be
handled by styleref (thank you).

Is there a way to supress a header for just the current page???

thanks.

Chip


with
each
there
 
S

Suzanne S. Barnhill

Well, then just use Next Page instead of Odd Page.



Chip Orange said:
thanks for the tip; in this case however, no blank pages are allowed in the
document.


Suzanne S. Barnhill said:
No easy way, no. Which is why I still use an Odd Page section break between
chapters so I can use "Different first page" in each chapter/section. I also
use "Different odd and even," but I still use a StyleRef field to pick up
the chapter title, which allows me to use Same As Previous headings
throughout.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the
newsgroup
 
C

Chip Orange

thanks; that's what I'm doing at the moment, but I'm ending up (since each
section *must* be movable anywhere within the document) with an extra blank
page at the end of the document. I really started this thread trying to
find out what was the best way of dealing with that.

My only thought has been to intercept the printing command with my own vba
routines, which print all of the document except for the last page.

Do you have any other ways of dealing with this extra blank page at the end?

thanks.

Chip


Suzanne S. Barnhill said:
Well, then just use Next Page instead of Odd Page.



message news:[email protected]...
 
M

Margaret Aldis

Hi Chip

If you are moving the sections via VBA anyway, how about finishing up by
making the last section (the one following the last real section break,
which you need to move around with your text) a continuous start?

ActiveDocument.Sections
_(ActiveDocument.Sections.Count).PageSetup.SectionStart _
=wdSectionContinuous

Or you could place this in the intercept of FilePrint.

(I still think if you set this once for the document and then move your
sections around complete with their ending section break you should only
need to set the 'empty document' section up to continuous once, but this
should save any doubt, anyway).


Chip Orange said:
thanks; that's what I'm doing at the moment, but I'm ending up (since each
section *must* be movable anywhere within the document) with an extra blank
page at the end of the document. I really started this thread trying to
find out what was the best way of dealing with that.

My only thought has been to intercept the printing command with my own vba
routines, which print all of the document except for the last page.

Do you have any other ways of dealing with this extra blank page at the end?

thanks.

Chip


Suzanne S. Barnhill said:
Well, then just use Next Page instead of Odd Page.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the
newsgroup
so
all may benefit.

in
message news:[email protected]... in
the
chapter/section.
I
also
use "Different odd and even," but I still use a StyleRef field to
pick
up
the chapter title, which allows me to use Same As Previous headings
throughout.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup
so
all may benefit.

in
message Close, but unfortunately, no cigar!!! :(

We need a blank header at the start of each section, then, second and
subsequent pages do have their own unique header requirements which
could
be
handled by styleref (thank you).

Is there a way to supress a header for just the current page???

thanks.

Chip


message We need multiple sections because the headers and footers change
with
each
section.
How do they change? You may want to look into the StyleRef field and
use
that to make the changes you need instead of adding sections. It will
repeat
the text of the first paragraph on a page in a given style (or if
there
is
none on the page, the last paragraph in a given style on previous
pages).
There are other options for it as well. If each of your chapter
headings
is
in the Heading 1 style and the change you need in your headers/footers
is
the name of your chapter, this works quite handily, without a section
break.
You can set the formatting of (for example) Heading 1 to have a page
break
before.

It is just that, as you've discovered, adding unnecessary sections
makes
editing a lot harder.
--

Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.



"Chip Orange"
wrote
in
message ok, it's word 2002, and I've read the article you mention (thanks).

We need multiple sections because the headers and footers change
with
each
section.

Chip


in
message I doubt you'll get much help unless you specify:

Which version of Word you are using, and

What you are doing with the many sections, that is, why you
need
many
sections.

You may want to review <URL:
http://word.mvps.org/FAQs/Formatting/WorkWithSections.htm>.
--

Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is
awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

"Chip Orange"
<[email protected][remove-me-and-brackets]>
wrote
in
message I'm creating a template for a document which will be very
complex
and
have
many sections. I'm going to have to implement in vba ways for
the
user
to
create, move, or delete a section, and each section will have
its
own
particular headers/footers. Therefore, I'm creating and moving
each
section
with its following section-nextpage code.

This is causing me to end up with a blank page at the end
of
the
document.

The user can print anywhere in this process, and so in
order
to
prevent
the
blank page from being printed I thought I would have to
intercept
the
print
commands and print all but the last section.

Is there a better way of handling this?

thanks.

Chip
 
C

Chip Orange

Yes, thanks, I think I can do this; I'll have a look as I would need to undo
it if the last section is moved, and I would need to undo it if a new
section was added at the end, but I'll think on it. It might just be easier
to intercept file print and do it there (which is still easier than what I
had planned (not printing the last page)).

thanks.

Chip


Margaret Aldis said:
Hi Chip

If you are moving the sections via VBA anyway, how about finishing up by
making the last section (the one following the last real section break,
which you need to move around with your text) a continuous start?

ActiveDocument.Sections
_(ActiveDocument.Sections.Count).PageSetup.SectionStart _
=wdSectionContinuous

Or you could place this in the intercept of FilePrint.

(I still think if you set this once for the document and then move your
sections around complete with their ending section break you should only
need to set the 'empty document' section up to continuous once, but this
should save any doubt, anyway).


message news:[email protected]...
thanks; that's what I'm doing at the moment, but I'm ending up (since each
section *must* be movable anywhere within the document) with an extra blank
page at the end of the document. I really started this thread trying to
find out what was the best way of dealing with that.

My only thought has been to intercept the printing command with my own vba
routines, which print all of the document except for the last page.

Do you have any other ways of dealing with this extra blank page at the end?

thanks.

Chip


Suzanne S. Barnhill said:
Well, then just use Next Page instead of Odd Page.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the
newsgroup
so
all may benefit.

in
message thanks for the tip; in this case however, no blank pages are allowed in
the
document.


No easy way, no. Which is why I still use an Odd Page section break
between
chapters so I can use "Different first page" in each
chapter/section.
I
also
use "Different odd and even," but I still use a StyleRef field to pick
up
the chapter title, which allows me to use Same As Previous headings
throughout.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the
newsgroup
so
all may benefit.

"Chip Orange"
wrote
in
message Close, but unfortunately, no cigar!!! :(

We need a blank header at the start of each section, then,
second
and
subsequent pages do have their own unique header requirements which
could
be
handled by styleref (thank you).

Is there a way to supress a header for just the current page???

thanks.

Chip


"Charles Kenyon" <[email protected]>
wrote
in
message We need multiple sections because the headers and footers change
with
each
section.
How do they change? You may want to look into the StyleRef
field
and
use
that to make the changes you need instead of adding sections. It
will
repeat
the text of the first paragraph on a page in a given style (or if
there
is
none on the page, the last paragraph in a given style on previous
pages).
There are other options for it as well. If each of your chapter
headings
is
in the Heading 1 style and the change you need in your
headers/footers
is
the name of your chapter, this works quite handily, without a
section
break.
You can set the formatting of (for example) Heading 1 to have
a
page
break
before.

It is just that, as you've discovered, adding unnecessary sections
makes
editing a lot harder.
--

Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.



"Chip Orange"
wrote
in
message ok, it's word 2002, and I've read the article you mention
(thanks).

We need multiple sections because the headers and footers change
with
each
section.

Chip


in
message I doubt you'll get much help unless you specify:

Which version of Word you are using, and

What you are doing with the many sections, that is, why
you
need
many
sections.

You may want to review <URL:
http://word.mvps.org/FAQs/Formatting/WorkWithSections.htm>.
--

Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is
awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

"Chip Orange"
<[email protected][remove-me-and-brackets]>
wrote
in
message I'm creating a template for a document which will be very
complex
and
have
many sections. I'm going to have to implement in vba
ways
for
the
user
to
create, move, or delete a section, and each section will have
its
own
particular headers/footers. Therefore, I'm creating and
moving
each
section
with its following section-nextpage code.

This is causing me to end up with a blank page at the
end
 

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