Quantcast
Channel: General Office Development forum
Viewing all articles
Browse latest Browse all 2257

How to avoide the "Update Links" dialog when automating Visio 2010 from C#

$
0
0

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.



Viewing all articles
Browse latest Browse all 2257

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>