Custom Document (file, not shape) Properties

J

Jim Duncan

Does anyone know how I can access the custom document properties of a
Visio file through code?
Word/Excel/PowerPoint all have a Document.CustomDocumentProperties
collection but I can't find any type of reference to document properties in
the Visio object model.

Any help?

Thanks,
Jim
 
J

Jim Duncan

Hi Al,

Thanks for the pointer; that's a good place to start, but I couldn't find
anything about 'custom' document properties, only built-in ones (Title,
Creator, Description, etc.)

-Jim
 
A

Al Edlund

documents within the visio design have shapesheets (the document sheet) just
like the rest of the objects. Shapesheets can have custom properties, which
can be assigned and read programatically. It's just the same as working with
a page, or a rectangle on a page. Custom properties are just a section
within a shapesheet.

al
 
J

Jim Duncan

Thanks Al.

I don't need the shape/shapesheet custom properties, though. I need the FILE
custom properties that are accessible by right-clicking the .vsd file and
choosing Properties and then going to the Custom tab. I would like to be
able to access these through code. Is it possible?

-Jim
 
A

Al Edlund

it appears that CustomDocumentProperties and DocumentProperties are members
of the Office library, but not a part of the Viso Library (at least using
object brower within VBA).

al
 
M

Mark Nelson [MS]

The standard document properties are exposed as properties on the Visio
Document object:

Document.Creator, Document.Manager, etc.

Visio does not expose custom document properties in the application or
programmatically. Because Visio binary files are standard structured
storage containers, you can use the Win32 API to access this information.
I'm not sure whether it would be possible to do this through VBA since Win32
interfaces are often incompatible with the VB language.
 
J

Jim Duncan

Thanks Mark,

I need to access them from a COM AddIn written in C#
Any pointers?

-Jim
 

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