I using automation of Visio 2010 to convert Visio files to PDFs. everything is working well, however I can't for the life of me figure out how to disable the "Update Links" dialog from code to prevent it from showing. here is the code:
Visio.Document vxdDoc = default(Visio.Document);
if (VisioApp == null)
{
VisioApp = new Visio.InvisibleApp();
VisioApp.Settings.ShowFileOpenWarnings = false;
VisioApp.Settings.ShowFileSaveWarnings = false;
VisioApp.Settings.ShowChooseDrawingTypePane = false;
}
VisioApp.Documents.Add("");
vxdDoc = VisioApp.Documents.OpenEx(sPath, 130);
string s = sPathOut.Substring(0, sPathOut.LastIndexOf("\\"));
if (!Microsoft.VisualBasic.FileIO.FileSystem.DirectoryExists(s))
{
Microsoft.VisualBasic.FileIO.FileSystem.CreateDirectory(s);
}
vxdDoc.ExportAsFixedFormat(Microsoft.Office.Interop.Visio.VisFixedFormatTypes.visFixedFormatPDF, sPathOut, Visio.VisDocExIntent.visDocExIntentPrint, Visio.VisPrintOutRange.visPrintAll);
any help is greatly appreciated.