当前位置:编程学习 > C#/ASP.NET >>

关于正常的打开关闭Word操作错误

////////////////////////////////////////////////////////////////////
当我使用
Word._Application.Open(ref filename, ref Nothing, ref Nothing, ref Nothing);

//////////////////////////////////////////////////////////////////
打开一个文件Word文件后,正常的调用了关闭文档操作.
            Object saveChanges = Word.WdSaveOptions.wdDoNotSaveChanges;
            Object originalFormat = Type.Missing;
            Object routeDocument = Type.Missing;
            doc.Close(ref saveChanges, ref originalFormat, ref routeDocument);

            //若已经没有文档存在,则关闭应用程序  
            if (myWordApp.Documents.Count == 0)
            {
                myWordApp.Quit(Type.Missing, Type.Missing, Type.Missing);
            } 
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
但当我再次打开这个文档时,提示我此文档已被XXX锁定.
到处查询也找不到答案,难道是哪里还需要释放操作么?费解?
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,