Is it possible to create a variable within a template that will store data
between sessions? I need to store some info for a document that will be
created by the user. I have been using custom properties but these have a
limited length and I need to store longer text.
Is there a way to do this with a variable?
Charles Kenyon - 26 Feb 2005 22:59 GMT
Document variables certainly can be stored in templates. Have you considered
using AutoText, though?

Signature
Charles Kenyon
Word New User FAQ & Web Directory: http://addbalance.com/word
Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide
See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
> Is it possible to create a variable within a template that will store data
> between sessions? I need to store some info for a document that will be
> created by the user. I have been using custom properties but these have a
> limited length and I need to store longer text.
>
> Is there a way to do this with a variable?
Doug Robbins - 26 Feb 2005 23:07 GMT
You can use:
ActiveDocument.Variables("varname").Value = "Some long string"
to store information in a document variable. It can be retrieved using
ActiveDocument.Variables("varname").Value
and displayed in the document by way of a { DOCVARIABLE varname" } field

Signature
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.
Hope this helps,
Doug Robbins - Word MVP
> Is it possible to create a variable within a template that will store data
> between sessions? I need to store some info for a document that will be
> created by the user. I have been using custom properties but these have a
> limited length and I need to store longer text.
>
> Is there a way to do this with a variable?