![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Microsoft Office support MS Office support forum |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Aug 2009
Posts: 26
OS: Vista
|
How to generate documents with multiple styles based on the similar text
I need to generate several variations of basically the same document. The different variations are for different companies, each with its own cover page design, back page design, overall style, etc. Each company also has their own model numbers and so forth.
At first, it seemed that the best method would be to set up a template (master document) for each company with cover page, back page, headers and footers, and styles set up. Then use an INCLUDETEXT field to import the text (subdocument). The company names, model numbers, and so forth could be set up as custom variables in the master document, and appropriate locations in the text would use DOCPROPERTY fields to display the correct value for that company. It seems to be working ok, except for the formatting... If I use MERGEFORMAT in the INCLUDETEXT field, the result uses the headers and footers I have set up in the master document, but the formatting of other elements is a crapshoot. Some Heading 1 elements might come in as TOC3. Some text elements in the middle of a paragraph might be set to bold in a different font. Etc. Apparently at random. If I remove the MERGEFORMAT, the headings come in properly (i.e. Heading 1 is Heading 1, not TOC3 or Normal or whatever else), but I lose the header and footer styles that I want defined by the master document. The subdocument has multiple sections; I imagine that could make a difference. Is there a way to do what I want in Word or am I doing something wrong? Thanks -drew
|
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
TSF Enthusiast
Join Date: Apr 2008
Location: Australia
Posts: 564
OS: Vista
|
Re: How to generate documents with multiple styles based on the similar text
Hi drewkeller,
The MERGEFORMAT switch has always been problematic. The important thing to remember about INCLUDETEXT fields is that the Style definitions in the target document take precedence over the Style definitions in the source document(s). If there is a particular format you want to carry over into the target document, the best way to do this is to use a Style in the source document that doesn't exist in the target document.
__________________
Cheers macropod (MS MVP -Word) |
|
|
|
|
|
#3 (permalink) |
|
Registered User
Join Date: Aug 2009
Posts: 26
OS: Vista
|
Re: How to generate documents with multiple styles based on the similar text
Macropod: Thanks for answering. I've seen a few other of your posts that have been very helpful.
The method that seems to be working is to select and bookmark each section of the subdocument (source?) separately, being careful to NOT include any section breaks. Then, in the master document (target?), use INCLUDETEXT fields pointing to each bookmark. Apparently, the header/footer definitions for a section reside within its section break, so the break should not be included in the bookmark. Conversely, if I use the text document as the master document, I can bookmark section breaks in the styles documents and that would import the header/footer from the styles document (using a variable in the master document to point to the correct styles document). Word seems a bit flaky with relative paths and various other things... I'm not sure which of those two methods is more robust. Perhaps they are equal. The next step is what to do about illustrations. I'm thinking something along the lines of setting a document property with the name of a document containing images for that company. And then use something like {INCLUDEIMAGE "{FILENAME \p}\\..\\{DOCPROPERTY ImagesDoc}" ImageBkmk} for each illustration. Or perhaps keep images in separate folders and access them more directly.... {INCLUDEIMAGE "{FILENAME \p}\\..\\{DOCPROPERTY CompanyName}\\ImageName.eps"} (Looks familiar, eh?) http://www.wopr.com/index.php?showtopic=670027 I've had some issues with these kinds of references. I get an error that gets resolved by simply closing Word and then reopening the document. Maybe your macro helps that issue; I should probably check it out. Thanks -drew |
|
|
|
|
|
#4 (permalink) |
|
TSF Enthusiast
Join Date: Apr 2008
Location: Australia
Posts: 564
OS: Vista
|
Re: How to generate documents with multiple styles based on the similar text
Hi Drew,
For images, you should be using INCLUDEPICTURE, not INCLUDEIMAGE. Perhaps that's the cause of the 'issues' you've had?
__________________
Cheers macropod (MS MVP -Word) |
|
|
|
![]() |
| Thread Tools | |
|
|