Viso 2010 + VBA + file properties

Started by dgoogle, May 26, 2015, 12:28:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dgoogle

Hi all,
   appologies in advance if this may have been asked before.
From Windows you can right click on a file and look at its properties (See Pic 1)
You can further pick the "Custom" tab to read or set custom properties to this file (See Pic 2).

My question is, how to I get access to these customer properties from a VBA script withing the visio file ?

cheers,
dg  :'(

Surrogate

i haven't that custom properties tab in visio 2010. But in visio 2000 file properties contain this tab

AndyW

You need to access the document properties using the DSO OLE Document Properties Reader,

see https://support.microsoft.com/en-gb/kb/224351

This gives a dll that cab be referenced from VBA to access the properties.
Live life with an open mind

Surrogate

Quote from: AndyW on May 26, 2015, 01:19:18 PMThis gives a dll that cab be referenced from VBA to access the properties.
Thanks ! But this properties can't use as fields in visio document! Or not ?

AndyW

Visio is differemt to other Office Products, such that the Custom Properties is not directly accessible from VBA. Visio does support some directly on the Document object, such as Author, Title etc. ANything not directly supported by Visio can only be accessed via the DSO OLE Document Properties Reader.
Live life with an open mind

Surrogate

AndyW, thanks again!

dgoogle, if you need use fields in your document you need use Document ShapeSheet

dgoogle

Thank you all for your prompt replies.
I will read a little further on the info provided and let you know how I go.

cheers,
dg