C#进行Visio二次开发之组合形状操作
2010-09-30 22:45:23 来源:WEB开发网Sub Macro1()
Dim UndoScopeID1 As Long
UndoScopeID1 = Application.BeginUndoScope("移动对象")
ActiveWindow.DeselectAll
ActiveWindow.Select Application.ActiveWindow.Page.Shapes.ItemFromID(60), visSubSelect
Application.ActiveWindow.Selection.Move 0.405512, -0#
ActiveWindow.Selection.RemoveFromGroup
Application.EndUndoScope UndoScopeID1, True
ActiveWindow.DeselectAll
ActiveWindow.Select Application.ActiveWindow.Page.Shapes.ItemFromID(25), visSubSelect
Application.ActiveWindow.Selection.Move 0.314961, -0#
Dim UndoScopeID2 As Long
UndoScopeID2 = Application.BeginUndoScope("移动对象")
ActiveWindow.DeselectAll
ActiveWindow.Select Application.ActiveWindow.Page.Shapes.ItemFromID(60), visSelect
Application.ActiveWindow.Selection.Move -0.688976, 0#
ActiveWindow.DeselectAll
ActiveWindow.Select Application.ActiveWindow.Page.Shapes.ItemFromID(22), visSelect
ActiveWindow.Select Application.ActiveWindow.Page.Shapes.ItemFromID(60), visSelect
ActiveWindow.Selection.AddToGroup
Application.EndUndoScope UndoScopeID2, True
End Sub
更多精彩
赞助商链接