有没有办法通过VBA编辑连接?
例如,在运行 VBA 脚本时更改连接器的线宽。
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
此代码将页面上每个连接器的线宽设置为 0.5 pt
此代码更改了所选形状的线宽
Set shp = ActiveWindow.Selection.PrimaryItem
shp.单元格("线宽"(。公式 ="0.5 pt">