No problem activating the eraser tool, for example.
Application.ActiveTool = cdrToolEraser
I like to have that at the end of any macro where the next task I need to perform is with the specified tool made active. What about Virtual Segment Delete? Why isn't it in this list:
https://community.coreldraw.com/sdk/api/draw/17/e/cdrtools
Its also apparently not anywhere in VBA's object browser. Doesn't appear in the drop down "suggestions" while typing code, and it doesn't return any results in the object browser search. Whats up with that? I'd like to be able to make any given tools active when desired in VBA, not just some of them. Help is appreciated.
Another way to do some things is to use InvokeItem.
For the Virtual Segment Delete tool, try this:
Application.FrameWork.Automation.InvokeItem "11e3cea8-0762-4f22-9e7e-900dd1399a1d"
How did I find the GUID to use?
Some information about one method in this thread: Text Menu crashes CD 2018.
How hard it will be to actually see that post, I don't know. The forum software sometimes hides some posts, and makes you ask to see them. Load next... Load previous...Ugh! Could they do anything else to make it harder to find stuff?
Eskimo hits the nail on the head again. That InvokeItem for Virtual Segment Delete via GUID was just what I needed. Also really cool of you to share how you managed to identify a tool's GUID. I was able to see the post you were specifically pointing to, and although I haven't yet delved into your process for doing that, I will mark this for later recall when I need to identify another "unlisted" tool. Considering that the cdrTool(insert tool name) is so limited via the library, why in the heck isn't there simply a published list of ALL GUIDs for ALL the tools of any given CDR version?! If it is possible to use a GUID to invoke a tool, there really should be a resource which lists all the tool's GUIDs, especially since so many tools are not possible to activate via the Application.ActiveTool route.
And I fully agree that this forum seriously needs an easier way to locate this kind of info. We need a designated macro area, absolutely no doubt about it.
Anyway... As usual, many thanks.