visio - File not found exception on saving file as vsd -
i using visio 2013 drawing control. when save file vsd throwing exception "file not found". file saved on given location. since file saved , ignore exception on reloading same file throwing "error hresult e_fail has been returned call com component" exception.
everything working fine if used vsdx extension instead of vsd. save file vsd backward compatibility.
below code doing. have tried set application version 2010 nothing working.
private void btnsave_click(object sender, eventargs e) { try { string filename = "c:\\test\\mydrawing1.vsd"; axdrawingcontrol1.document.saveasex(filename, (short)visopensaveargs.vissaveasws); //axdrawingcontrol1.document.saveas(filename); } catch (exception ex) { messagebox.show(ex.message); } } private void btnreload_click(object sender, eventargs e) { openfiledialog op = new openfiledialog(); op.showdialog(); try { this.axdrawingcontrol1.src = op.filename; } catch (exception ex) { messagebox.show(ex.message); } } private void btnopen_click(object sender, eventargs e) { openfiledialog op = new openfiledialog(); op.showdialog(); this.axdrawingcontrol1.src = op.filename; }
it bug in visio 2013 drawing control .see below kb
Comments
Post a Comment