The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

Word 2007 and Master Documents (Or Alternatives?)

LaOsLaOs SaskatoonRegistered User regular
edited March 2009 in Help / Advice Forum
So, I've read some things about Word and Master Documents in the past, and the consensus seemed to be that they were not necessarily worth the trouble and corrupted easily. I guess, anyway.

So now my boss wants me to make a Master Document type thing for our policies and procedures manual. What I've been tasked with doing is creating a single file that collects the content of multiple individual Word files. The Main file should update whenever the individual files are updated, but someone should be able to just print off the Main file and it would have all the individual files with it. It's kind of a big project, I guess.

I have started looking into using the Master Document abilities of Word 2007, but I'm just fumbling around and haven't enjoyed the results I've received so far.

My other thought was to actually treat the whole project like a little website, with the Main page inserting the content of the subpages (like with I've done with some basic CSS in the past). The only problem with that would be that my boss wants to be able to easily edit the content of the subpages like she can in Word, so a WYSIWYG editor would seem necessary. Which editors appear/operate as closely to Word does? I remember FrontPage basically looking and acting like Word, but we don't have that (does it exist anymore?). We've got Office 2007 Enterprise, to give you an idea of some software we have available.

So, what would you recommend for this project?

LaOs on

Posts

  • DrFrylockDrFrylock Registered User regular
    edited March 2009
    A couple colleagues and I wrote a large book in Word, so I'm well familiar with the problem. I was our Word Wrangler for the project.

    I never could figure out exactly how Master Documents were supposed to work; I got terrible performance, and never could get things looking or behaving right.

    What I ended up doing was creating a macro in our book template called MakeABook. It looks like this:
    Sub MakeABook()
        Dim tocloc As Long
        
        Dim filenames(1 To 18) As String
        filenames(1) = "Chapter01.doc"
        filenames(2) = "Chapter02.doc"
        filenames(3) = "Chapter03.doc"
        filenames(4) = "Chapter04.doc"
        filenames(5) = "Chapter05.doc"
        filenames(6) = "Chapter06.doc"
        filenames(7) = "Chapter07.doc"
        filenames(8) = "Chapter08.doc"
        filenames(9) = "Chapter09.doc"
        filenames(10) = "Chapter10.doc"
        filenames(11) = "Chapter11.doc"
        filenames(12) = "Chapter12.doc"
        filenames(13) = "Chapter13.doc"
        filenames(14) = "Chapter14.doc"
        filenames(15) = "Chapter15.doc"
        filenames(16) = "Chapter16.doc"
        filenames(17) = "Chapter17.doc"
        filenames(18) = "Chapter18.doc"
    
        With Dialogs(wdDialogFileOpen)
            If .Display = -1 Then
                ' Get Path
                ChangeFileOpenDirectory WordBasic.FileNameInfo(.Name, 5)
                
                Selection.HomeKey Unit:=wdStory
                
                Selection.InsertFile FileName:="InitialMatter.doc", Range:="", _
                    ConfirmConversions:=False, Link:=False, Attachment:=False
                Selection.EndKey Unit:=wdStory
                Selection.InsertBreak Type:=wdSectionBreakNextPage
                Selection.EndKey Unit:=wdStory
                
                tocloc = Selection.Start
                    
                Selection.InsertFile FileName:="Preface.doc", Range:="", _
                    ConfirmConversions:=False, Link:=False, Attachment:=False
                Selection.EndKey Unit:=wdStory
                Selection.InsertBreak Type:=wdSectionBreakNextPage
                Selection.EndKey Unit:=wdStory
                
                Selection.InsertFile FileName:="Acknowledgments.doc", Range:="", _
                    ConfirmConversions:=False, Link:=False, Attachment:=False
                Selection.EndKey Unit:=wdStory
                Selection.InsertBreak Type:=wdSectionBreakNextPage
                Selection.EndKey Unit:=wdStory
                
                For i = 1 To 18
                    Selection.InsertFile FileName:=filenames(i), Range:="", _
                        ConfirmConversions:=False, Link:=False, Attachment:=False
                    Selection.EndKey Unit:=wdStory
                    Selection.InsertBreak Type:=wdSectionBreakNextPage
                    Selection.EndKey Unit:=wdStory
                Next i
                
                SetupNumberingStyles
                
                'Selection.HomeKey Unit:=wdStory
                Selection.Start = tocloc
                Selection.End = tocloc
                
                Selection.Style = ActiveDocument.Styles("Chapter Number")
                Selection.TypeText Text:="Table of Contents"
                
                With ActiveDocument
                    .TablesOfContents.Add Range:=Selection.Range, RightAlignPageNumbers:= _
                        True, UseHeadingStyles:=True, UpperHeadingLevel:=1, _
                        LowerHeadingLevel:=3, IncludePageNumbers:=True, AddedStyles:="", _
                        UseHyperlinks:=True, HidePageNumbersInWeb:=True
                    .TablesOfContents(1).TabLeader = wdTabLeaderDots
                    .TablesOfContents.Format = wdIndexIndent
                End With
                
                Selection.WholeStory
                
                With CaptionLabels("Figure")
                    .NumberStyle = wdCaptionNumberStyleArabic
                    .IncludeChapterNumber = False
                    .ChapterStyleLevel = 1
                    .Separator = wdSeparatorHyphen
                End With
                
                With CaptionLabels("Figure")
                    .NumberStyle = wdCaptionNumberStyleArabic
                    .IncludeChapterNumber = True
                    .ChapterStyleLevel = 1
                    .Separator = wdSeparatorHyphen
                End With
                
                Selection.WholeStory
                Selection.Fields.Update
            
            End If
        End With
        
    End Sub
    

    The way it would work is that we could each edit our individual chapters (which we kept in a SVN repository). Then, if someone wanted to stitch together a book, you would double-click the template (to create a blank document with this template) and run the macro. It throws up a dialog box asking you to locate a file in the directory with the chapter files in it, and then iterates through them basically doing a Ctrl+End (to get to the end of the document), Insert->File on the next chapter, then adds a section break. The remainder cleans up styles and figure caption styles throughout the document and inserts a table of contents at the right place.

    This worked more or less fine. I had trouble because at some point one of our documents had an issue with a table style somehow bleeding out of the table and getting applied to stuff it shouldn't have, which screwed up the whole result. Some sort of weird Word bug. I eventually nuked all the table styles and that fixed the problem. The total manuscript was something like 1000 pages in our Word template, and performance was acceptable this way. Ultimately, we didn't have to worry about master document corruption and stuff because the chapters remained separate until you bound them into a full book .doc, which you could then print or email or PDF or whatever.

    DrFrylock on
  • LaOsLaOs SaskatoonRegistered User regular
    edited March 2009
    Well, I will look more closely at this when I get back to work on Monday, but thanks.

    The problems I encountered with my brief test was that when I inserted subdocuments, I couldn't specify a continuous section break instead of a new page section break, and when I saved and re-opened the Master, it had a link to the subdocuments with some of the content loaded as it should have been... it was very strange. It also, in one case, saved content from the master into the subdocument, altering that document. So weird... but I'll admit I didn't dedicate much more than fifteen minutes to the project today.

    Thanks for your help and I'll revisit this on Monday. Anymore advice/help is appreciated.

    LaOs on
  • mkissinmkissin Registered User regular
    edited March 2009
    I'm not sure if this is where you got your initial information from, but the Word MVP site (http://word.mvps.org/faqs/general/whymasterdocscorruptcontent.htm) has this to say about master documents:
    A master document has only two possible states: Corrupt, or just about to be corrupt. And that is why we say that the only possible fix to a master document is “don't use it!”

    I've always avoided master documents myself. I wrote a 250 page thesis in word, and although version 2007 is much better than the previous versions, it still does bizarre and annoying things at times.

    This site: http://www.techwr-l.com/articles/general/masterdocs has some good information on using master docs, if you really must.

    mkissin on
  • LaOsLaOs SaskatoonRegistered User regular
    edited March 2009
    mkissin wrote: »
    I'm not sure if this is where you got your initial information from, but the Word MVP site (http://word.mvps.org/faqs/general/whymasterdocscorruptcontent.htm) has this to say about master documents:
    A master document has only two possible states: Corrupt, or just about to be corrupt. And that is why we say that the only possible fix to a master document is “don't use it!”

    I've always avoided master documents myself. I wrote a 250 page thesis in word, and although version 2007 is much better than the previous versions, it still does bizarre and annoying things at times.

    This site: http://www.techwr-l.com/articles/general/masterdocs has some good information on using master docs, if you really must.

    I'd come across a few difference sources that say the same thing as Word MVP. I had actually even come across the link you provided there, back when I originally took a look at this project. I was unable to re-find that link, though, so I definitely appreciate you bringing it up.

    LaOs on
Sign In or Register to comment.