Add a section break after text

P

PJY

Hi all, I'm using Word 2003 and what I'm trying to do is combine multilpe
documents into one document. I've tried Graham's boiler add-in but it
doesn't hold the pagination so I've decided to do insert file and select all
the files I need, however, when doing that I still need to keep each document
as starting on its own page. The end of each document ends with the words END
OF SECTION - so my question is how can I find that phrase then add a section
break after the phrase, it doesn't seem to work in find and replace.

Thanks in advance for any suggestions.
 
G

Graham Mayor

If when using the Boiler add-in, you start from one of the documents rather
than from a blank one and check the 'insert each document on a new page'
check box, then each document is separated by a section break and the
margins will be those of the first document rather than your normal
template.

Pagination is a function of text reflow within the margins, it can be quite
difficult to ensure that each document retains its pagination when combined
in the same document with others.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
P

PJY

Thanks Graham,
First I'd like to say that my comment was not a complaint. Your add-in works
great on a few documents but this one has 497 different sections. And what
you suggested I try is exactly the way I did it the first time I tried and it
changed all my footers to the same footer and changed the pagination. They
all have the same margins, so I didn't think that could be it, they were all
created by me using the same printer, so I didn't think that could be the
problem. So I moved on to try and find another solution - which prompted my
original question - How can I search for text then add a section break after
that text?
 
G

Graham Mayor

I didn't take it as a complaint, but an observation.
The footers issue will depend on whether the headers/footers are linked or
not if they are linked the follow on documents will adopt the settings of
the previous section. I'll have a look at the add-in over the weekend to see
what can be done to force the new section to be unlinked from the previous
one.
If the text in the document is text and not the section break indicator,
then you can use replace to find the text and replace it with ^b or ^&^b to
put back the text and add a break. If the text is the section break
indicator you should search for ^b and replace with ^b^b
There will not be much you can do with pagination. That depends on the text
flow.
If you want the documents to be combined and retain their exact layout,
headers and footers the best approach would be to use the full version of
Acrobat to create PDF files for each document then bundle them into one
larger PDF file. Acrobat is not an inexpensive option and the resulting
document will not be editable.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Graham Mayor

I got back earlier than expected this afternoon, so briefly had another look
at the boiler application. Unfortunately it can never be all things to all
men, but the best chance you have of preserving the document layout would be
to start the macro from a blank open document with the margin settings and
styles of the first document to be included. One way to do that is to open
the first document and save it with a new name. Delete all the header
footers then all the document content and resave. Insert the documents into
the resulting empty document.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
P

PJY

Hi Graham, Thanks so much for your input. Actually, what I am utimately
going for is a pdf of all the documents I have in the one folder. We create
the Word docs, then once the engineers have finalized those docs we convert
over to pdf to send to our vendor who then puts our specs on their website,
so I thought the easiest way would be to create one continuous Word doc, then
pdf that, as using the Adobe conversion takes so much time. We also put a
password on the Word docs (has to do with control issues), and we work on the
Word docs with track changes, which stay in the doc even once the document is
final. So, I have created a macro which removes the password, sets the track
changes view to final and then creates a pdf of the Word doc. This works very
well for everything except for the first file in the folder. Just for some
background - when I run the macro, I first set the Adobe printer as my
default printer, I then change the Adobe PDF output folder to match my
destination folder, and I uncheck view Adobe PDF results. If you have some
time, could you look at my macro and see if you can find my error. Thanks so
much for all your help!!

Sub RemoveProtectFinalPDF()
Dim FirstLoop As Boolean
Dim myFile As String
Dim PathToUse As String
Dim myDoc As Document
Dim Response As Long

PathToUse = "U:\unprotect\"

On Error Resume Next

Documents.Close SaveChanges:=wdPromptToSaveChanges

FirstLoop = True

myFile = Dir$(PathToUse & "*.doc")

While myFile <> ""

Set myDoc = Documents.Open(PathToUse & myFile)

If FirstLoop Then

Dialogs(wdDialogToolsUnprotectDocument).Show

FirstLoop = False

Response = MsgBox("Do you want to process " & _
"the rest of the files in this folder", vbYesNo)
If Response = vbNo Then Exit Sub

Else

With Dialogs(wdDialogToolsUnprotectDocument)
ActiveDocument.Unprotect Password:="8678"
.Execute

End With

With ActiveWindow.View
.ShowRevisionsAndComments = False
.RevisionsView = wdRevisionsViewFinal
End With

ActivePrinter = "Adobe PDF"
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True,
PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0

End If

myDoc.Close SaveChanges:=wdSaveChanges

myFile = Dir$()

Wend

End Sub
 
G

Graham Mayor

Answered in your other thread.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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