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:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* 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
Go Back   Tech Support Forum > Microsoft Support > Microsoft Office support
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read


Microsoft Office support MS Office support forum

Reply
 
LinkBack Thread Tools
Old 08-02-2009, 07:23 AM   #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

drewkeller is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
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

Old 08-02-2009, 05:55 PM   #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)
macropod is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 08-02-2009, 09:58 PM   #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
drewkeller is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 08-04-2009, 01:34 AM   #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)
macropod is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -7. The time now is 03:06 PM.



Copyright 2001 - 2009, Tech Support Forum
Home Tips Plus | Outdoor Basecamp | Automotive Support Forum

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85