View Single Post
  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default How display values of {SET foo} variables?

If you are actually doing
{ SET VAR1 = "foo" }

then VAR1 will actually be set to "=" (in which case you might not be
noticing the output :-) )

{ SET VAR1 "foo" }
would do it, or

{ SET VAR1 foo }

if there are no spaces in the text.

But assuming that is not the problem, are you actually seeing

Var1:
Var2:

in the output? If not, my best guess is that you might have nested those
lines in another field in such a way that they would never output. If
you are seeing them, could it be that the SET fields have not executed
because they are nested inside an IF, or some such?

Peter Jamieson

http://tips.pjmsn.me.uk

On 22/02/2010 00:13, FUBARinSFO wrote:
For some reason, neither of the statements are displaying the value on
merge:

{SET VAR1 = "foo"}
{SET VAR2 = "bar"}

Var1: {var1}
Var2: {REF var2}

In contrast, I do know how to display stuff. This works OK:

Mergeseq variable: {MERGESEQ}
Mergerec variable: {MERGEREC \* MERGEFORMAT}

Yes, the above braces are Ctrl-F9 braces. And I have referenced the
links to the excellent tutorials and code. What I am doing is working
some of this out for myself, and find I can't even get this little
thing straight.

-- Roy