Nasıl Yapılır: E-posta öğesi oluşturma
Bu örnek, Microsoft Office Outlook'ta bir e-posta iletisi oluşturur.
Uygulama alanı: Bu konudaki bilgiler Outlook 2007 ve Outlook 2010 uygulamalarının uygulama düzeyi projelerine yöneliktir. Daha fazla bilgi için bkz. Office Uygulamalarında Kullanılabilir Özellikler ve Proje Türü.
Örnek
Private Sub CreateMailItem()
Dim mailItem As Outlook.MailItem = _
Me.Application.CreateItem(Outlook.OlItemType.olMailItem)
mailItem.Subject = "This is the subject"
mailItem.To = "someone@example.com"
mailItem.Body = "This is the message."
mailItem.Importance = Outlook.OlImportance.olImportanceLow
mailItem.Display(False)
End Sub
private void CreateMailItem()
{
Outlook.MailItem mailItem = (Outlook.MailItem)
this.Application.CreateItem(Outlook.OlItemType.olMailItem);
mailItem.Subject = "This is the subject";
mailItem.To = "someone@example.com";
mailItem.Body = "This is the message.";
mailItem.Importance = Outlook.OlImportance.olImportanceLow;
mailItem.Display(false);
}