Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drop in different paragraphs in a Word template 4

Status
Not open for further replies.

kabushnell

Technical User
Jun 4, 2003
81
US
I have a Word template memo where the user enters name, address, etc. in the first section. The second section has five different paragraphs that may applicable. Only one will apply to each letter, so I would like something like a drop down list that the user could then select the paragraph to be inserted.

I was hoping there is a way to do this instead of having five different templates.
 
Pretty good tutorial at the URL. I would, however, simply do it as logic, not a drop down. If the first section is protected fields, have an exit macro on the last field complete the second section, depending on the content of the first section.

If the paragraphs to be inserted are a bit big, have ALL the paragraphs there (properly bookmarked), and depending on the results of the first section, remove the unwanted paragraphs.

Or you could have the original input on a Userform and all text inserted as the result of that input. In any case, check out the tutorial at the URL Peter suggested. You certainly do not need five templates.


Gerry
 
You could use a compound field like the following to do this entirely within the document, or something similar using an INCLUDETEXT field to pull in data from an external document.

{QUOTE{ASK BkMrk "Which para to Insert? Please choose one of - 1: Excellent, 2: Good, 3: Average, 4: Fair, 5: Poor"}{IF{BkMrk}= 1 "1st text block goes here" } {IF{BkMrk}= 2 "2nd text block goes here" {IF{BkMrk}= 3 "3rd text block goes here" {IF{BkMrk}= 4 "4th ext block goes here" {IF{BkMrk}= 5 "5th text block goes here" "Invalid selection, please try again!"}}}}}

The output text can actually span multiple paras with different styles/formatting if needed.

Cheers
 
Thanks for the responses. Using Martin Green's VBA site expamples I was able to do exactly what I needed. I have one quick question that I can't quite figure out. I have on text box where the user will enter numerical data. When this data is input into the word doc the font isn't correct. In the form I set the font up as Times New Roman size 12, but when this data comes over for this one text box, the font is arial 10. None of the other data has this problem. I am sure it is because it is numerical and not text. Anyone know how to fix this.

Thanks
 
If it is a Word form field,
Place the cursor immediately to the right of the specific text box
ALT+F9 (toggle field codes ON)
Press the left arrow once to move cursor inside "}"
type \* MERGEFORMAT
ALT+F9 (toggle field codes OFF)
Save
Merge
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top