Question About Dicument Variables

J

JBNewsGroup

Hi,

I have never used Document Variables and I have a basic question. I have
searched the KB and MVP FAQ and cannot find the answer.

In WORD2000 how much data can be stored in a Document Variable? I have a
document with a number of shapes and I have an array that has some
parameters about each shape, one array entry per shape. Can I store this
parameter array in a Document Variable? Other than writing a disk file is
there a better way to keep the parameter array with the document?

Thanks for any help.

Jerry Bodoff
 
S

Shauna Kelly

Hi Jerry

I've never run into limit problems with Document Variables. I seem to
remember that something like 32K is the limit for an individual variable.

You can't save an array per se. You'll have to have individual variables for
each element in the array. Remember, too, that Doc Variables are always
strings.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
 
J

JBNewsGroup

Hi Shauna,

Thanks for the reply (I was surprised to see someone else up in the wee
hours).

My array has the shape name in it so it will be pretty easy to create an
appropriate variable name for each entry. It turns out that doing it this
way actually simplifies my code.

Once again thanks.

Jerry Bodoff
 
D

Doug Robbins

About 6 pm Sunday night where Shauna lives.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
J

Jezebel

I tested this a while ago. Can't remember the exact result, but the limits
is 65k something -- an odd number, not 65536, but a few hundred short of
that.
 
J

Jay Freedman

You can use the Join() and Split() functions and the data type
conversion functions CString(), CLong(), CSingle(), etc. to convert an
array into a delimited string and vice versa. That would let you store
all the info about one shape in one document variable, and separate it
on retrieval.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top