![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi,
I am trying to send a meeting programmatically using following code: try { // 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(Type.Missing, Type.Missing, true, true); // Create a new appointment item. Outlook.AppointmentItem oMsg = (Outlook.AppointmentItem)oApp.CreateItem(Outlook.O lItemType.olAppointmentItem); // Set the subject. oMsg.Subject = "Send Using OOM in C#"; // Add a recipient. Outlook.Recipients oRecips = (Outlook.Recipients)oMsg.Recipients; Outlook.Recipient oRecip = (Outlook.Recipient)oRecips.Add("someone@somewhere. com"); oRecip.Resolve(); // Send. oMsg.Send(); // Log off. oNS.Logoff(); // Clean up. oRecip = null; oRecips = null; oMsg = null; oNS = null; oApp = null; } // Simple error handling. catch (Exception ex) { Console.WriteLine("{0} Exception caught.", ex); } When the "oMsg.Send()" is called, Outlook pops open a dialog box with the following message: "A program is trying to automatically send e-mail on your behalf. Do you allow this?..." Since our requirement is to send meeting automatically behind the scene, we do not want to have this dialog box pop-up everytime we send a meeting request. Is there a way to bypass this message box? Your help would really be appreciated. Thanks a lot. Thanks, Aditya |
Ads |
#2
|
|||
|
|||
![]()
See http://www.outlookcode.com/article.aspx?id=52 for your various options.
-- 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 "Adi" wrote in message ... Hi, I am trying to send a meeting programmatically using following code: try { // 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(Type.Missing, Type.Missing, true, true); // Create a new appointment item. Outlook.AppointmentItem oMsg = (Outlook.AppointmentItem)oApp.CreateItem(Outlook.O lItemType.olAppointmentItem); // Set the subject. oMsg.Subject = "Send Using OOM in C#"; // Add a recipient. Outlook.Recipients oRecips = (Outlook.Recipients)oMsg.Recipients; Outlook.Recipient oRecip = (Outlook.Recipient)oRecips.Add("someone@somewhere. com"); oRecip.Resolve(); // Send. oMsg.Send(); // Log off. oNS.Logoff(); // Clean up. oRecip = null; oRecips = null; oMsg = null; oNS = null; oApp = null; } // Simple error handling. catch (Exception ex) { Console.WriteLine("{0} Exception caught.", ex); } When the "oMsg.Send()" is called, Outlook pops open a dialog box with the following message: "A program is trying to automatically send e-mail on your behalf. Do you allow this?..." Since our requirement is to send meeting automatically behind the scene, we do not want to have this dialog box pop-up everytime we send a meeting request. Is there a way to bypass this message box? Your help would really be appreciated. Thanks a lot. Thanks, Aditya |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to suppress security warning? (Outlook 2002 ATL VC++ addin) | furrbie | Add-ins for Outlook | 1 | October 10th 07 03:44 PM |
Outlook 2003 - Suppress ‘Overdue’ Appointment Reminders? | Agent_C | Outlook - General Queries | 2 | August 23rd 06 01:30 PM |
How do I suppress Outlook warning? | Matthew Speed | Outlook and VBA | 5 | July 17th 06 04:43 PM |
Outlook should have a way to suppress the US (+1) Country Code. | Detailer | Outlook - Using Contacts | 3 | April 26th 06 04:55 AM |
How to suppress Outlook 2000 SP3 warning | Steven Wong | Outlook - General Queries | 3 | March 31st 06 03:28 PM |