View Single Post
  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Use DocVariable field to initiative numbering?

Typicaly a Figure number would contain something like the following (it
depends on the type of reference you choose to have);

Figure { SEQ Figure \*Arabic }

In that case you should be able to start the sequence numbering by inserting
the following nested field at the beginning of your document:

{ SEQ Figure \r{ DOCVARIABLE myvariable } \h }

(depending on what you are doing it might be better to put your starting
number in a Document Property and use the following instead:

{ SEQ Figure \r{ DOCPROPERTY myproperty } \h }
)

Let me explain. Suppose I have the phrase XYZ in a document. I want to
integrate a macro such that each place XYZ appears, a Figure number is
inserted instead. In other words, the macro would say, Find XYZ, and
replace with the caption field.


This seems to be something else altogether. If you just want to replace
every occurence of XYZ in a document with the caption field, the simplest
way is probably
a. create the caption text and fields you want (e.g.
Figure { SEQ Figure \*Arabic }
b. Edit|Copy that stuff so it's on the clipboard
c. use Edit|Replace to replace XYZ by ^c (i.e. the clipboard contents).

If you need to do it using a macro, things get a bit harder.

Peter Jamieson

"Tom" wrote in message
ups.com...
Can the DocVariable field be used to somehow initiate Figure numbering?

Let me explain. Suppose I have the phrase XYZ in a document. I want to
integrate a macro such that each place XYZ appears, a Figure number is
inserted instead. In other words, the macro would say, Find XYZ, and
replace with the caption field.

Is this possible? If so, it might enable me to run a macro to fix a
RoboHelp output to include Figure captions.