Visual Studio Development Bookmark and Share   
 index > Visual Studio Tools for Office > Send Mail using Form Region Button
 

Send Mail using Form Region Button

Hi,

I want to send mail on click of button in the outlook form region. The form region is a replacement of OutLook mail message.

Please let me know how can i achieve this.

AshokTeli  Wednesday, October 07, 2009 10:19 AM

I am able to send mail by using the below code in the button click event but contents I have chanegd in the Form region are not upadated when I receive the mail.

Outlook.

MailItem mailItem = (Outlook.MailItem)this.OutlookItem;
mailItem.Send();

  • Edited byAshokTeli Wednesday, October 07, 2009 10:42 AMchanged
  •  
AshokTeli  Wednesday, October 07, 2009 10:41 AM

Hi,

Would you tell me more about the changes? In my said, I try to use the code you provided, and the changes can be seen when I open the mail item. Here is the code I used:

        private void button1_Click(object sender, EventArgs e)
        {
            Outlook.MailItem mailItem = (Outlook.MailItem)this.OutlookItem;
            mailItem.Subject = "Test1";
            (mailItem as Outlook._MailItem).Send();
        }

You may tell me the reproduce steps. 

Best regards,
Bessie 


Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Bessie Zhao  Monday, October 12, 2009 7:55 AM
We are changing the issue type to "General Discussion" because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to "Question" by opening the Options list at the top of the post window, and changing the type. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Bessie Zhao  Friday, October 16, 2009 10:58 AM

You can use google to search for other answers

Custom Search

More Threads

• Custom Document Property
• deployment problem
• Grab MailItem from File?
• outlook 2007 document.
• Outlook Ribbon customization
• Which suites will this work with?
• Taskpanes created in VSTO workbook visible to all other workbooks which are opened --- How????
• How do I notice when the User change the Date in Outlook Calendar
• How to recover information of the user according to his click ?
• Smart Tags Add-Ins in VSTO 2005 SE