View Single Post
Old 12-10-2012, 21:46
shelbym's Avatar
shelbym shelbym is offline
Senior Member
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,782
Blog Entries: 11
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default ActiveTool

There are a couple of ways to change the Active Tool, the first is like this:
Sub ToolActive()
    ActiveTool = cdrToolEyeDropper
End Sub
The other is as you described to place a tool on a toolbar, export the workspace to get the GUID of the tool, then you can invoke that tool. So for the 2-point line it would be like this:
Sub TwoPointLine()
    Application.FrameWork.Automation.Invoke "7c391635-ddb3-45b6-b62b-66827f20547c"
End Sub
Best of luck,

Reply With Quote