Problem in saving visio document

N

Nitin Jain

Hi,

I have created an Addin for Visio 2007 using VSTO. I want to save some
changes to some shapes of the document before the user closes the document.
I got the event handler for BeforeDocumentClose event. From there I made
changes to some shapes, and then when I am going to call Document.Save
function it throws error "Attempted to read or write protected memory. This
is often an indication that other memory is corrupt". I am not getting why it
is happening. I am using C#

Any help will be appreciated.

Regards
Nitin Jain
 
A

AlEdlund

If I remember correctly, you're in a state where the document is frozen
because Visio is waiting to close it (and all of it's resources). You have
to kill the save that is in progress, do your shape manipulation, and then
call the save programmatically (handling the user prompt from inside your
application).
hth,
al
 
N

Nitin Jain

Hi,

Thankyou for so much useful info.

Can u please tell how to kill save programmatically.

Regards
Nitin Jain
 
N

Nitin Jain

Hi,

Thank you for your post. I will look for that solution.

Regards
Nitin Jain
 

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

Top