在VBA中格式化Visio连接
有没有办法通过VBA编辑连接在VBA中格式化Visio连接,vba,visio,Vba,Visio,有没有办法通过VBA编辑连接 例如,在运行VBA脚本时更改连接器的线宽。此代码更改了选定形状的线宽 设置shp=ActiveWindow.Selection.PrimaryItem 小型单元格(“线宽”)。公式=“0.5磅” 该代码将第页上每个连接器的线宽设置为0.5 pt Sub Macro1() Dim shp As Shape, mst As Master ' iterate all shapes per page For Each shp In ActivePage.Shapes
例如,在运行VBA脚本时更改连接器的线宽。此代码更改了选定形状的线宽 设置shp=ActiveWindow.Selection.PrimaryItem
小型单元格(“线宽”)。公式=“0.5磅” 该代码将第页上每个连接器的线宽设置为0.5 pt
Sub Macro1()
Dim shp As Shape, mst As Master
' iterate all shapes per page
For Each shp In ActivePage.Shapes
' declare parent master for current shape
Set mst = shp.Master
' Process only shapes that have parent master-shape
If Not (mst Is Nothing) Then
' change only shapes, which master-shape is dynamic connector
If mst.Name = "Dynamic connector" Then shp.Cells("LineWeight").Formula = "0.5 pt"
End If
Next
End Sub