word 2007 keeps .doc file locked after save

A

Andy Fish

Hi,

I have a C# application that uses .Net interop to open a .doc file in word
2007, so a "save as" to XML, then close it.

on some documents, word keeps the file handle to the original .doc file open
(i.e. a file lock which I can see in process explorer), even though
Documents.Count returns 0. the file remains locked until word exits.

I have reproduced this on 2 different machines but it does not happen on
word 2003 and does not happen on every file.

Anyone have any idea what might cause this.

TIA

Andy
 
S

Shrini

Try opening the file as readonly and do a save as. It was happeing to me with
some files and when I started opening files readonly, the lock issue was gone.

good luck...

shrini
 
A

Andy Fish

hmm, unfortunately I'm opening it readonly already.

I've tried every combination I can think of opening it, re-saving several
times in different formats, but whenever I save as xml or as docx, the
original .doc file stays locked

Andy
 
A

ajfish

Just as a follow up, I have raised this with microsoft suport and they
are going to raise it as a bug with the product team

(though the product team might still decide it is a feature !!)

Andy
 

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