locked
Word: Maintain formatting of inserted files RRS feed

  • Question

  • I apologize for replying to an old thread, I hope this is not too much against forum protocol, but the original poster is trying to accomplish something very similar to what I need to do.  So I'm hoping for clarification on the best approach as our needs are just slightly different.

    I will soon have the need to assemble about 30 documents into a single document.  Each of the source documents is written by a different author and I will need to preserve the majority of their formatting, but I will need to do some editing in the master document such as making sure that footers and table numbers are consistent, but other than that I really need to keep source document formatting (especially for tables as we have lots of tables that barely fit on the page and have had the margins tweaked perfectly in the source document to make things work).  When I get the source documents I only have about an hour to assemble them into a completed master document, so minor editing, and then convert to PDF for distribution.

    What is the best approach to take for this type of task.  I've been doing lots and lots of reading to try and learn to use Word more as it was intended, but still feel like I'm banging my head against the wall.

    Thanks very much for any help, and I again apologize if this is not the correct place to ask this.

    Dylan
    • Split by Cindy Meister MVP Saturday, December 20, 2008 8:49 AM To give better visibility. refers to http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/7be0038d-7db5-49e5-a7f2-880328e7c3da
    Friday, December 19, 2008 7:36 PM

Answers

  • Hi Dynlane

    Are you doing this as part of a VSTO add-in? Or are you asking the quesiton as an end-user who has to perform this task?

    In either case, the best place to find information about how to handle this would be the Word newsgroups. The Word group for "General questions", that you can find over the "Office newsgroups site" listed in the Please Read First message would be the best place to just discuss how word behaves. And I believe there is some good information at word.mvps.org. When you post questions, please do remember to mention the version of Word involved.

    The question to which you originally posted handled a very specific circumstance, to which I could provide a reasonably straight-forward answer. All the aspects you want to cover can become very complicated, very quickly, and isn't really on-topic for this forum. I can only provide some "get you started", framework guidance, as it could be of interest to VSTO developers.

    1. This PDF file contains some good, basic information about how to work with Master documents. Much of the information about how to set things up and manage the files also applies to merging documents using Insert-File or the IncludeText field. Some of the points I list below are contained in that file, but I repeat them here to help make this overview more understandable.
    2. Whenever you want to merge multiple documents, set up a template file that should be used for creating ALL the documents. This template needs to contain everything the user might require, including styles* for the formatting and numbering, headers, footers, page numbering, etc.
      1. Users should not use anything else, no matter how tempted they might be, as this would make your job of pulling things together more or less impossible. So have intense discussions before-hand about what the users might require
      2. Agree on a protocol for things that should be numbered, such as figures or tables. Word's built-in Insert/Caption can do the work, but it has to be set up correctly. As caption labels, etc. are stored in the user profile, rather than the document, distribute a step-by-step instruction on how to set this up. Or create a macro in the template to do it for the user.
      3. Set up "tools" (toolbars, ribbon tabs, custom task pane, as appropriate) to make it easy for the users to do the right thing. If they don't go looking, they won't use the wrong thing. Provide instructions about the tool interface and why the user needs to work with it.
    3. If certain kinds of things will be needed repeatedly, such as the tables you mention, create a set of AutoText entries stored in the template. Also create an interface for inserting these.
    4. Retaining margins, headers, footers, newspaper columns. Please reference this discussion.
     * Formatting in Word bases on styles. Word comes with a number of built-in styles, such as Normal, Heading 1, Heading 2, etc. ALL text in a document is formatted with a style, by default "Normal". When two documents are brought together, if text in the in-coming document is formatted with a style present in the target document, the style definition of the target document applies. To retain individual formatting, text in the in-coming document must be formatted with a style (name) not present in the target document.
    Cindy Meister, VSTO/Word MVP
    Saturday, December 20, 2008 9:20 AM

All replies

  • Hi Dynlane

    Are you doing this as part of a VSTO add-in? Or are you asking the quesiton as an end-user who has to perform this task?

    In either case, the best place to find information about how to handle this would be the Word newsgroups. The Word group for "General questions", that you can find over the "Office newsgroups site" listed in the Please Read First message would be the best place to just discuss how word behaves. And I believe there is some good information at word.mvps.org. When you post questions, please do remember to mention the version of Word involved.

    The question to which you originally posted handled a very specific circumstance, to which I could provide a reasonably straight-forward answer. All the aspects you want to cover can become very complicated, very quickly, and isn't really on-topic for this forum. I can only provide some "get you started", framework guidance, as it could be of interest to VSTO developers.

    1. This PDF file contains some good, basic information about how to work with Master documents. Much of the information about how to set things up and manage the files also applies to merging documents using Insert-File or the IncludeText field. Some of the points I list below are contained in that file, but I repeat them here to help make this overview more understandable.
    2. Whenever you want to merge multiple documents, set up a template file that should be used for creating ALL the documents. This template needs to contain everything the user might require, including styles* for the formatting and numbering, headers, footers, page numbering, etc.
      1. Users should not use anything else, no matter how tempted they might be, as this would make your job of pulling things together more or less impossible. So have intense discussions before-hand about what the users might require
      2. Agree on a protocol for things that should be numbered, such as figures or tables. Word's built-in Insert/Caption can do the work, but it has to be set up correctly. As caption labels, etc. are stored in the user profile, rather than the document, distribute a step-by-step instruction on how to set this up. Or create a macro in the template to do it for the user.
      3. Set up "tools" (toolbars, ribbon tabs, custom task pane, as appropriate) to make it easy for the users to do the right thing. If they don't go looking, they won't use the wrong thing. Provide instructions about the tool interface and why the user needs to work with it.
    3. If certain kinds of things will be needed repeatedly, such as the tables you mention, create a set of AutoText entries stored in the template. Also create an interface for inserting these.
    4. Retaining margins, headers, footers, newspaper columns. Please reference this discussion.
     * Formatting in Word bases on styles. Word comes with a number of built-in styles, such as Normal, Heading 1, Heading 2, etc. ALL text in a document is formatted with a style, by default "Normal". When two documents are brought together, if text in the in-coming document is formatted with a style present in the target document, the style definition of the target document applies. To retain individual formatting, text in the in-coming document must be formatted with a style (name) not present in the target document.
    Cindy Meister, VSTO/Word MVP
    Saturday, December 20, 2008 9:20 AM
  • Hi Cindy,

    Thank you very much for this information and the links to other references, I am going through them now.  I apologize that this is an off topic discussion, I am asking this question as an end-user not a developer.  I was not originally using any add-in's but did find Graham Mayor's very useful Boiler add-in which has made assembling documents some what easier.

    It sounds like I am going to have difficulty doing what I need to do in an efficient way, since I have no control over the original documents.  They are all being written in different offices, and many times are written by people outside of our organization using many different versions of Word.  We use 2003 throughout our organization, but pieces are written using anything from Word 2000 - 2007.

    Anyway, I will check out the resources you mention, and ask any further questions in the appropriate forum.  Once again, thank you for your time.

    Best regards,
    Dylan
    Monday, December 22, 2008 5:37 PM