AlertResponse property not stopping dialogs

S

Scott Kurth

I have a VC++ application that opens a Visio document using COM, but I
cannot seem to prevent Visio from opening a dialog box for the user
for some of my documents. Specifically, the dialog that comes up is
as follows:

-----------------------------
Organization Chart Converter
The organization chart shapes in this drawing must be converted to
work properly in the current version of Microsoft Visio. Click Yes to
convert the shapes now. If you click No, the shapes in your drawing
will not function correctly.
-----------------------------

I would like to prevent that dialog box from being shown and have the
No button selected automatically. I have tried setting the
AlertResponse property of the Application object, but it has no
effect.

Here is a snippet of the code that I am using...


// Start Microsoft Visio and get the IVApplication object.
Visio::IVApplication app;
app.CreateDispatch("Visio.Application");
app.SetVisible(TRUE);

// Get the documents collection.
Visio::IVDocuments docs;
docs = app.GetDocuments();

// Open a Visio document.
Visio::IVDocument doc;
app.SetAlertResponse(IDNO);
doc = docs.OpenEx(strFilename, visOpenRO | visOpenMacrosDisabled |
visOpenNoWorkspace);




Does anyone have any suggestions, workarounds, or other advise?

Thanks!
Scott
 
M

Mark Nelson [MS]

Not all Visio dialogs honor AlertResponse. If you are seeing this work
sometimes and not other, chances are that the particular dialog does not
honor AlertResponse.
 
S

Scott Kurth

Any alternate suggestions on stopping this particular dialog?
-----------------------------
Organization Chart Converter
The organization chart shapes in this drawing must be converted to
work properly in the current version of Microsoft Visio. Click Yes to
convert the shapes now. If you click No, the shapes in your drawing
will not function correctly.
-----------------------------
 

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