Microsoft.Office.Interop.Word.DocumentClass.SaveAs 命令失败
asp.net 常用的生成word功能,代码也是网上常见的,自己本地反复测试过没问题。
serves 2003下运行没问题,可是发布到2008上就出错。组件权限已配置,windows目录下temp权限已给,程序目录权限已给,也加入了<identity impersonate="true" userName="administrator" password="XXXXX"/>,连administrator的用户控制都关了。
保存word文档时也出错(Word.DocumentClass.SaveAs):
System.Runtime.InteropServices.COMException (0x800A1066): 命令失败
在 Microsoft.Office.Interop.Word.DocumentClass.SaveAs(Object& FileName, Object& FileFormat, Object& LockComments, Object& Password, Object& AddToRecentFiles, Object& WritePassword, Object& ReadOnlyRecommended, Object& EmbedTrueTypeFonts, Object& SaveNativePictureFormat, Object& SaveFormsData, Object& SaveAsAOCELetter, Object& Encoding, Object& InsertLineBreaks, Object& AllowSubstitutions, Object& LineEnding, Object& AddBiDiMarks)
64位服务器布置跟32位的区别是:
C:\Windows\SysWOW64\config\systemprofile\Desktop
C:\Windows\System32\config\systemprofile\Desktop
就是看下上面的文件夹有没?没有新建个文件夹就行了,泥马的困扰俺这么久!
记在上面以备后用
Microsoft.Office.Interop.Word.DocumentClass.SaveAs 命令失败的更多相关文章
- (转)无法将类型为“Microsoft.Office.Interop.Word.ApplicationClass”的 COM 对象强制转换为接口类型“Microsoft.Office.Interop.Word._Application”。此操作失败的原因是对 IID 为“{00020970-
HRESULT:0x80030002 无法将类型为“Microsoft.Office.Interop.Word.ApplicationClass”的 COM 对象强制转换为接口类型“Microsoft ...
- 无法将类型为“Microsoft.Office.Interop.Word.ApplicationClass”的 COM 对象强制转换为接口类型“Microsoft.Office.Interop.Word._Application”。
无法将类型为“Microsoft.Office.Interop.Word.ApplicationClass”的 COM 对象强制转换为接口类型“Microsoft.Office.Interop.Wor ...
- VS编程中找不到Microsoft.Office.Core、Microsoft.Office.Interop.Word和VBIDE
在使用vs2005. vs2008. vs2010 制作包含 word等office的应用程序时,有时找不到对Microsoft.Office.Core. Microsoft.Office.Inter ...
- System.InvalidCastException: 无法将类型为“Microsoft.Office.Interop.Word.ApplicationClass”的 COM 对象强制转换为接口类型“Microsoft.Office.Interop.Word._Application”。
报错:System.InvalidCastException: 无法将类型为“Microsoft.Office.Interop.Word.ApplicationClass”的 COM 对象强制转换为接 ...
- Microsoft.Office.Interop.Word 创建word
Microsoft.Office.Interop.Word 创建word 转载:http://www.cnblogs.com/chenbg2001/archive/2010/03/14/1685746 ...
- 关于.net Microsoft.Office.Interop.Word组建操作word的问题,如何控制word表格单元格内部段落的样式。
控制word表格单元格内部文字样式.我要将数据导出到word当中,对于word表格一个单元格中的一段文字,要设置不同的样式,比如第一行文字作为标题要居中,加粗,第二行为正常的正文. 代码如下 publ ...
- C#引用Office.word出错的解决办法-无法嵌入互操作类型“Microsoft.Office.Interop.Word.ApplicationClass” 【转】
本文章转自 suchso 1.系统找不到 Microsoft.Office.Interop.Word" "Could not load file or assembly 'Micr ...
- 无法嵌入互操作类型“Microsoft.Office.Interop.Word.ApplicationClass”。请改用适用的接口。
引用里找到Microsoft.Office.Interop.Word右键属性 在嵌入互操作类型里,选上False就行了.
- 用 DocumentFormat.OpenXml 和Microsoft.Office.Interop.Word 写入或者读取word文件
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Tex ...
随机推荐
- 【转】使用JMeter 完成常用的压力测试(三)
使用JMeter 完成常用的压力测试 发布时间: 2008-9-27 15:33 作者: 未知 来源: 网络转载 字体: 小 中 大 | 上一篇 下一篇 | 打印 | 我要投稿 ...
- An internal error occurred during: "Map/Reducelocation status updater".java.lang.NullPointerException
当我们运行wordcount代码时,出现报错,如下所示: An internal error occurred during: "Map/Reducelocation status upda ...
- 在工作表左侧中添加TreeView控件
开发环境基于VSTO:visual studio 2010,VB .Net,excel 2007,文档级别的定制程序. 需求是在sheet的左侧停靠System.Windows.Forms.TreeV ...
- 爬取github上流行的python项目
# -*- coding:utf-8 -*- __author__ = "MuT6 Sch01aR" import requests from pyquery import PyQ ...
- JS四级复选框选中层次关系
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- HTTP之报文
HTTP 报文 用于 HTTP 协议交互的信息被称为 HTTP 报文.请求端(客户端)的 HTTP 报文叫做请求报文,响应端(服务器端)的叫做响应报文.HTTP 报文本身是由多行(用 CR+LF 作换 ...
- Halcon学习之六:获取Image图像中Region区域的特征参数
area_center_gray ( Regions, Image : : : Area, Row, Column ) 计算Image图像中Region区域的面积Area和重心(Row,Colu ...
- leetcode539
public class Solution { public int FindMinDifference(IList<string> timePoints) { * ]; foreach ...
- leetcode599
public class Solution { public string[] FindRestaurant(string[] list1, string[] list2) { var dic = n ...
- ubuntu下编译ffmpeg并用eclipse调试
一.下载ffnpeg源码 下载地址:http://ffmpeg.org/download.html 二.解决版本问题 可能之前你编译过ffmpeg,或者装过相关的库,那都要先卸载掉,否则用的时候会报一 ...