View Single Post
  #2   Report Post  
Jezebel
 
Posts: n/a
Default

The SET command is a way to define a bookmark. To refer to the contents of a
bookmark, use REF fields ... so in place of your {DOT} instructions you
should have {REF DOT}.

However, you might find it easier to use a document property instead: define
the 'variable' on File Properties Custom, then use a docproperty field
{ DocProperty DOT } to display the value. This has three advantages: 1) it's
a little easier to see what the value is set to, 2) there's no danger of
accidentally deleting the instruction that sets the value -- SET
instructions are necessarily invisible when field codes are hidden, so it's
easy to forget that they are there, and 3) document properties are easier to
read and set programmatically.




"Bill" wrote in message
ink.net...
I have a document that I'd like to add a
"SET" command to initialize what amounts
to a document variable. I.e., I set the variable
and then use the variable to insert its value
amongst the text of the document.

Example:

{SET DOT "revise this string when date becomes available"}

blah blah blah {DOT}
blah blah
blah
blah {DOT}
blah blah
blah blah blah
blah
{DOT}

I coded the DOT variable name as you see above but
the substitutions are not occurring. Do I misunderstand
the use of field codes?

Thanks,
Bill