0

我在 MS Access 表单上有一个“Microsoft Visio 文档”(VisioViewer.Viewer.1) 控件(称为 visDiagram)。如何在代码中引用它?

例如

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

更新:这个网页http://msdn.microsoft.com/en-us/library/office/ff765109(v=office.14).aspx说使用

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

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

给出'对象不支持他的属性或方法'

4

1 回答 1

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

for each P in vsoDocument.Pages  
     debug.print P.name
next p
于 2013-09-27T07:39:57.423 回答