none
Templating docs with conditional text RRS feed

  • Question

  • Hi - I am trying to create a doc that contains certain text depending upon upfront user input. For example, a contract where the user chooses between Fixed Price (FP) and Time and Materials (T&M). If FP is selected then various pieces of text appear throughout the doc in different places; eg: "Fixed Price" is inserted/unhidden in one place, while a whole paragraph may appear in another. 

    This can be done using Mail Merge, but unfortunately the field size is far too small for a paragraph. 

    Is there a way to do this? 

    Thanks,

    Brian

    Wednesday, February 12, 2014 12:18 AM

Answers

  • See: http://gregmaxey.mvps.org/word_tip_pages/repeating_data.html

    in addition to simply repeating data, you can also use macros, fields etc to conditionally output content, depending on what the test conditions are; whole pages of text, including graphics, can be managed via a single IF field.

    As for mailmerges, you can likewise use an IF test on a MERGEFIELD to vary document content, without that content having to be in the data source.


    Cheers
    Paul Edstein
    [MS MVP - Word]

    • Marked as answer by Marvin_Guo Wednesday, February 19, 2014 3:01 AM
    Wednesday, February 12, 2014 8:27 AM

All replies