Visio - new DrawingControlClass() thowing exception - 'class not registered'

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
 

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

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top