![]() |
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
|
|||
|
|||
![]()
Hello,
I am trying to adapt the code provided here (http://www.outlookcode.com/codedetail.aspx?id=1299) to be used in C# and have managed to so far get the prompt to function correctly. I can't however get the system to programatically remove the unrequired recipients. As a second alternative I tried adding code to close the mail message (something along the lines of MailMsg.close(discard constant) and this did not work either. Here is the code - can anyone help? code private void Inspectors_NewInspector(Microsoft.Office.Interop.O utlook.Inspector Inspector) { object Item = Inspector.CurrentItem; Microsoft.Office.Interop.Outlook.MailItem MailMsg; try { // Check the ItemsType if (Item is Microsoft.Office.Interop.Outlook.MailItem) { MailMsg = (Microsoft.Office.Interop.Outlook.MailItem)Item; if (MailMsg.Size == 0 && MailMsg.Recipients.Count 1) { String Msg = "Do you really want to reply to all of the original recipients?"; DialogResult res = MessageBox.Show(Msg, "Confirm reply to all.", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (res == DialogResult.No) { int count = MailMsg.Recipients.Count; for (int i = 1; i count; i++) { MailMsg.Recipients.Remove(i); } } } } } catch (System.Exception ex) { MessageBox.Show(ex.Message); } finally { Item = null; MailMsg = null; } } /code Thanks, Carl -- Carl Howarth |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook 2003 does not reply with original reply headers indented | Sriram | Outlook - General Queries | 0 | May 17th 06 05:46 PM |
Outlook 2002 "reply" and reply all with original attach ????? | bma19 | Outlook - Installation | 1 | April 7th 06 09:41 PM |
Forwarding mail received on one account usign a different account | chris_meacher | Outlook - Installation | 1 | April 3rd 06 05:51 PM |
why cant I reply to certain recipients by reply or forwarding | kjmac308 | Outlook - General Queries | 2 | February 17th 06 07:45 PM |
This group, reply vs no reply | KathrynBassett | Outlook - Using Contacts | 5 | January 30th 06 12:51 AM |