Multi-user access of MSWord templates

A

Albert

I would like to allow multiple users to access MSWord
template files on a network simultaneously through an
application I'm writing. The application modifies the file
and saves it to another location on the network (i.e., the
file is not visible to the user). However, if one user
has the file open, through the application, and another
user tries to access that same file a message is displayed
advising the user that the file is locked by another user
and prompting them to either open it read-only or notify.
I need to suppress this message/prompt, open the document,
modify the document, and save it to the new location
without user interaction.

Thanks.
 
J

Jay Freedman

Hi, Albert,

By very deliberate design, Word does not allow simultaneous multiple-user
access to documents or templates. If you do manage to find a way around
that, you're inviting document corruption.

Would it work in your application to copy the file to the new name *first*,
without ever opening it, and then open and modify the new copy? That way,
"collisions" should be very rare, and could be handled when they occur by
waiting a few seconds and retrying.
 
R

Rick Stebbins

Can your application create NEW documents based on those
network templates (.DOT files) rather than opening the
template? If so, there will be no sharing error; and then
you can save the new document elsewhere.

Word.Documents.Add "YourNetworkLocation\YourTemplate.dot"
 

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