View Single Post
  #7   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?

Hi Tom,

Well, I'd assumed you knew what a docvariable was because you mentioned them
in the subject line of your post. But maybe you'd picked that up from
somewhere else, and maybe it's completely irrelevant.

But roughly speaking,

You can create document properties and set/modify their values using the
File|Properties dialog box. Personally I wouldn't use any type except
"string" unless I had a good reason. Further, you can modify document
properties programmatically, and view their values, even if you don't have
Word (i.e. the properties are stored in structures that do not rely on
Word). Sometimes, that's a bonus, but I suspect it's not that important in
this case.

Document variables are named values stored within Word. You can't set them
up or maintain them using the standard user interface, and you can only get
at them programmatically by using the Word object model. So they are perhaps
better if you don't want users to modify their values.

The DOCVARIABLE and DOCPROPERTY fields simply insert the values of the
specified document variables and document properties.

If you want to experiment with these field types I suggest you stick to
DOCPROPERTY in the first instance as you can play with these without
resorting to VBA.


Also, I realized the figure captions find-and-replace method only
solves part of the problem. In our HTML document, we have phrases like
this: "See Figure 1" and then below the figure we write "Figure 1."
When I did the find and replace method, it did sequentially number the
figures, but how would I implement the "See Figure 1" part? That seems
impossible.


Yes. However, how to maintain these references depends on what you're
doing - you mention "your HTML document". Are you starting with that and
trying to create a Word document from it, or what?

Peter Jamieson

"Tom" wrote in message
ups.com...
I would like to better understand the DOCPROPERTY and DOCVARIABLE
fields.

You gave the following examples:

{ 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 }
)

I'm just not sure how to implement this. I assume "myvariable" and
"myproperty" are unique words I define. But where are they stored? How
do I define them? What exactly do they do? I'm still in the dark here.

Also, I realized the figure captions find-and-replace method only
solves part of the problem. In our HTML document, we have phrases like
this: "See Figure 1" and then below the figure we write "Figure 1."
When I did the find and replace method, it did sequentially number the
figures, but how would I implement the "See Figure 1" part? That seems
impossible.