上一页 1 2 3 4 5 6 7 ··· 16 下一页
摘要: // WordIssue.cpp : main project file.#include "stdafx.h"using namespace System;using namespace System::Reflection;#define Office Microsoft::Office#def... 阅读全文
posted @ 2012-12-04 13:43 许阳 无锡 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 这个程序很强大但是如果参数错了同样要出问题,这里提供一个示例:=ShellAndWait("cmd",1000,4,2) 结果应为0Option ExplicitOption Compare Text '''''''''''''''''''''''''''''''''''''' 阅读全文
posted @ 2012-11-28 10:36 许阳 无锡 阅读(371) 评论(0) 推荐(0) 编辑
摘要: 网上我看见有人想用InsertNodeBefore来实现这个想法。代码如下:Sub HowDoesInsertNodeBeforeWork()Dim oCXPart As CustomXMLPartDim oCXNode As CustomXMLNodeDim strXML As Stringstr... 阅读全文
posted @ 2012-11-26 17:29 许阳 无锡 阅读(438) 评论(0) 推荐(0) 编辑
摘要: // InsertAfterSheets.cpp : Defines the entry point for the console application.//#include "stdafx.h"HRESULT AutoWrap(int autoType, VARIANT *pvResult, ... 阅读全文
posted @ 2012-11-21 18:50 许阳 无锡 阅读(256) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using DocumentFormat.OpenXml.Packaging;using DocumentFormat.OpenXml.... 阅读全文
posted @ 2012-11-08 17:16 许阳 无锡 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 在PIA中Microsoft 似乎没有给出移除Header的方法。在实践中我发现下面代码能做到这一点: Dim wdApp As Word.Application Dim wdDoc As Word.Document Dim wdSection As Wor... 阅读全文
posted @ 2012-11-07 12:24 许阳 无锡 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 实际上这是个非常蛋疼的命题。它需要你有两个方面的能力:1.你实际RTF格式。2.你知道在OpenXml格式的文档中各种Style存在于哪个部份。由于完整的RTF style非常多。我这里只写了一个最简单的例子,希望它能起排线的作用:假设我有一个docx文档如下:Hello!This is a tes... 阅读全文
posted @ 2012-11-06 12:52 许阳 无锡 阅读(315) 评论(0) 推荐(0) 编辑
摘要: 下面的示例将拷贝一个文档的Header(默认每页都出现的Header)到另一个文档。在这里为了简便起见,在Header中只有一个png图像。在实际工作中我们可以通过修改NewHeader方法来使程序符合自己要求。using System;using System.Collections.Generi... 阅读全文
posted @ 2012-10-30 16:57 许阳 无锡 阅读(346) 评论(0) 推荐(0) 编辑
摘要: 在VSTO中我们可以通过以下代码来获取Undo按钮的列表: private static Office.CommandBars getCommandBars() { return (Office.CommandBars)Globals.ThisWor... 阅读全文
posted @ 2012-10-29 15:17 许阳 无锡 阅读(335) 评论(0) 推荐(0) 编辑
摘要: 在Office Add-in下我们读取CustomDocumentProperties应该是没有问题的。 可是你会发现在Office Automation条件下CustomDocumentProperties是无法直接读取的(至少在我的环境下:Visual Studio 2010, Office 2... 阅读全文
posted @ 2012-10-23 13:29 许阳 无锡 阅读(183) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 16 下一页