Word Document becoming read only when writen to network drives.

N

Neal

Hi,

When I write Word Document to a network drive using Visual Studio tools for Office 2003 they become read only. When I do this to a local drive they are okay. A document writen straight from Word to the network are okay also. Is there something I am doing or is there a VS fix for this.

Neal
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?TmVhbA==?=,
When I write Word Document to a network drive using Visual Studio tools for
Office 2003 they become read only. When I do this to a local drive they are
okay. A document writen straight from Word to the network are okay also. Is
there something I am doing or is there a VS fix for this.Please show us the code you're using to create and save the document (a very
simple document!).

How do you find out that these are "read-only"? By trying to open them again,
or some other way? Is the "read-only" attribute applied at the file level? Or
is Word seeing the files as "locked"?

Note that NET doesn't necessarily release object variables + the objects which
they represent immediately. Have you ever run into the term "garbage
collection" when learning about NET? If not, search on that in Help and on the
MSDN website. The problem may be that these objects aren't being released.

The other possibility (that might be related to the above) is that the "temp"
files Word uses to manages document editing are not getting released and
deleted properly. This will also cause Word to see a document as "read-only"
because it thinks it's still open somewhere. Perhaps you can track down where
these are being created and see if the necessary file permissions exist so
that they can be removed.

BTW, the best place to ask questions about the VSTO is in the
dedicatednewsgroup: vsnet.vstools.office

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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