Re: how can I delete an entire section
- From: "Jay Freedman" <jay.freedman@xxxxxxxxxxx>
- Date: Thu, 20 Sep 2007 14:13:08 -0400
This is not nearly as straightforward as you might think. The difficulty is
that the section-level formatting (margins, headers/footers, columns, paper
sources, etc.) is stored in the section mark at the _end_ of the section.
The article http://www.word.mvps.org/FAQs/Formatting/WorkWithSections.htm
explains some of the hiccups you can run into by deleting a section break.
In code, you can run the command
wordDoc.Sections(N).Range.Delete
but the effects will be different depending on whether the Nth section is
the last one in the document. You may also need to adjust the formatting and
the content of the headers in the following section(s).
It might be more effective to set the entire section to the Hidden font
format rather than deleting it.
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
Keith G Hicks wrote:
I should make it clear that I want to delete the whole section -
content, headers, footers, etc. - not just the section break.
Keith
"Keith G Hicks" <krh@xxxxxxxxxxx> wrote in message
news:eu9oe95#HHA.5164@xxxxxxxxxxxxxxxxxxxxxxx
word 03
access 2k
I need to programatically delete an entire section from a document
in the event that section does not apply to a customer. How would I
do this in vba?
Thanks,
Keith
.
- References:
- how can I delete an entire section
- From: Keith G Hicks
- Re: how can I delete an entire section
- From: Keith G Hicks
- how can I delete an entire section
- Prev by Date: Re: Word dictionary - transferrable?
- Next by Date: Re: Update template while in use?
- Previous by thread: Re: how can I delete an entire section
- Next by thread: Re: how can I delete an entire section
- Index(es):
Relevant Pages
|