Question

I have a 'Microsoft Visio Document' (VisioViewer.Viewer.1) control (called visDiagram) on an MS Access form. How can I refer to it in code?

e.g.

  Dim pagDiagram as Visio.Page
  Set pagDiagram = me!visDiagram.<WHAT GOES HERE????>
  Debug.print pagDiagram.Shapes.Count

UPDATE: This web page http://msdn.microsoft.com/en-us/library/office/ff765109(v=office.14).aspx says use

Dim vsoDocument As Visio.Document
Set vsoDocument = DrawingControl1.Document

but

Dim vsoDocument As Visio.Document
Set vsoDocument = me!visDiagram.Document

gives 'Object does not support his property or method'

Was it helpful?

Solution

set vsoDocument  = me!visDiagram.Object
Debug.print vsoDocument.ShapeCount

for each P in vsoDocument.Pages  
     debug.print P.name
next p
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top