Re: Can I Automatically Insert Section Breaks?

Subject: Re: Can I Automatically Insert Section Breaks?
From: "Edgar D' Souza" <edgar -dot- b -dot- dsouza -at- gmail -dot- com>
To: "Prachi Angel" <shiprachi103 -at- yahoo -dot- com>
Date: Mon, 16 Oct 2006 15:49:13 +0530

Hello? Did the original poster see this post of mine?

Ed.

On 10/14/06, Edgar D' Souza <edgar -dot- b -dot- dsouza -at- gmail -dot- com> wrote:

Try this:
Sub SecBreak()
Dim parLoop As Word.Paragraph
Dim sel As Word.Selection

For Each parLoop In ActiveDocument.Paragraphs
If parLoop.Format.Style = "Heading 1" Then
parLoop.Range.Select
Set sel = Application.Selection
sel.Collapse direction:=WdCollapseDirection.wdCollapseStart
sel.InsertBreak WdBreakType.wdSectionBreakNextPage
End If
Next
End Sub

Obviously, try it on **copies** of your documents (NEVER the
originals) and see if it does what you want.

Ed.
On 10/13/06, Prachi Angel <shiprachi103 -at- yahoo -dot- com> wrote:
> Hi,
> I have a requirement where I need to create section
> break for all the Heading-1 in a MS Word document.
> There are more than 15 documents and each one of them
> is of approx 300 page count.
>
> Please let me know if there is a way (may be a macro)
> to automatically insert the section breaks.



--
The trouble with young writers is that they are all in their sixties.
-- Somerset Maugham
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

WebWorks ePublisher Pro for Word features support for every major Help format plus PDF, HTML and more. Flexible, precise, and efficient content delivery. Try it today! http://www.webworks.com/techwr-l

Easily create HTML or Microsoft Word content and convert to any popular Help file format or printed documentation. Learn more at http://www.DocToHelp.com/TechwrlList

---
You are currently subscribed to TECHWR-L as archive -at- infoinfocus -dot- com -dot-
To unsubscribe send a blank email to techwr-l-unsubscribe -at- lists -dot- techwr-l -dot- com
or visit http://lists.techwr-l.com/mailman/options/techwr-l/archive%40infoinfocus.com


To subscribe, send a blank email to techwr-l-join -at- lists -dot- techwr-l -dot- com

Send administrative questions to lisa -at- techwr-l -dot- com -dot- Visit
http://www.techwr-l.com/techwhirl/ for more resources and info.


Follow-Ups:

References:
Can I Automatically Insert Section Breaks?: From: Prachi Angel
Re: Can I Automatically Insert Section Breaks?: From: Edgar D' Souza

Previous by Author: Re: Can I Automatically Insert Section Breaks?
Next by Author: Re: Can I Automatically Insert Section Breaks?
Previous by Thread: Re: Can I Automatically Insert Section Breaks?
Next by Thread: Re: Can I Automatically Insert Section Breaks?


What this post helpful? Share it with friends and colleagues:


Sponsored Ads