Suppress "file is in use" message

J

j.Tieman

Is there a way in a vb macro to suppress the messagebox that a file is used
by another user, i.e always open it as read_only?

I tried on error and displayalerts but both don't work

Win2K, Word2k
 
J

Jonathan West

j.Tieman said:
Is there a way in a vb macro to suppress the messagebox that a file is used
by another user, i.e always open it as read_only?

I tried on error and displayalerts but both don't work

Win2K, Word2k


You can't suppress the message, but you can check if the file is in use
*before* opening it, and then decide to open it read-only. Take a look here

How to check if a file has already been opened by another user
http://word.mvps.org/FAQs/MacrosVBA/CheckIfFileOpen.htm
 
J

j.Tieman

Thanx jonathan,

I found your code just before I wrote my first message,. but didn't use it
because I will probably have to rewrite my entire macro then. I use
Selection.Insertfile to insert a copy of the current status of a document
inside another (main) document.

I briefly tried to use a masterdocument and insert it with addfromfile
(which supports opening RO) but that did work for me either.

kind regards, Jan Tieman
 

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