"Object has been deleted"

T

tshades

I have a COM Add-in for Word 2007. I'm using the close event and sometimes on
a close I'll get an error half way through my function when I'm using the
document object for example I’m just trying to get the fullname from the
object. I've seen the same problem on a save as well. Now obviously I'm not
closing the document before I try any of this. In fact I have seen the issue
with the document on my screen but my code will return "Object has been
deleted" in the background while getting any value from the object.

The issue is not reproducible and it isn’t just on my machine. Seen it on
others as well. It is rare. Once out of 1000 saves or so.

My original thought was that another Add-in may have closed the document
before my code completed. I have no control over the other add-ins. But after
the issue happened with the document open I’m starting to lean more toward
MSWord bug.

Has any one seen an issue like this?

Also, does anyone know how to prevent another add-in from closing the
document object before you have finished the close event?
 

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