![]() |
#1
|
|||
|
|||
![]()
I am working on documents with a vendor to my company, and we need to share documents to develop them jointly (with doc control of course). We would also be sharing a template, but all the front matter would be different.
One approach would be for each company to have a front-matter document for each shared publication, and when appropriate, copy the contents of the shared document into the company-specific one. A previous posting of mine asked about IF fields governed by the Company docproperty. If the company-specific document has the Company value, could that apply to the shared material that would be copied in? Is there a better way to do the whole thing than what I just described? Thanks for any advice-- I hope I'm not in over my head. |
#2
|
||||
|
||||
![]()
If I understand your description correctly, the two companies have documents with common content but different front matter. For such a situation, the simplest approach might be to create the stand-alone body document and for the users in each company to use an INCLUDETEXT field pointing to that document wherever it is stored on their system. An equally viable solution might be to embed an INCLUDETEXT field in the stand-alone body document that points to a file that contains the front matter. The documents containing the front matter for each company, though different, would have to be saved with the same filename. If the path on each system to that document is the same, that's all that would be needed; if not, you'd need to modify the INCLUDETEXT field in the stand-alone body document to use relative file paths, as per the field code solution I've posted at:
http://windowssecrets.com/forums/sho...External-Files
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Another method would be to use AutoText. The AT entries would be stored in separate global templates, one for each company, on that company's system loaded as Global Templates. Your front matter would have AutoText fields which would get their content from the global template loaded on the computer. The AutoText for this is not stored in your document's template because you want it to change based upon location.
I used this method to design letterhead for a law firm with over 50 offices that had different personnel and addresses on the letterhead depending on the location. Automated Boilerplate Using Microsoft Word The choice of using AutoText fields vs. IncludeText fields is yours. Either one is about as difficult and AFAIK they will work about equally well. I've been using AutoText for so long that I seldom use IncludeText fields. So long as things are set up properly, they are pretty much transparent to the end user. And yes, you probably could use IF fields, but that would be doing it the hard way and would require a fair amount of field coding. |
#4
|
|||
|
|||
![]()
Thanks for both responses. Using various suggestions in this forum, I'm using INCLUDETEXT fields as the two alternatives for an IF field, to bring in text that is specific to just one company or the other. This is especially useful for the front matter, but it's turning out possibly too complex for Word. For some reason the first few paragraphs (actually the title, pub number, etc) aren't brought in. And when I switch from one company to the other, one little logo graphic from the first company is left anchored in the header of the cover page (which the other company might not appreciate). In other words, these packages aren't air-tight. Any further suggestions in how to make the INCLUDETEXT behave more "neatly"?
|
#5
|
||||
|
||||
![]()
The issue isn't one of complexity but of what's in the source document -vs- what's in the target document. All of the variable content needs to be in the source document (i.e. the one referenced by the INCLUDETEXT field(s). It appears that, in the target document, you still have some of the content that's supposed to be variable. The other possibility is that one of your INCLUDETEXT fields can't find its referenced content and therefore isn't updating. Note that, if you bookmark different ranges in the source document, you can use a different INCLUDETEXT field in the target document to reference each one, thus inserting the variable content in different places.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#6
|
|||
|
|||
![]()
Since my first posting, I've realized that the main body of the publication needs to be the shared document I need to have one shared To return to the INCLUDETEXT field, it would be preferable to have the shared document contain all the company-specific text, using a conditional function that would hide each "chunk" for the company that does not need it (with no resulting gap). I haven't found a way to do this-- is there a way to do it?
|
#7
|
||||
|
||||
![]()
You can embed INCLUDETEXT fields inside IF fields, but that's unlikely to get you any closer to what you want, because you'd still need to have a separate INCLUDETEXT field pointing to the specific content you want the IF fields to evaluate. The only scenario I can see that being useful is when you need to test whether the source exists; not what logo (for example) it contains.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#8
|
|||
|
|||
![]()
My question (even after revision) wasn't too clear. Right now, my shared document uses this for any company-specific text, pulling in separate files:
{IF {DOCVARIABLE CompanyName }="Acme" "{ INCLUDETEXT "Acme numbers.docx" }" "{ INCLUDETEXT "Apex numbers.docx" }" } The above approach works but of course requires multiple additional files. It would be much better to have the specific pieces of text as part of the main document, but appear only when the appropriate company is set. |
#9
|
||||
|
||||
![]()
As I said previously, all the content can exist in a single file. Simply bookmark the ranges spanned by the various bits and use the bookmark references in the corresponding INCLUDETEXT fields. If one of the companies needs a bookmarked range the other doesn't, simply insert a corresponding empty bookmark into the second company's document. There is no need for an IF field. Neither is there any need for the DocVariable.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#10
|
|||
|
|||
![]()
I want to have just one document, which is shared by the two companies, so I don't understand where the bookmarked text is. I don't see how a bookmark can be used to not display text that is part of the document. (But I hope it can-- that would be the solution.) Sorry if I'm being dense here.
|
#11
|
||||
|
||||
![]()
There is no way you can implement this with just one document. By definition, an INCLUDETEXT field refers to an external document, so that means having two documents. The whole point of what I've been trying to get across is that each company can have it's own source document, whose content they can change as needed, without having to update anything 'shared'. With the approach I'm suggesting, no-one needs to update a DocVariable, either.
I said nothing about a bookmark being used 'to not display text that is part of the document'. Rather, and empty bookmark can be used to avoid errors that an INCLUDETEXT field might produce if the bookmark were missing altogether. Quite a different proposition.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#12
|
|||
|
|||
![]()
I understand your explanation now, but I need the "company" docvariable to toggle a bunch of company-specific terms, and I want to require the author to toggle both the terms and the included text in one step. (So there can't be a file with Acme's included text and Apex's terms.)
But my IncludeText fields so far work only partially, in these ways: - {IF {DocVariable cond} {IncludeText "file"} {...} } brings in the whole file. - {IncludeText "file" bookmark} brings in the bookmarked text. But so far I can't do something like {IF {DocVariable cond} {IncludeText "file" bookmark} {...} } Haven't found an explanation for doing this. Thanks in advance for help. |
#13
|
||||
|
||||
![]()
Somehow, I still think you don't 'get' it.
An INCLUDETEXT field that uses a relative path to reference a bookmarked range in a source document would be constructed along the lines of: {INCLUDETEXT "{FILENAME \p}/../SourceDoc.docx" "BookmarkName"} In this scenario, both the Acme and Apex companies would use their own versions of SourceDoc (i.e. both companies would have a document named 'SourceDoc.docx'). That document would hold all the variable data for the compnay concerned. Each company's source document would also use the same bookmark names. The target document would hold both the boilerplate text and the INCLUDETEXT fields that reference only SourceDoc.docx plus the relevant bookmark names. With the above approach, no Document Variable or DOCVARIABLE field is required. You would only need the Document Variable and DOCVARIABLE fields if you wanted to specify the source document: • path; • name; and/or • bookmark. For example, to specify the: • path, you might use: {INCLUDETEXT "{IF {DOCVARIABLE Company}= "Acme" "C:/Acme/SharedFiles/" "H:/Apex/SomeFolder/"}SourceDoc.docx" "BookmarkName"} where 'Acme' or 'Apex' is part of the path (other variable name text could be used instead of 'Acme' or 'Apex') • name, you might use: {INCLUDETEXT "{FILENAME \p}/../{IF {DOCVARIABLE Company}= "Acme" "Acme" "Apex"}Source.docx" "BookmarkName"} where 'Acme' or 'Apex' is part of the filename (other variable name text could be used instead of 'Acme' or 'Apex') • bookmark, you might use: {INCLUDETEXT "{FILENAME \p}/../SourceDoc.docx" "{IF {DOCVARIABLE Company}= "Acme" "Acme" "Apex"}BookmarkName"} where 'Acme' or 'Apex' is part of the bookmark name (other variable name text could be used instead of 'Acme' or 'Apex'). The first and second DOCVARIABLE approaches envisage separate source documents for each company. If you use the third DOCVARIABLE approach, perhaps even when combined with the first one, that allows you to maintain a single source document for both companies, with the variable content differentiate by the bookmark names. Any of these approaches allow you to "require the author to toggle both the terms", but I can't see why you'd want to do that. Surely you wouldn't want staff at Acme & Apex switching Document Variables so they can get access to each other's content and maybe even fake each other's letters!?? If you're concerned to test the development, simply use: • a field along the lines of: {INCLUDETEXT "{FILENAME \p}/../SourceDoc.docx" "BookmarkName"} • maintain separate source documents for Acme and Apex; and • copy the Acme or Apex source documents to SourceDoc as required.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#14
|
|||
|
|||
![]()
Revision: I looked harder at your explanation, and it already includes the need to toggle the value, so it works. You're right... thanks.
|
#15
|
|||
|
|||
![]()
Maybe this should be a separate thread but it relates to your solution, which I'm using. I like the simplicity of putting the shared document and the document of inserted text in the same folder, so that no pathname is needed. But I am running into the issue of Word's treatment of relative paths, getting "Invalid file name" some of the time. I've read the explanation, affected by which document was opened most recently and which folder is considered current. But this is hard to understand, and I have to make it easy for the other company. Is there a simple way to explain how to make the relative path (that is, no path specified) work correctly?
[Later] Using a hint on a web page, I added the following to my two macros that reset the DocProperties: Application.DefaultWebOptions.UpdateLinksOnSave = False Would like anyone's opinion whether this will prevent the problem. |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Same values of variables in word add-in are being shared across multiple document | naq.abbas@gmail.com | Word | 0 | 01-13-2014 10:41 AM |
![]() |
Joyce | Word | 3 | 07-12-2013 08:54 AM |
![]() |
AquaSabes | Excel | 1 | 09-22-2011 02:29 AM |
![]() |
hoorayhooray | Chitchat | 1 | 05-19-2010 10:39 AM |
Office 2003 docs containg JPG Image to 2007 Document | Sandip Dangat | Drawing and Graphics | 5 | 10-30-2009 06:27 AM |