Outlook 2010 用代码在Outlook explorer中选中一个邮件
2011-11-22 16:36
417 查看
这个代码只能在Outlook 2010中使用
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Office.Tools.Ribbon; using Outlook = Microsoft.Office.Interop.Outlook; using System.Windows.Forms; namespace OutlookAddIn18 { public partial class Ribbon1 { private void Ribbon1_Load(object sender, RibbonUIEventArgs e) { } private void button1_Click(object sender, RibbonControlEventArgs e) { Outlook.Application app = Globals.ThisAddIn.Application; Outlook.Explorer exp = app.ActiveExplorer(); Outlook.MailItem item = app.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox).Items[3]; exp.ClearSelection(); exp.AddToSelection(item); } } }
相关文章推荐
- Outlook 2010 用代码在Outlook explorer中选中一个邮件
- office 2010/账户配置POP方是收取邮件,服务器上保留副本,收取一遍完成后,按F9,OUTLOOK重复收所有
- Outlook 2010遍历会话相关的所用邮件
- Outlook 2010 从磁盘读取一个HTML文件作为Email的Body
- outlook 2010 邮件模板使用
- 基于Windows Azure 搭建基于SharePoint 2010 Intranet、Extranet、Internet (4): 配置传出邮件服务: 使用 outlook.com 发送邮件通知
- Outlook 中,怎么将一个邮件放进两个(或更多)文件夹里?
- Outlook 2010 中查看邮件头
- Outlook 2010遍历会话相关的所用邮件
- Outlook 2010使用VBA将一个MAPIFolder目录下的MailItem移到它的一个子目录下
- Outlook 2010 从磁盘读取一个HTML文件作为Email的Body
- outlook 明明选中在已发送邮件保存副本为什么没有保存副本?
- 备份 Outlook 2010 中接收到的邮件和联系人
- Outlook 2010使用VBA将一个MAPIFolder目录下的MailItem移到它的一个子目录下
- outlook 2010邮件传输接口错误解决一例
- Outlook 2010邮件管理OBA插件
- 上一篇c#和outlook发送邮件使用的file类的部分代码
- [Office] Microsoft Office Outlook 2007/2010 设置邮件已读/未读快捷键
- 一个往Outlook邮件中嵌图片的例程
- Outlook 2010上的定时发送邮件