TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
Subject:Re: Word conditional text problem From:Chris Knight <knight -at- ADA -dot- COM> Date:Wed, 17 Jun 1998 20:26:58 -0700
Chris Hamilton wrote:
>
> Post-processing is taking the HTML created by Word and programmatically taking
> pieces from the Word HTML and sticking them into some pretty HTML. I don't have
> control over the stuff created in Word, plus, I have to break up one Word file
> to make multiple HTML files.
>
> Now, onto the conditional text. I looked up conditional text in Word in the
> TECHWR-L archives and the answer seemed to be that you had to hack the solution
> with hidden text. If you have a better solution, I would deeply appreciate your
> sharing it.
Word supports true conditional text, by using the {IF} field. You
enclose text you want printed under condition X inside the quotes in a
{IF X ""} field. For example, I wrote a manual for software that ran
under both DOS and UNIX. DOS paths use "\", UNIX paths use "/". So, I
put the slashes inside IF fields, and defined two variables to control
the output: "DOS" and "UNIX". Wherever I needed a path, I "coded" the
slash something like {IF DOS "\"}{IF UNIX "/"}--not quite the syntax.
This allowed me to generate 2 books from the same text. THAT is
conditional text. It is a very sophisticated use of fields, with several
gotchas--impossible to go into via e-mail--but it works.
But, I repeat, I don't see what your example has to do with conditional
text. What condition(s) are you talking about? How do they connect with
what you meant by "users replace with real data" and "The user should
highlight "Insert Title Here" and replace it with the real title".
Conditional text has nothing to do with what these phrases suggest:
users interacting with a Word file and replacing dummy text with real
text. THAT sounds like Form Field territory.
--
Chris Knight
Consultant, Technical Communication Architect
Vancouver BC, Canada
(currently at Applied Digital Access,
E-mail: knight -at- bcg -dot- ada -dot- com Phone: 604-415-5886 Fax: 604-415-5900)
Opinions expressed are my own, not ADA's