Associating non-native properties with ActiveDocument

K

KevinC

I want to establish a set of properties that are not native to Word objects and associate them with the ActiveDocument. I'd like to be able to set and get those properties either from VBA within Word or through an ActiveX interface (e.g. "setMyID(123)" and "getMyID()"). I have experience controlling Word via ActiveX, but I have never seen anything like this. Does anyone know if it's possible to do this? If so, how?
 
J

Jezebel

You can use DocumentProperties or DocVariables for this purpose.

MyDoc.CustomDocumentProperties.Add "MyID" ...
and
ID = MyDoc.CustomDocumentProperties("MyID")

DocumentProperties are also accessible to the user (File > Properties >
Custom).

DocVariables function in much the same way, but can be changed only through
code.



KevinC said:
I want to establish a set of properties that are not native to Word
objects and associate them with the ActiveDocument. I'd like to be able to
set and get those properties either from VBA within Word or through an
ActiveX interface (e.g. "setMyID(123)" and "getMyID()"). I have experience
controlling Word via ActiveX, but I have never seen anything like this.
Does anyone know if it's possible to do this? If so, how?
 

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