最近有这样一个需求,发邮件时To给谁谁希望能按照字母顺序排序,避免不必要的顾虑,你懂的
经过分析,1.需要找到读To 区域的方法 2.读取后分割字符串到数组 3. 经过数组排序后输出到To中
简单代码如下:
MailItem mail = Globals.ThisAddIn.Application.ActiveInspector().CurrentItem as MailItem;
string[] namelist = Regex.Split(mail.To,"; ",RegexOptions.IgnoreCase);
mail.To = null;
label1.Label = null;
Array.Sort(namelist);
foreach (string name in namelist)
label1.Label+= name + ';';
mail.To = label1.Label;
效果如下:
最近有这样一个需求,发邮件时To给谁谁希望能按照字母顺序排序,避免不必要的顾虑,你懂的经过分析,1.需要找到读To 区域的方法 2.读取后分割字符串到数组 3. 经过数组排序后输出到To中简单代码如下:MailItem mail = Globals.ThisAddIn.Application.ActiveInspector().CurrentItem as MailItem;...
Learn to build custom Office applications with this new
Microsoft
development tool
Designed to attract both VBA (Visual Basic for Applications) and Visual Studio developers,
VSTO
(Visual Studio Tools for Office) is a Visual Studio add-in that makes it easy to create custom Office applications. This book shows developers step by step how to work with
VSTO
tools to create real-world applications for Word,
Outlook
, and Excel.
VSTO
enables developers to easily create custom applications for
Microsoft
Office
In the fun and friendly For Dummies style, this book explains how to build effective user interfaces and integrate
VSTO
applications with Sharepoint and other
Microsoft
server products
All code is presented in Visual Basic, making the book accessible to both VB and VBA programmers
VSTO
For Dummies will get you up and running with this exciting technology quickly and easily.
VSTO
For Dummies 英文无水印原版pdf
pdf所有页面使用FoxitReader、PDF-XChangeViewer、SumatraPDF和Firefox测试都可以打开
本资源转载自网络,如有侵权,请联系上传者或csdn删除
查看此书详细信息请在美国亚马逊官网搜索此书
1.当前工作簿:workBook = Globals.ThisAddIn.Application.ActiveWorkbook;
2.当前工作表:workSheet = (Excel.Worksheet)workBook.ActiveSheet;
3.工作簿名: workBookName = workBook.Name;
4.工作表名: workSheetName = wor...
非关键字比较
关键字比较关键字比较就是通过关键字之间的比较和移动,从而使整个序列有序,
而关键字比较的算法,又可以像下面这样划分:对于
排序
算法之间的比较,无异于时间复杂度和空间复杂度,看下面这张表格
由上表不难得出下面这几个重要的点:
从平均时间性能而言,快速
排序
最佳,其所需时间最佳,但快速
排序
在最坏情况下的时间性能不如堆
排序
和归并
排序
。堆
排序
和归并之间,
您可以使用
Microsoft
.Office.Interop.
Outlook
命名空间中的 AppointmentItem 类来获取
Outlook
中的会议预定信息。以下是一个示例代码:
```csharp
using
Outlook
=
Microsoft
.Office.Interop.
Outlook
;
// 获取
Outlook
应用程序对象
Outlook
.Application
outlook
App = new
Outlook
.Application();
// 获取当前用户的默认日历文件夹
Outlook
.Folder calendar =
outlook
App.Session.GetDefaultFolder(
Outlook
.OlDefaultFolders.olFolderCalendar) as
Outlook
.Folder;
// 获取所有会议预定项
Outlook
.Items items = calendar.Items;
items.IncludeRecurrences = true;
items.
Sort
("[Start]");
// 遍历所有会议预定项
foreach (
Outlook
.AppointmentItem item in items)
// 判断是否为会议预定
if (item.MeetingStatus ==
Outlook
.OlMeetingStatus.olMeeting)
// 获取会议预定信息
string subject = item.Subject;
string organizer = item.Organizer.Name;
DateTime start = item.Start;
DateTime end = item.End;
string location = item.Location;
string body = item.Body;
// 处理会议预定信息
// ...
注意:您需要在项目中引用
Microsoft
.Office.Interop.
Outlook
.dll,并且需要安装
Outlook
应用程序。
检索COM 类工厂中 CLSID 为 {000209FF-0000-0000-C000-000000000046} 的组件失败,错误: 80080005
2301_78599736:
An exception was thrown while activating xxxxController
lufushan1245:
An exception was thrown while activating xxxxController
lufushan1245:
BMIDE导入项目报编码错误
定位到这个文件textsrv_text.xml的最下面
再添加一行utf-8的就可以啦
An exception was thrown while activating xxxxController
bill800208:
死锁:Transaction (Process ID) was deadlocked on lock resources with another process and has been chose
检索 COM 类工厂中 CLSID 为 {} 的组件失败, 内存资源不足,无法处理此命令