摘要: 本示例在Visual Studio 2010, Office 2010, VSTO 4.0的环境下完成。在工程必须手工添加"Microsoft.Vbe.Interop.Forms"的引用。本示例完成的关键在于Microsoft.Vbe.Interop.Forms.TextBox 变量必须是Class... 阅读全文
posted @ 2011-12-16 12:55 许阳 无锡 阅读(1195) 评论(0) 推荐(0) 编辑
摘要: 在实际运用过程中我们发现当MailItem保存为Msg文件 时UserProperties不会被保存。这样的话用户自定义的许多属性将会丢失。所以我建议用户如果要保存带用UserProperties的邮件最好先通过VBA或Add-in把UserPropeties的内容用""保存到HTMLBody中... 阅读全文
posted @ 2011-12-16 11:19 许阳 无锡 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 这是一个空白的Excel文档,只有一个WorkSheet。能省略的东西我都省略了。实现环境:Visual Studio 2010, OpenXml SDK 2.0.50727using System;using System.Collections.Generic;using System.Comp... 阅读全文
posted @ 2011-12-15 21:47 许阳 无锡 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 下面这段代码会抛出这个异常。using System;using System.Collections.Generic;using System.Data;using System.Linq;using System.Text;using System.Windows.Forms;using Sys... 阅读全文
posted @ 2011-12-15 18:24 许阳 无锡 阅读(1196) 评论(0) 推荐(0) 编辑
摘要: 实现环境:Visual Studio 2010,Office 2010, VSTO 4.0在Ribbon的Globalization中第一步是要建立相应语言的资源文件,这些资源文件的命名方式是"Resources.[语言代码].resx"如图:这此资源文件必须方在项目的“Properties”文件夹... 阅读全文
posted @ 2011-12-15 13:54 许阳 无锡 阅读(301) 评论(0) 推荐(0) 编辑
摘要: 先让我们来看一下xml文件的设定: 这个xml文件设定了一个ID是ComboBoxSample的ComboBox和一个DropDownSample的DropDown.并且为这两个控件... 阅读全文
posted @ 2011-12-15 13:13 许阳 无锡 阅读(573) 评论(0) 推荐(0) 编辑
摘要: 需要说明的是 关于"user32"下被调用函数的声明,私用常量的声明必需放在VBA代码的开头,否则代码不会运行。抓取活动窗口的Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal _ bScan As Byte... 阅读全文
posted @ 2011-12-14 10:45 许阳 无锡 阅读(342) 评论(0) 推荐(0) 编辑
摘要: 实现环境:Visual Studio 2010, Office 2010, VSTO 4.0 public Bitmap GetImage(Office.IRibbonControl C... 阅读全文
posted @ 2011-12-12 12:12 许阳 无锡 阅读(636) 评论(0) 推荐(0) 编辑
摘要: 实现环境:Visual Studio 2010, Outlook 2010, VSTO runtime 4.0C#using System;using System.Collections.Generic;using System.Linq;using System.Text;using Micro... 阅读全文
posted @ 2011-12-12 11:17 许阳 无锡 阅读(623) 评论(0) 推荐(0) 编辑
摘要: 实现环境:Visual Studio 2010MainWindow.xaml MainWindow.x... 阅读全文
posted @ 2011-12-09 15:41 许阳 无锡 阅读(265) 评论(0) 推荐(0) 编辑