G
gkelly
I looked a looked for an answer to this question and I have not been
able to find anything.
-------------------------------------------------------------------
using MSVisio = Microsoft.Office.Interop.Visio;
using MSVisOcx = Microsoft.Office.Interop.VisOcx;
MSVisOcx.DrawingControl v_dc = new MSVisOcx.DrawingControlClass();
MSVisio.Application v_app = v_dc.Document.Application;
MSVisio.Document v_doc = v_app.Documents.OpenEx( @"c:\TestVisio.vsd",
0 );
MSVisio.Page v_page = v_doc.Pages[1];
v_page.Export( @"c:\TestVisio.jpg" );
-------------------------------------------------------------------
This code works fine in a regular windows app, it opens a visio
drawing and then exports the drawing to a jpg file. And it does't use
automation.
However, when I use this same code in a web app, it throws an
exception on the line 'new DrawingControlClass' saying class not
registered.
Like i've said, I've looked and looked and can't seem to find any info
to solve this problem. Do you have any idea why this is happening?
Or, can you point me to a working example that I can follow.
thank you,
gkelly
able to find anything.
-------------------------------------------------------------------
using MSVisio = Microsoft.Office.Interop.Visio;
using MSVisOcx = Microsoft.Office.Interop.VisOcx;
MSVisOcx.DrawingControl v_dc = new MSVisOcx.DrawingControlClass();
MSVisio.Application v_app = v_dc.Document.Application;
MSVisio.Document v_doc = v_app.Documents.OpenEx( @"c:\TestVisio.vsd",
0 );
MSVisio.Page v_page = v_doc.Pages[1];
v_page.Export( @"c:\TestVisio.jpg" );
-------------------------------------------------------------------
This code works fine in a regular windows app, it opens a visio
drawing and then exports the drawing to a jpg file. And it does't use
automation.
However, when I use this same code in a web app, it throws an
exception on the line 'new DrawingControlClass' saying class not
registered.
Like i've said, I've looked and looked and can't seem to find any info
to solve this problem. Do you have any idea why this is happening?
Or, can you point me to a working example that I can follow.
thank you,
gkelly