Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Master Document Alternatives

358 views
Skip to first unread message

colleen adams

unread,
Apr 2, 2001, 3:28:09 PM4/2/01
to
Okay. Everything I've read on the subject indicates not to use Master
Document. So then what? I have up to hundreds of documents to
incorporate into one main document. Each document may have a different
style template attached (and those different styles must be maintained
in the master document). Each page of the master must be sequentially
page numbered. And the master must have a TOC.

Any suggestions, advise, and/or help would be a blessing. Thanks.

cad...@entium.com

Terry Farrell

unread,
Apr 2, 2001, 5:19:41 PM4/2/01
to
Colleen,

try browsing through our Word Faq site and see if there are any suggestions
that you may find useful as alternatives.

http://www.mvps.org/word/

--
Terry Farrell - MSMVP Word

Please visit our Word FAQ site at http://www.mvps.org/word/ created
cooperatively by the group's MVPs.

Please keep replies in the Newsgroup.
This enables everyone to share the problem
and other experts to bring their expertise.

________________________________________________________________
For direct access to all Microsoft newsgroups:
news://msnews.microsoft.com/

Sorry, but emails cannot be acknowledged.


"colleen adams" <cad...@tpi-corp.com> wrote in message
news:3AC8D2C9...@tpi-corp.com...
: Okay. Everything I've read on the subject indicates not to use Master

:


Charles Kenyon

unread,
Apr 2, 2001, 8:49:46 PM4/2/01
to
Hi Colleen,

See http://www.addbalance.com/word/masterdocuments.htm which (with the
advice to not use MDs) contains links to some alternatives. Hope this helps,
--
Charles Kenyon

Word New User FAQ & Web Directory:
http://www.addbalance.com/word

Legal Users' Guide to Microsoft Word (supplemented)
http://www.addbalance.com/usersguide
--------- --------- --------- --------- --------- ---------
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.

"colleen adams" <cad...@tpi-corp.com> wrote in message
news:3AC8D2C9...@tpi-corp.com...

colleen adams

unread,
Apr 4, 2001, 10:15:08 AM4/4/01
to
Thanks.....I'll check into it today.

colleen adams

unread,
Apr 4, 2001, 10:14:30 AM4/4/01
to
Thanks....will do!

John McGhie [MVP -- Word]

unread,
Apr 6, 2001, 11:07:08 PM4/6/01
to
Hi Colleen:

"colleen adams" <cad...@tpi-corp.com> wrote in message
news:3AC8D2C9...@tpi-corp.com...

> Okay. Everything I've read on the subject indicates not to use Master
> Document.

Master documents may be used in Word 2000 if the master documents and its
subdocuments are NEVER edited. If you never do any more than display or
print them, they will be OK. You must make COPIES of the originals and work
only with the copies, because just updating the table of contents will
eventually break a master document. This is a dangerous procedure suitable
only for experienced documentation professionals.

We advise most users never to use Master Documents simply because one slip
(say... just fixing up a numbered list) can irretrievably damage the master
document so that the user can not get any of the text back. It requires a
great deal of discipline to ensure that you *always* make your updates to
the originals and *never* edit the master or sub documents.

> So then what? I have up to hundreds of documents to
> incorporate into one main document. Each document may have a different
> style template attached (and those different styles must be maintained
> in the master document).

OK: This means that you cannot use a Master Document anyway, because in a
master document each file MUST have the exact same template. Also: There is
a LIMIT to how many subdocuments a master document may have: Microsoft
claims it's 255, but *I* say that if you manage to get one to go above 26
subdocuments you are doing bloody well :-)

> Each page of the master must be sequentially
> page numbered.

You will need to set the starting number on each page. You can do this by
putting all the documents in a Binder, or by running the following macro. I
think you may find the Binder has a limit of 255 entries. Here's the macro
(see notes below):

Sub Main()
'
' Set Starting Page Numbers Macro
' Macro CopyRight 10/7/2000 by John McGhie
' This macros opens files named "Chapter 01.doc" through "Chapter 52.doc"
' and sets the starting page number of each to 1 more than the ending page
' number of the previous. The chapter files nust be named exactly as
' shown, and the Index file starting page number must be set manually.

Dim ChapterNumber As Long
FirstPageNumber As Long
LastPageNumber As Long
Dim FileToOpen As String
ActiveDirectory As String

ChapterNumber = 1
FirstPageNumber = 1
ActiveDirectory = ActiveDocument.Path

For ChapterNumber = 1 To 52
ActiveDocument.Save
ActiveWindow.Close
LastPageNumber = 0

FileToOpen = ActiveDirectory & "\Chapter " & Format(ChapterNumber, "00")
& ".doc"

Documents.Open FileName:=FileToOpen, ConfirmConversions:=False, _
ReadOnly:=False, AddToRecentFiles:=False

If ActiveWindow.View.SplitSpecial = wdPaneNone Then
ActiveWindow.ActivePane.View.Type = wdPrintView
Else
ActiveWindow.View.Type = wdPrintView
End If


With ActiveDocument.Sections(1)
.Footers(wdHeaderFooterPrimary).PageNumbers.Add _
PageNumberAlignment:=wdAlignPageNumberOutside, _
FirstPage:=True
End With

With ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary).PageNumbers
.NumberStyle = wdPageNumberStyleArabic
.HeadingLevelForChapter = 0
.IncludeChapterNumber = False
.ChapterPageSeparator = wdSeparatorHyphen
.RestartNumberingAtSection = True
.StartingNumber = FirstPageNumber
End With

Selection.EndKey Unit:=wdStory
LastPageNumber = Selection.Information(wdActiveEndAdjustedPageNumber)

If LastPageNumber > 1800 Then MsgBox Str(FirstPageNumber): End
FirstPageNumber = LastPageNumber + 1

Next ChapterNumber

End Sub

You will have to edit this macro for your purposes.

You need to change the line that reads "For ChapterNumber = 1 To 52" to
adjust the 52 to the highest chapter number you have. The macro assumes all
the file names are in the format "Chapter 01.doc" and all in the same
directory. If you use a different naming convention, you need to adjust the
doce accordingly. If your naming convention is not numeric you can use the
File System Object to do all the files in a directory. However, you have to
take great care with that: you need to open the files in the order you want
to print them, not the order they occur in the directory. For this reason,
I prefer to explicitly open each file by specifying its file name as seen
above.

It is designed to ADD page numbers to files that do not already have them.
You can remove that part if you don't need it. But note the line that reads
" Selection.EndKey Unit:=wdStory". This forces Word to actually
repaginate each document and count its pages: if you remove that it won't
know how many pages the document contains and you will get random results.

Note the line that reads "If LastPageNumber > 1800 Then MsgBox
Str(FirstPageNumber): End" This is a safety-valve that stops the macro if
it exceeds a sane page count. Set this number to be a few per cent higher
than the page count you expect. You can remove it if you like if you have
great faith in your coding!

The macro assumes that you start it with a document open that is in the same
folder as all the source documents. You will have to modify the File Path
mechanism to handle source documents spread across multiple folders.

> And the master must have a TOC.

That's easy: Use RD fields. Look these up in the Help under RD Filed
(Referenced Document). Take great care with the syntax: note the need to
double the back-slashes and quote the whole string if it contains any
spaces.

Here's an example:

{ TOC }
{ RD "C:\\Manual Text\\Chapters\\Chapter1.doc" }
{ RD "C:\\Manual Text\\Chapters\\Chapter2.doc" }
{ RD "C:\\Manual Text\\Chapters\\Chapter3.doc" }

Beware the example in the Help. That specific example is poorly chosen:
because the files are in a file path that does not contain any spaces, they
don't need the quotes so they have left them out!!


Hope this helps.

--
Please post all comments to the newsgroup to maintain the thread. I charge
a fee to answer questions that are not posted publicly.

John McGhie, Consultant Technical Writer
McGhie Information Engineering Pty Ltd
Sydney, Australia. GMT + 10 Hrs
+61 4 1209 1410, mailto:jo...@mcghie-information.com.au

Charles Kenyon

unread,
Apr 7, 2001, 12:31:23 PM4/7/01
to
John,

I have archived this one. I hope you will consider doing an additional piece
along these lines for the MVP FAQ perhaps titled "Alternatives to Master
Documents" (in all your spare time <g>). If you do, you might want to
consider adding the links to tech-tav and Robert Mohr's work that appear on
my Master Documents page. http://www.addbalance.com/word/masterdocuments.htm

If you would like, I would be willing to prepare a draft for you based on
the threads listed on my page.

I have put a reference to this thread on that page as well.
--
Charles Kenyon

Word New User FAQ & Web Directory:
http://www.addbalance.com/word

Legal Users' Guide to Microsoft Word (supplemented)
http://www.addbalance.com/usersguide
--------- --------- --------- --------- --------- ---------
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.


"John McGhie [MVP -- Word]" <Jo...@McGhie-Information.com.au> wrote in
message news:uvHnIVxvAHA.912@tkmsftngp03...

0 new messages