- 博客(8)
- 资源 (38)
- 收藏
- 关注
原创 关于VSTO中ReleaseComObject的问题
ReleaseComObject是托管代码中用来通知COM组件销毁COM对象释放内存的显式方法。在.NET程序中引用的COM对象在一般情况下在程序结束时会由GC回收并销毁。而ReleaseComObject可以在程序中通知GC处理销毁COM对象的工作。以我的愚见在一般在VSTO程序中没有必要使用这个方法,当然当你的目标机器内存资源相对紧张的时候你就要考虑使用这个方法了。
2012-04-26 15:55:40 667
原创 免费的Html转rtf方法
Dim reportWebBrowser As New WebBrowser reportWebBrowser.CreateControl() reportWebBrowser.DocumentText = sbHTMLDoc.ToString While reportWebBrowser.DocumentText <> sbHTMLDoc.ToString
2012-04-24 14:48:48 2056
原创 VBA 解析Color的RGB值
在VBA中颜色是以OleColor的形式存在的,如果想要RGB的值需要经过一定的装换。代码如下:Sub ColorAlert(Color As Variant) Dim R%, G%, B% R = Color Mod 256 G = Color \ 256 Mod 256 B = Color \ 256 \ 256 Mod 256
2012-04-24 13:16:47 7694 1
原创 VBA 读写ini文件
在VBA中必须通过调用Win32 API来实现Ini文件读写。Option Explicit 'read Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" _ (ByVal lpApplicationNam
2012-04-23 11:12:27 4371
原创 WdWordDialog.wdDialogContentControlProperties 使用
Dialog newDialog = wordApplication.Dialogs[WdWordDialog.wdDialogContentControlProperties]; newDialog.Show(); 如果没有ContentControl被选中,上面代码会报错。
2012-04-16 13:10:45 700
原创 使用OpenXml为Excel表格添加合计行
添加前表格:运行后结果:实现代码:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows.Forms;using System.IO;using DocumentFormat.OpenXml.Packaging
2012-04-13 13:10:42 2137
原创 Excel的地址解析
在Open Xml中Excel单元格的位置时在CellReference中确定的其格式为[字母][数字]。其总字母标示列的位置,数字表示行的位置。在实际操作过程中我们最初取得的都是数字的行列号。所以必须知道如何在数字的行列号与CellReference格式的行列号之间是如何转化的。这个例子通过正则表达式来完成这个转化。using System;using System.Collectio
2012-04-11 10:45:17 1005
原创 在幻灯片放映过程中动态插入内容
以下示例用来展示在放映幻灯片的过程中动态插入内容。Public Class ThisAddIn Private WithEvents PPApp As PowerPoint.Application Private Sub ThisAddIn_Startup() Handles Me.Startup PPApp = Application End Sub
2012-04-11 10:32:35 1124
用OpenXml向Word文档尾部添加text content控件
2011-12-28
最简单的Excel文档(OpenXml Format)
2011-12-15
Outlook的Globalization和RibbonX
2011-12-15
RibbonX动态生成ComboBox,DropDown的Item
2011-12-15
OpenXmlSDK2.0向PowerPoint2010中插入新幻灯片
2011-12-07
Word Document-Level 应用:在光标处插入文字后光标后移
2011-11-30
Outlook打开会话相关的所有邮件
2011-11-28
Openxml 修改Excel指定单元格
2012-05-24
Outlook Windows Forum Automation
2012-03-06
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人