Section Break

K

Ken Kast

If I have a document with 2 sections, is the section break in
sections(1).range or sections(2).range, and where in the range, so I can
find it to delete it?

Thanks.
 
J

Jean-Guy Marcil

Ken Kast was telling us:
Ken Kast nous racontait que :
If I have a document with 2 sections, is the section break in
sections(1).range or sections(2).range, and where in the range, so I
can find it to delete it?


It belongs to Sections(1).Range.
This will delete the section break that separates section 1 from section 2:
ActiveDocument.Sections(1).Range.Characters.Last.Delete

Beware of the effects of deleting a section break on footers, headers,
margins, etc.

--

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
[email protected]
Word MVP site: http://www.word.mvps.org
 
K

Ken Kast

Thanks.
Jean-Guy Marcil said:
Ken Kast was telling us:
Ken Kast nous racontait que :



It belongs to Sections(1).Range.
This will delete the section break that separates section 1 from section
2:
ActiveDocument.Sections(1).Range.Characters.Last.Delete

Beware of the effects of deleting a section break on footers, headers,
margins, etc.

--

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
[email protected]
Word MVP site: http://www.word.mvps.org
 
Top