How can I prompt a user for information, do a few tweaks do it, save some text strings, and have the text strings appear where I want them to in a Word 2007 document?
I have to prepare some standard letters. They need to collect some information (addressee’s name, reference number…, which of three choices…). I’ve set up a form to prompt the user for these data. I then have it run some If Then conditions and set some text strings. I then want the text strings to go into the document…
This is where I’m stuck. I hoped that “DocVariable” field could use the text string I’d saved in the form to enter the text string. No luck.
I thought that if I used e.g.
‘Add bookmark text for sender’s name
expression.Add (BkmTxt_SendersName)
BkmTxt_SendersName = str_SendersName
I could then use the cross-reference functions (cross reference, bookmark, insert bookmark text) e.g. {REF BkmTxt_SendersName h} in the document but it gives an error message (“Error! Reference source not found,”).