Queuemarker - DoCmd

H

Heiko Kemnitzer

Hi.
I've got a problem using a DoCmd in a Queuemarkerevent... Sounds crazy? Here
is the situation. I'm programming in VB.NET and I'd created a COM-AddIn for
Visio. The communication between Visio and VB.NET goes via Queuemarkerevents.
Now - my propblem: I will use the standard functionality "Search by Type" in
Visio. But before the dialog will come up, I want to proof some statements
and so I'm not using the DoCmd by generating my custom toolbar. I'm using the
Queuemarkerevent, check some things and if it's OK, start the dialog "Search
by Type" by calling with

VisioApplication.DoCmd _
(Microsoft.Office.Interop.Visio.VisUICmds.visCmdEditSelectSpecial)

The dialog comes up, but as I will press the cancel-button I'm getting an
error, says "cancel" ??
Has anybody had an other problem like this? Is this a Bug in Visio? Or
should I use the DoCmd while creating the toolbar? Other DoCmds are working
fine.
Thanks a lot for helping.
 
C

Chris [Visio MVP]

I tried the same thing in the VBA debug window and got the same problem when
hitting Cancel, so at least you are not alone.

Unfortunately, I don't know why this is happening.

Workaround might be to create your own copy of the Select Special dialog,
and use Page.CreateSelection to implement the functionality. I think the
options on CreateSelection are the same as in the dialog.
 
H

Heiko Kemnitzer

Hi Chris.

Thank you for your answer. I don't think that I will create my own dialog.
So, I've got to ways to go. Leave it in VB.NET and live with the error (do
not commend it). or I put the DoCmd in the parameter-settings while
generating my CustomToolbox.
But anyway - thank you.

By the way: Did you visit the Wies'n? I will disapointed if you did ;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top