Click here to Skip to main content
15,881,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I'm embedding an RTF documnet into my document by copying RTF from the clipboard to a tempfile. I then create the OLE item from the temporary file. In a WinXP/Word2003 setup, I was then able to delete the temporary file. Now with Win7(x64)/Word 2007 I can't delete the temporary file because Word won't let go of it.

How can I force an object to disconnect from the OLE server and/or shut down the server directly?
Posted
Comments
Sergey Alexandrovich Kryukov 27-Mar-13 18:14pm    
Good OLE server — dead server. :-)
—SA

1 solution

you must clean up your OLE object properly. Do all steps from startup in reverse.

I guess you opened an file, manipulated it and need to close is. Run the OLE code with i a visible window, so you see what you have done...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900