Is there any way to store a numeric variable value somewhere in Word, so that
the value remains after Word is closed, and is available next time Word is
opened?

Signature
donwb
Greg Maxey - 26 Nov 2005 23:53 GMT
You can store variable information in a .txt file or the windows registry.
See PrivateProfileString in VBA Help.

Signature
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.
> Is there any way to store a numeric variable value somewhere in Word,
> so that the value remains after Word is closed, and is available next
> time Word is opened?
ML - 27 Nov 2005 00:25 GMT
If you want it to be associated with a specific Word document then you can
save it in a custom document property.
> Is there any way to store a numeric variable value somewhere in Word, so
> that
> the value remains after Word is closed, and is available next time Word is
> opened?
Jezebel - 27 Nov 2005 00:49 GMT
In addition to the methods suggested by the other posters, you can use a
customproperty stored in normal.dot --
templates("normal.dot").CustomDocumentProperties("MyProperty") = ...
> Is there any way to store a numeric variable value somewhere in Word, so
> that
> the value remains after Word is closed, and is available next time Word is
> opened?
Doug Robbins - Word MVP - 27 Nov 2005 07:46 GMT
See the article "Creating sequentially numbered documents (such as
invoices)" at:
http://www.word.mvps.org/FAQs/MacrosVBA/NumberDocs.htm
or "Sequentially numbering multiple copies of single document using a macro"
at:
http://www.word.mvps.org/FAQs/MacrosVBA/NumberCopiesOf1Doc.htm

Signature
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
> Is there any way to store a numeric variable value somewhere in Word, so
> that
> the value remains after Word is closed, and is available next time Word is
> opened?
donbowyer - 27 Nov 2005 23:03 GMT
Many thanks to all who contributed to my Enduring Variable question.
From a combination of your inputs, I have a solution, based largely on the
creation of an "external" *.txt file.

Signature
donwb
> See the article "Creating sequentially numbered documents (such as
> invoices)" at:
[quoted text clipped - 10 lines]
> > the value remains after Word is closed, and is available next time Word is
> > opened?