Results 1 to 10 of 10
  1. #1
    4 Star Lounger
    Join Date
    Mar 2002
    Location
    Sacramento, California, USA
    Posts
    509
    Thanks
    4
    Thanked 1 Time in 1 Post

    Using master documents... or not!

    I've got a problem which could, in theory, be solved by defining master documents.

    The last time I encountered master documents (around Word 97) they had a reputation for behaving weirdly and corrupting files. I believe Microsoft had dragged them through several releases of Office without getting them to work reliably.

    I need to know what has happened since then. Are they (as of Word 2010) considered reliable? Or should I continue to stay away from them?

    I tried defining a master document of the type I need, and it seems to work, but I encountered several bits of weirdness. These could be just the type of bad behavior that afflicted master documents from their birth, or it could be just details that I don't understand. Can anyone explain?

    First: the structure of my master document is essentially this:

    1. Inserted subdocument
    2. New-page section break
    3. Additional text

    The subdocument defines a header and footer. I need to define a new footer for the additional text, but I can't. When I display the footer, a tab above its right margin says "Same as Previous." I should be able to make it independent of the previous section by clicking the header/footer toolbar's "Link to Previous" item, but that item is disabled.

    I can't even edit the footer definition -- which kind of makes sense if the footer's definition is Same as Previous and the previous section is defined in a different file.

    Second: I need to insert references to the content of the subdocument in the additional text. For references to bookmarks and tables, this works just as it would if the targets and references were in the same document. For references to section headings, it doesn't work. The Cross-reference dialog lets me select the headings and click Insert... but nothing gets inserted.

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  3. #3
    4 Star Lounger
    Join Date
    Mar 2002
    Location
    Sacramento, California, USA
    Posts
    509
    Thanks
    4
    Thanked 1 Time in 1 Post
    It looks like bottom line is: the master document feature is still a black hole. That leaves me with the problem of what to do instead.

    I looked at the MVP references and didn't find a lot. Most of them concern how to build large documents, which isn't my problem. The TechTav macro suite appears to contain essentially what I need, but it will have to be modified, and at this point I don't know if it's even distributed in modifiable form.

    Here's the problem: I have a document of moderate length (I eventually will have several of them). I need to add a short supplement for each of an open-ended number of users which contains information specific to that user. Each item in each supplement is keyed to the affected item in the original document.

    For example, part of a supplement might look like this:


    Section 3.1, "How to make chocolate milk," page 8.

    Some information.


    Section 4.1.5, "Tse-tse flies and milk production in the Tanzanian highlands," page 27.

    Some information


    Section 7, "Long-term milk storage", page 45.

    Some information.


    And so on.

    My first solution was to make each user's supplement a master document which includes the base document and contains the notes in a final section at the end. Word has access to bookmarks in the base document (although apparently not to headings), allowing the master document to contain cross-references to the base. Given the warnings you referred me to, though, I'm going to have to find another way to get the same result.

    Can you make any specific suggestions?

  4. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    You can achieve much the same result via INCLUDETEXT fields in the target document, pointing to bookmarked ranges in a souce document. Basically, what you'd do is to create a source document containing the bookmarked user-specific data. You would then use, say, an ASK field or a bookmarked FILLIN field in the target document to solicit which user data to use. Once the ASK/FILLIN field is updated, a print preview (or Ctrl-A, F9) should update the content in the target document. Alternatively, you might use Word's 'Author' property, for example, as the key to the bookmarks.

    A better approach, though, might be to hold the variable data in an Excel workbook, with a column for each attribute (ala mailmerge). You could then have a Document_Open (or Document_New) macro populate either:
    • the document directly, based on Word's 'Author' property, for example; or
    • a dropdown content control in the document. The user selects an entry from the list'
    and the document is updated using standard vba mailmerge code.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  5. #5
    Star Lounger
    Join Date
    May 2007
    Location
    Gloucester, Gloucestershire
    Posts
    60
    Thanks
    1
    Thanked 0 Times in 0 Posts
    For what it's worth, I am using master/subdocuments (for the first time) in Word 2010. The only problems I have encountered are when trying to add a new subdocument to the master document - it sometimes takes a couple of attempts.

    To add cross-references to other subdocuments, you first have to expand all subdocuments so that you see the document as a whole. Not sure if this will help with the header/footer issue, but it allows you to add cross-references to sections in the master document or any subdocument.

    Anne

  6. #6
    4 Star Lounger
    Join Date
    Mar 2002
    Location
    Sacramento, California, USA
    Posts
    509
    Thanks
    4
    Thanked 1 Time in 1 Post
    macropod, I didn't entirely understand your suggestions... I think because they don't precisely address the problem I'm trying to solve. First, it's not clear what I'd enter at the ASK prompt. A prefix for a series of bookmarks that define information for one reader? That's all I could think of, but I have trouble imagining what I'd do with the prefix once I had it. Any solution I can think of would require writing macros... which I can do, but I think there must be a more efficient way to solve the problem.

    I also don't understand how to get a page or section number reference to the base document. As far as I can see, INCLUDETEXT will include the contents of a bookmark only (not the page it's on or the section number of the heading it's in).

    From my intuitions about your first solution and from your second solution, I suspect you're assuming that every user's user-specific items apply at the same points in the base document. That would be true if the user specific information were stuff like "Your username is (....) and your password is (....)." In my case, though, the items describe custom software changes, and they apply wherever the base document describes a feature that has been customized. There's no reason to expect even that every user will have the same number of user-specific items. One might have three; another, 47.

    Fortunately for me, I've received new marching orders, and this problem has changed from one I must solve now to one I might have to solve someday, or might not. So... I appreciate your efforts and I'm still interested in what you can suggest if you want to pursue this, but it's no longer something I need.

  7. #7
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Quote Originally Posted by jsachs177 View Post
    macropod, I didn't entirely understand your suggestions... First, it's not clear what I'd enter at the ASK prompt. A prefix for a series of bookmarks that define information for one reader? That's all I could think of, but I have trouble imagining what I'd do with the prefix once I had it.
    You have the thrust of the ASK field usage. The INCLUDETEXT field would be coded along the lines of:
    {INCLUDETEXT "Some document path & name" "{REF BkMk}01"}
    where 'BkMk' is the bookmark your ASK field uses and the '01' refers to the index number of the corresponding portion of the bookmark in the source document (eg a user might have entries in the source document bookmarked Sachs01 - Sachs03 or even Sachs01 - Sachs47).
    I also don't understand how to get a page or section number reference to the base document. As far as I can see, INCLUDETEXT will include the contents of a bookmark only (not the page it's on or the section number of the heading it's in).
    I'm not sure how that's relevant - I thought you your after the content, not the page on which it appears in the source file.
    From my intuitions about your first solution and from your second solution, I suspect you're assuming that every user's user-specific items apply at the same points in the base document. That would be true if the user specific information were stuff like "Your username is (....) and your password is (....)." In my case, though, the items describe custom software changes, and they apply wherever the base document describes a feature that has been customized. There's no reason to expect even that every user will have the same number of user-specific items. One might have three; another, 47.
    That's the beauty of the mailmerge approach: it doesn't matter whether all the fields in the data source are completed or whether you reference them in the mailmerge main document. Obviously, if you reference an empty field, nothing will show up, but that may be preferable to having a cross-refernce (whether via an INCLUDETEXT field or otherwise) pointing to a non-existent bookmark.
    I've received new marching orders, and this problem has changed from one I must solve now to one I might have to solve someday, or might not.
    Lucky you!
    Last edited by macropod; 2013-04-09 at 21:26.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  8. #8
    4 Star Lounger
    Join Date
    Mar 2002
    Location
    Sacramento, California, USA
    Posts
    509
    Thanks
    4
    Thanked 1 Time in 1 Post
    Actually the page numbers and section numbers are more important than the text because they're more changeable. I could type the text of a section heading into the document if I had to; it would be a nuisance to have remember to change it when a heading changed; but that would rarely happen. If I couldn't generate the page numbers, though, I'd have to update them every time the base document was edited. If I couldn't generate the section numbers I'd have to update them when any heading in the base document was added or deleted.

  9. #9
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Anne - you have been lucky, so far

    John McGhie put it succinctly when he said that "there are two kinds of Master Documents: Those that are corrupt and those that will be corrupt soon." It was reported fixed in Word 2007, but "The jury is in: The Master Document feature in Word 2010 remains word processing's answer to Conan the Destroyer. Use it only if you enjoy pain and frustration." Microsoft Word 2010 Bible by Herb Tyson, MVP. "Since its inception, the Master Documents feature has been a bit quirky and buggy, and that fact hasn't changed with Word 2010, unfortunately." Microsoft Word 2010 In Depth by Faithe Wempen, p. 681

    If you use Master Documents, do so only for printing. Do not edit anything from within the Master Document framework.
    Charles Kyle Kenyon
    Madison, Wisconsin

  10. #10
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Quote Originally Posted by jsachs177 View Post
    Actually the page numbers and section numbers are more important than the text because they're more changeable.
    In that case, I suggest you stick with having all of the content in a single document. As Word can handle files out to 512Mb in size, that should be enough to manage your requirements.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  11. The Following User Says Thank You to macropod For This Useful Post:

    Charles Kenyon (2013-04-17)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •