0
我正在嘗試將自定義形狀放入我打開的Visio文檔中,並將其鏈接到我從SQL數據庫導入的數據。我將模板加載到Visio中。目前我可以在屏幕上放下矩形並鏈接它們。以下是我迄今爲止:拖放自定義形狀Visio 2016
For i = 1 To 6
Dim vsoDataRecordset As Visio.DataRecordset
Dim vsoShape As Visio.Shape
Dim intCount As Integer
intCount = Visio.ActiveDocument.DataRecordsets.Count
Set vsoDataRecordset = Visio.ActiveDocument.DataRecordsets(intCount)
Set vsoShape = ActivePage.DrawRectangle(1, 3, 2, 1)
vsoShape.LinkToData vsoDataRecordset.ID, i, True
Next i