Displaying Conditional Content in Word 2007

D

DD

I'm looking for recommendations on creating and managing conditional content
in Word. Examples may be:

1. I have a resume that has slightly different content for different
industries' jobs I'm applying for. For example, in my last job in the
"Experience" section, I may want to put three bullet points with text for my
"manufacturing industry" resume and two of the same bullets of from the first
list and another new bullet point (also hiding one of the bullet points from
the first resume) for my "financial industry" resume. If I want to add a 3rd
industry to apply for, such as the medical industry, maybe I just want to
replace certain words in an existing financial industry bullet, for example,
replacing the word "Sarbanes-Oxley" with "HIPAA".

2. I am creating a course on a subject. The end result will be 3 seperate
documents - Instructor Guide, Participant Guide and Classroom Logistics
Guide. The Instructor Guide will include the Participant Guide and Classroom
Logistics Guide, as well as instructor delivery notes (in seperate blocks of
content, like "Say This", "Common Questions from Participants", "How to Run
this Activity"). The Classroom Logistics Guide will just be one or two sheets
that may need to be saved seperately so it can be sent to another person if
they are arranging part of the classroom logistics.

Rather than perform a huge amount of copy/paste/delete and try to keep all
the data current, I'm looking to just keep all this information in a single
document - any outputted documents will be the result of editing the single
document template.

I've read some about XML and XSLT, but I don't know if they are what I'm
looking for, because it appears that XSLT will reformat the document, when
all I want is content switched out or removed/added based on content type -
all formatting should stay as is. Is this something I can just tag certain
content with an XML tag and then run a VBA routine against to remove that tag
from the view of the rest of the document? The "Memo" and "Resume" XML
samples for Word on MSDN weren't helpful. Bill Coan has a good example I
looked at on wordsite.com, but his is all about formating for HTML (but the
key idea is there as to what I'm looking for).

I've also considered using "hidden text" inside of a Content Control and
then just using VBA to hide all parts I don't need via the Control's tag, but
that's just a binary choice of include/don't include and I need conditional
logic.

Any help in this regard is deeply appreciated - pointers, samples, real
world examples, a smack in the face... :)

DD
 
A

alborg

Hi DD:

There are several ways to do this. Download my MS Word template that shows
how to use one dropdown box (the condition) to filter another one-
http://www.box.net/shared/static/wu2pcxt0kk.zip. It also shows you how to use
MS Word "UserForms" to get data from an underlying MS Access table. You can
use that method for retrieving information that you would otherwise need to
cut/paste. Once retrieved, the information can be cut/pasted using VBA.

It's a simple example, but are very powerful techniques.

Cheers,
Al
 
D

DD

Thanks Al. Definetely cool (I'll save this sample of yours for a future
need), but not exactly what I'm looking for on this one. Basically, I just
want a document that looks like this. The brackets <> are conditional text.
=================================
****FULL TEMPLATE****start
<china>China</china><india>India</india> is an emerging market. The ecomomy
has experienced unprecendented growth over the last decade. <china>With the
Olympics coming up this summer, China is poised to experience an explosion in
key city economies.</china>
****FULL TEMPLATE****end
=================================
****INDIA DOCUMENT****start
India is an emerging market. The ecomomy has experienced unprecendented
growth over the last decade.
****INDIA DOCUMENT****end
=================================
****CHINA DOCUMENT****start
China is an emerging market. The ecomomy has experienced unprecendented
growth over the last decade. With the Olympics coming up this summer, China
is poised to experience an explosion in key city economies.
****CHINA DOCUMENT****end
=================================

The thing is that I need an easy way to "tag" text and then just display a
version of the tagged text (which could have a lot of rich formatting), then
switch to another view based on different tags, print/save a tagged version
(document), without any further work or changes on the master template.

I just don't really have a good place to start to think about this. Is this
XML (and then what about the display issue of XSLT not affecting the
formatting, just changing out tagged text?). Is this bookmark ranges where I
constantly delete/re-add content based on VBA routines?

Appreciate any and all help.

DD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top