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

asp.net中 如何通过程序打开word文档,excel文件 并且为只读

--------------------编程问答--------------------             object myWordFormatDocument = Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatDocument;
            object myLockd = false;
            object myAddto = false;
            object objReadOnly = true;
            object objFalse = false;
            object objTrue = true;
            object reprotectPassword = "";
            object myFileName = fileName;
            wordDoc.Protect(WdProtectionType.wdAllowOnlyReading, ref objFalse, ref reprotectPassword, ref Missing, ref Missing);
            wordDoc.SaveAs(ref myFileName, ref Missing, ref Missing, ref Missing, ref objFalse, ref Missing, ref objReadOnly,
                                ref Missing, ref Missing, ref Missing, ref Missing, ref Missing, ref Missing, ref Missing, ref Missing,
                                ref Missing); --------------------编程问答-------------------- 学习下,,, 
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,