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

Questioning Reply to all usign C#



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old June 30th 06, 04:00 PM posted to microsoft.public.outlook.program_addins
Carl Howarth
external usenet poster
 
Posts: 1
Default Questioning Reply to all usign C#

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
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
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


All times are GMT +1. The time now is 08:50 PM.


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.