Unknown error when programmatically saving large visio documents

Discussion in 'Visio' started by Ilan Bar, Jul 8, 2015.

  1. Ilan Bar

    Ilan Bar

    Joined:
    Jul 8, 2015
    Messages:
    2
    Likes Received:
    0
    Hi,

    I wrote a c# console application that iterates over a folder of Visio 2010 files and makes some modifications on the shape's custom properties in each document. I noticed that for some of the files the save line fails:

    app.ActiveDocument.Save();

    this results with a vague exception "An exception occurred". when I quit the application using

    app.Quit()

    Each document that failed the saving is prompted with a save dialog box. needless to say, manually saving the files using the dialog box is not an option for me as I am iterating over thousand of files.
    If I manually reduce the document size by deleting some of the shapes - the save operations succeeds.

    Please advise,
    Ilan
     
    Ilan Bar, Jul 8, 2015
    #1
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.