How to display document properties on drawing?

M

Mehul Shah

Hi,

I am trying to display some document related info in the Visio drawing that
I programmatically create in my application such as creator, date/time etc.
What is the best way to do it? Do I have to use a shape for it?
 
A

Al Edlund

My assumption is that you will have stored the information in a cell in the
document object. (either user section or as a custom property)

This from David Edson's book "Professional Development with Visio 2000" on
how to display document information. The other book you should probably have
if you are going to get into this is Graham Widemans "Visio 2003 Developers
Survival Pack"
Al

Private Sub CommandButton1_Click()
'Declare variables
Dim appVisio As Visio.Application
Dim docsObj As Visio.Documents
Dim docObj As Visio.Document
Dim szDocName As String

'You already have a handle to the application object since you are in
Visio so you don't need to get that.
'Get the instance's Documents property
Set docsObj = Visio.Documents

'Get the first document from the Documents collection
Set docObj = docsObj.Item(1)

'Get the Document object's Name property
szDocName = docObj.Name

'Set the Text property of the text box to the document name
txtName.Text = szDocName


End Sub
 

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