A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

don't want to display in sentitems



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 30th 09, 08:31 AM posted to microsoft.public.outlook.program_addins
hemaneelagiri via OfficeKB.com
external usenet poster
 
Posts: 22
Default don't want to display in sentitems

hi i am able to send mails from outlook through C#, but in some conditions i
don't want to save in sent items and some times i want to display in sent
items
below is my code

// Create the Outlook application.
Outlook._Application oApp = new Outlook.Application();

// Get the NameSpace and Logon information.
Outlook.NameSpace oNS = oApp.GetNamespace("mapi");

// Log on by using a dialog box to choose the profile.
oNS.Logon(Missing.Value, Missing.Value, false, true);

// Create a new mail item.
Outlook._MailItem oMsg = (Outlook.MailItem)oApp.CreateItem
(Outlook.OlItemType.olMailItem);

// Set the subject.
oMsg.Subject = strSubject;

oMsg.Body = strMessage;

if (iPriority == (int)Enums.Priority.High)
oMsg.Importance = Microsoft.Office.Interop.Outlook.
OlImportance.olImportanceHigh;
else if (iPriority == (int)Enums.Priority.Normal)
oMsg.Importance = Microsoft.Office.Interop.Outlook.
OlImportance.olImportanceNormal;
else if (iPriority == (int)Enums.Priority.Low)
oMsg.Importance = Microsoft.Office.Interop.Outlook.
OlImportance.olImportanceLow;

if (strToIds != "")
{
oMsg.To = strToIds;

if (bIsSaveMessage)
oMsg.Save();

oMsg.Send();
}
oNS.Logoff();

oMsg = null;
oNS = null;
oApp = null;

please help me

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...ddins/200909/1

Ads
  #2  
Old September 30th 09, 02:59 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default don't want to display in sentitems

If you don't want a copy of the sent item kept at all under those
circumstances just set the DeleteAfterSubmit property to true on the item
before sending it.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"hemaneelagiri via OfficeKB.com" u54138@uwe wrote in message
news:9ce11e1aaafd3@uwe...
hi i am able to send mails from outlook through C#, but in some conditions
i
don't want to save in sent items and some times i want to display in sent
items
below is my code

// Create the Outlook application.
Outlook._Application oApp = new Outlook.Application();

// Get the NameSpace and Logon information.
Outlook.NameSpace oNS = oApp.GetNamespace("mapi");

// Log on by using a dialog box to choose the profile.
oNS.Logon(Missing.Value, Missing.Value, false, true);

// Create a new mail item.
Outlook._MailItem oMsg = (Outlook.MailItem)oApp.CreateItem
(Outlook.OlItemType.olMailItem);

// Set the subject.
oMsg.Subject = strSubject;

oMsg.Body = strMessage;

if (iPriority == (int)Enums.Priority.High)
oMsg.Importance = Microsoft.Office.Interop.Outlook.
OlImportance.olImportanceHigh;
else if (iPriority == (int)Enums.Priority.Normal)
oMsg.Importance = Microsoft.Office.Interop.Outlook.
OlImportance.olImportanceNormal;
else if (iPriority == (int)Enums.Priority.Low)
oMsg.Importance = Microsoft.Office.Interop.Outlook.
OlImportance.olImportanceLow;

if (strToIds != "")
{
oMsg.To = strToIds;

if (bIsSaveMessage)
oMsg.Save();

oMsg.Send();
}
oNS.Logoff();

oMsg = null;
oNS = null;
oApp = null;

please help me

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...ddins/200909/1


  #3  
Old September 30th 09, 03:35 PM posted to microsoft.public.outlook.program_addins
hemaneelagiri via OfficeKB.com
external usenet poster
 
Posts: 22
Default don't want to display in sentitems

Thanks for your reply

Ken Slovak - [MVP - Outlook] wrote:
If you don't want a copy of the sent item kept at all under those
circumstances just set the DeleteAfterSubmit property to true on the item
before sending it.

hi i am able to send mails from outlook through C#, but in some conditions
i

[quoted text clipped - 46 lines]

please help me


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...ddins/200909/1

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
No contacts displayed...will not display a new one...will not display imported address book HELP!! Duncan Mullins Outlook Express 2 January 26th 08 01:32 AM
Will not display contacts-won't display new contact-won't display imported address book-HELP!! Duncan Mullins Outlook Express 12 January 26th 08 01:04 AM
Shared calendar display reverts to one day per week display AlanTerrill Outlook - Calandaring 0 November 20th 06 10:19 AM
Display SMTP address instead of Display Name DaveB Outlook - Installation 1 September 15th 06 07:23 PM
Cut & Paste Outlook Display Names Into To Field Display As ; PJ Outlook - Using Contacts 0 March 9th 06 05:16 PM


All times are GMT +1. The time now is 09:23 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.