check if visio file is open

J

jes

hi,

i have a table with a delete & open button. onclick of open, the visio file
opens in visio and onclick of delete the visio file gets deleted from the
file system. One problem, if the file is already open by another user how do
check for this and then return an errormsg to the user.
now im getting:
System.Runtime.InteropServices.COMException: This file is open for
modifications in another instance of Visio.

thanks
 
D

David Parker

Perhaps you should test for its lock file.
For example, if I open a Visio document cbvtext.vsd, then a hidden file
called ~$$cbvtest.~vsd is created in the same folder. It disappears when
the file is closed.
 

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