![]() |
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
|
|||
|
|||
![]()
I have to change the value of "To" field in the compose/reply window in the send event method. The change occurs appropriately but,once the mail is sent, the item is placed in the sent folder but the recipient does not recieve the mail. If the mail is sent without changing the "To" field, it works fine. Can we not change the value of "To" field in send event?
I am using Applicaiton.ItemSend Here is the code for it: private void Composed_Mail_Send(Object obj, ref bool boolVar) { string assigneeStr = null; Outlook.MailItem curItem; MessageBox.Show("Send button clicked"); if (trackBtn.State == Office.MsoButtonState.msoButtonDown) { try { curItem = (Outlook.MailItem)curApp.ActiveInspector().Current Item; assigneeStr = curItem.To; curItem.RecipientReassignmentProhibited = false; MessageBox.Show(curItem.To); curItem.AlternateRecipientAllowed = true; MessageBox.Show("Assignee:" +assigneeStr); curItem.To = curBA.email; MessageBox.Show("From:"+curItem.SenderEmailAddress +"\n To:" +curItem.To); curItem.Body = "/assignee:" + assigneeStr + ; MessageBox.Show(curItem.Body); } catch (Exception exp) { MessageBox.Show(exp.StackTrace +"\n"+"Message:" + exp.Message); } } } |
#2
|
|||
|
|||
![]()
Answered at http://www.outlookcode.com/threads.a...essageid=25439
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Lokesh" wrote in message ... I have to change the value of "To" field in the compose/reply window in the send event method. The change occurs appropriately but,once the mail is sent, the item is placed in the sent folder but the recipient does not recieve the mail. If the mail is sent without changing the "To" field, it works fine. Can we not change the value of "To" field in send event? I am using Applicaiton.ItemSend Here is the code for it: private void Composed_Mail_Send(Object obj, ref bool boolVar) { string assigneeStr = null; Outlook.MailItem curItem; MessageBox.Show("Send button clicked"); if (trackBtn.State == Office.MsoButtonState.msoButtonDown) { try { curItem = (Outlook.MailItem)curApp.ActiveInspector().Current Item; assigneeStr = curItem.To; curItem.RecipientReassignmentProhibited = false; MessageBox.Show(curItem.To); curItem.AlternateRecipientAllowed = true; MessageBox.Show("Assignee:" +assigneeStr); curItem.To = curBA.email; MessageBox.Show("From:"+curItem.SenderEmailAddress +"\n To:" +curItem.To); curItem.Body = "/assignee:" + assigneeStr + ; MessageBox.Show(curItem.Body); } catch (Exception exp) { MessageBox.Show(exp.StackTrace +"\n"+"Message:" + exp.Message); } } } |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to permanently remove a toolbar from compose window | ZenMasta | Outlook - General Queries | 2 | October 23rd 07 07:31 PM |
Compose window not closing after hitting send. | [email protected] | Outlook Express | 14 | April 13th 07 03:46 AM |
NEED TO CHANGE NUMERIC FIELD TO TEXT FIELD | dancer | Outlook - General Queries | 0 | February 10th 07 07:22 PM |
Displaying the From field in outgoing email (as I compose) | John Elliott | Outlook - Installation | 1 | October 13th 06 05:52 PM |
What is the Contacts field used for in the task window? | tarrykin | Outlook - General Queries | 1 | March 24th 06 01:59 PM |