大家帮我看看这个是什么问题,小弟不胜感激
我希望在aspx里面输出word文件,但是老是出现这个问题
“/net/word”应用程序中的服务器错误。
--------------------------------------------------------------------------------
无法打开宏储存。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.Runtime.InteropServices.COMException: 无法打开宏储存。
源错误:
行 52: string fileName=@SaveAs.Text;
行 53: Word.Application WordApp=new Word.ApplicationClass();
行 54: Word.Document WordDoc=WordApp.Documents.Add(ref Nothing,ref Nothing,ref Nothing,ref Nothing);
行 55: WordDoc.Paragraphs.Last.Range.Text="Wellcome To Aspxcn.Com";
行 56: WordDoc.Close(ref Nothing, ref Nothing, ref Nothing);
源文件: f:\network\net\word\webform1.aspx.cs 行: 54
堆栈跟踪:
[COMException (0x800a175d): 无法打开宏储存。]
Word.Documents.Add(Object& Template, Object& NewTemplate, Object& DocumentType, Object& Visible) +0
word.WebForm1.Button1_Click(Object sender, EventArgs e) in f:\network\net\word\webform1.aspx.cs:54
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:1.1.4322.573; ASP.NET 版本:1.1.4322.573
我听说office2003以下的不能在通过组件输出文档是不是啊?
问题点数:0、回复次数:3Top
1 楼gaofeng2000(高老师)回复于 2004-09-04 18:36:09 得分 0
不会,顶Top
2 楼jijl2001(jijl2001)回复于 2004-09-04 18:44:02 得分 0
顶Top
3 楼coldpanth(^War3^)回复于 2004-09-04 19:31:19 得分 0
别用你现在用的.doc文件,建个小点的,比如说只打一个字母的文件试试.Top




