摘要: 实现环境:Visual Studio 2010, OpenXml SDK 2.0.50727using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System... 阅读全文
posted @ 2011-12-27 09:31 许阳 无锡 阅读(397) 评论(0) 推荐(1) 编辑
摘要: 原文:I received a meeting invitation from someone but I cannot accept the meeting invitation as I can’t use the Accept, Decline and Tentative buttons.I ... 阅读全文
posted @ 2011-12-26 10:47 许阳 无锡 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 其实……通过Outlook的Application我们是不能直接访问人家的Calendar的。所以我们要绕个圈子去访问它。using System;using System.Collections.Generic;using System.Linq;using System.Text;using M... 阅读全文
posted @ 2011-12-23 15:24 许阳 无锡 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 实现环境:Visual Studio 2010,Excel 2010, VSTO 4.0Imports Microsoft.Office.Tools.RibbonImports VBE = Microsoft.Vbe.InteropImports Forms = Microsoft.Vbe.Inte... 阅读全文
posted @ 2011-12-23 14:39 许阳 无锡 阅读(299) 评论(0) 推荐(0) 编辑
摘要: 实现环境:Visual Studio 2010, Office 2007, VSTO 4.0using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Xml.Linq;... 阅读全文
posted @ 2011-12-23 12:20 许阳 无锡 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 实现环境:Visual Studio 2010, Excel 2010, VSTO 4.0在文档中嵌入一个Commandbutton点击它会显示一个UserForm,UserForm上有一个CommandButton点击会弹出消息框然后CommandButton的Caption改变。当UserFor... 阅读全文
posted @ 2011-12-22 13:09 许阳 无锡 阅读(873) 评论(0) 推荐(0) 编辑
摘要: 在OpenXml format 的Word 文档中,似乎没有直接插入rtf格式的方法。如果需要插入rtf的内容只有预先将rtf的内容转换成Word的表现格式然后放在不同的节点下(有些需要放在StyleDefinitionsPart底下有些则做为Run的RunProperties)。 阅读全文
posted @ 2011-12-21 14:40 许阳 无锡 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 以下是异常重现代码:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows;using System.Windows.Controls;using S... 阅读全文
posted @ 2011-12-21 13:25 许阳 无锡 阅读(690) 评论(0) 推荐(0) 编辑
摘要: 实现环境:Visual Studio 2010, OpenXml SDK 2.0.5022这个代码实现了向一个已有的xlsx文件中添加一个新的Worksheet,并在这个Sheet中写入三行字符串“ObjectA1"~"ObjectC5"Imports DocumentFormat.OpenXml.... 阅读全文
posted @ 2011-12-19 20:17 许阳 无锡 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 第一种方法是设置Workbook的Final属性为True。这样整个文档就只读了。但是这样的话文档会提示你是否取消只读(实际上与没设一个样。)第二种方法是编辑Workbook的BeforSave事件。在BeforSave事件中将Cancel设为True。这样的话在你关闭Excel时只要你有任何操作,... 阅读全文
posted @ 2011-12-16 14:36 许阳 无锡 阅读(240) 评论(0) 推荐(0) 编辑