C#VSTO 2005 - 创建MailItem [英] C# VSTO 2005 - creating a MailItem

查看:69
本文介绍了C#VSTO 2005 - 创建MailItem的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我坚持在MAPIFolder中创建mailItems。

背景:我从Web服务获取数据并需要基于此信息在MAPIFolder中创建MailItem。

MAPIFolder本身是以编程方式创建的。这部分工作得很好。

我在做什么不创建MailItems:

MailItem mailItem =(MailItem)_connector.OutlookApplication.CreateItem(OlItemType.olMailItem);
mailItem.Subject = "测试" ;
mailItem.To = " someone@example.com" ;
mailItem.Body = string 。格式( "这里有文字" );
mailItem.Importance = OlImportance.olImportanceLow;
mailItem.Display( false < font style ="font-size:11px">);

解决方案

这是Outlook的问题,你可能想问一下下面的论坛。

http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.outlook.program_vba&cat = en_US_d16e4127-b4e4-41e1-8940-40742a5b9c5d&安培;朗= EN&安培; CR = US

Hi,

 

I'm stuck with creating mailItems in a MAPIFolder.

 

Background: I get data from a webservice and need to create MailItems in a MAPIFolder based on this information.

The MAPIFolder itself is created programatically. This part works just fine.

 

What i'm doing no to create the MailItems:

MailItem mailItem = (MailItem)_connector.OutlookApplication.CreateItem(OlItemType.olMailItem); 
mailItem.Subject = "Test"
mailItem.To = "someone@example.com"
mailItem.Body = string.Format("Here comes the text"); 
mailItem.Importance = OlImportance.olImportanceLow; 
mailItem.Display(false); 

解决方案

This is Outlook question, you may want to ask it at the forum below.

 http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.outlook.program_vba&cat=en_US_d16e4127-b4e4-41e1-8940-40742a5b9c5d&lang=en&cr=US


这篇关于C#VSTO 2005 - 创建MailItem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆