Accessing variable in closed document

F

Fred Kruger

I use ActiveDocument.Variables("Audit") to store
information in documents and this info is put into the
variable on open and close of the document.

Is there a way of access this variable in a closed
document without it being opened first so there is no
integrity issue or does it have to be open first.

Also is it possible to reset this variable to empty in a
closed document.

cheers in anticipation
Fred
 
S

Shawd

I would also like to know if this is possible, the
solution I came up with was to open the document but set
the visible option in "Documents.Open" to false so I
could work with the variables but not have the user see
it.
 
J

Jonathan West

Fred Kruger said:
I use ActiveDocument.Variables("Audit") to store
information in documents and this info is put into the
variable on open and close of the document.

Is there a way of access this variable in a closed
document without it being opened first so there is no
integrity issue or does it have to be open first.

Also is it possible to reset this variable to empty in a
closed document.

cheers in anticipation
Fred

Hi Fred,

This can't be done with document variables, but it can be done with document
properties. The following article describes how. The associated code onlyd
eals with build-in document properties, but the same technique can also be
applied to custom document properties.

Getting access to the Document Properties of a Word file
http://word.mvps.org/FAQs/MacrosVBA/DSOFile.htm
 

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