![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C#
文章平均质量分 65
zp2zjl
这个作者很懒,什么都没留下…
展开
-
C#把多个Word文档合并成一个的方法
由于客户需要,需要将多个WORD文档合并成为一个WORD文档。其中,对WORD文档的合并方式分两种形式: 一是复制合并; 一是插入合并,即将多个文档按照先后顺序合并到另一个文档中. 代码如下: using System; using System.Collections.Generic; using System.Text; using Mi转载 2012-09-10 17:45:37 · 2683 阅读 · 0 评论 -
ASP.NET(WCF)操作Word的权限配置
ASP.NET账号在默认情况下是没有权限操作Microsoft Office对象的,如果不进行权限的配置,代码会抛出类似以下的异常:检索 COM 类工厂中 CLSID 为 {00024500-0000-0000-C000-000000000046} 的组件时失败,原因是出现以下错误: 80070005。这样给Asp.NET操作Microsoft Office对象带来了一定的困难。但我们还是转载 2013-02-19 18:00:35 · 512 阅读 · 0 评论 -
C# 访问Https
#region 证书安装与验证 ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult); X509Store s = new X509Store(St原创 2013-02-19 17:38:58 · 1588 阅读 · 0 评论 -
net利用office自带的功能将word转成PDF
using Microsoft.Office.Interop.Word; /// /// /// /// doc文件的目录路径 /// 输出的pdf的目录路径 /// pdf右上角添加的编号,不是每个地方都会用到 /// 右下角加的log路径 /// public static bool FormatWordA翻译 2013-02-19 17:36:15 · 1157 阅读 · 1 评论 -
windows服务调用word组件出错的解决方法
windows服务在调用word转pdf的exe程序,程序中在生产word对象为NULL 的解决方法:配置的MS Word,如建议: 键入dcomcnfg在命令提示符,然后按Enter键; 找到并在“应用程序”列表中选择“Microsoft Word文档”,然后按“属性”按钮; 注:如果您有Windows 2003 \ 2008,然后键入dcomcnfg命令提示符下,展开“组件服务原创 2013-02-19 17:34:56 · 2903 阅读 · 0 评论 -
解决创建窗体名柄出错问题
protected override void CreateHandle() { if (!IsHandleCreated) { try { base.CreateHandle(); }翻译 2012-09-18 16:20:20 · 543 阅读 · 0 评论 -
C# 设置word不可编辑
Word.Application word = new Word.Application(); Object missing = Type.Missing; Object Password = "11111"; Object filename = @"C:\Users\ThinkPad\Desktop\a原创 2012-09-18 15:36:11 · 1739 阅读 · 0 评论 -
设置 DLL 的引用路径
app.config文件中加上转载 2012-09-18 16:15:59 · 448 阅读 · 0 评论 -
C# 删除word的指定页
using Microsoft.Office.Interop.Word; //启动Word程序Microsoft.Office.Interop.Word.Application wordApp = new Microsoft.Office.Interop.Word.ApplicationClass();object oMissing = System.Reflection.Missing原创 2012-09-17 17:54:12 · 3651 阅读 · 0 评论 -
winform屏蔽鼠标滚轮事件
http://www.cnblogs.com/xvqm00/archive/2010/05/05/1728117.htpublic partial class Form1 : Form,IMessageFilter { public Form1() { InitializeComponent(); }转载 2012-09-18 11:48:28 · 1996 阅读 · 2 评论 -
c# 与 js 的交互(MSScriptControl)
需下载 Microsoft(R) Script Control 是向开发人员提供简单方法以使应用程序脚本化的 ActiveX(R) http://www.microsoft.com/downloads/details.aspx?displaylang=zh-cn&FamilyID=D05FCF37-4D9F-4769-9442-0BCEEF907033 string原创 2012-09-12 17:50:35 · 778 阅读 · 0 评论 -
关闭某个已打开的word文件
using System.IO;using System.Runtime.InteropServices;[DllImport("kernel32.dll")]public static extern IntPtr _lopen(string lpPathName, int iReadWrite);[DllImport("kernel32.dll")]public static原创 2012-09-12 16:27:30 · 602 阅读 · 0 评论 -
word动态创建不规则表格、页眉、页脚、页码
public string CreateWordFile() { string message = ""; try { Object Nothing = System.Reflection.Missing.Value;翻译 2012-09-10 17:54:44 · 944 阅读 · 0 评论 -
DataType (System.Type t)转 DbType
private DbType GetDBType(System.Type theType) { IDbDataParameter iDbDataParameter = GetIDbDataParameter(); System.ComponentModel.TypeConverter tc = System.ComponentMode翻译 2012-09-10 17:52:10 · 2414 阅读 · 0 评论 -
winform WebBrowser查看WORD和EXCEL
-------word-------------------- private void InitWeb() { if (webBrowser1 == null) { this.webBrowser1 = new System.Windows.Forms.WebBrowser(); this.webBrowser1.AllowWebBrowserDrop = false; this.转载 2012-09-10 17:49:42 · 2156 阅读 · 0 评论 -
c# XML和实体类之间相互转换(序列化和反序列化)
usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.IO;usingSystem.Data;usingSystem.Xml;usingSystem.Xm转载 2016-10-09 14:56:20 · 469 阅读 · 0 评论