我正在尝试从 Excel 修改 Visio 中的页面
我尝试了此代码但没有成功:
Sub DrawMyRectangles()
Dim draw_visio As Object
Set draw_visio = CreateObject("visio.application")
Dim rect1 As Visio.Shape
Set rect1 = draw_visio.DrawRectangle(0, 0, 1, 1)
rect1.Text = "Hello World"
End Sub
请指教
答案1
请查看有关方法的更多信息绘制矩形
Set rect1 = draw_visio.ActiveWindow.Page.DrawRectangle(0, 0, 1, 1)