![]() |
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
|
|||
|
|||
![]()
Good evening everybody,
I am working on a VST add-in. I am using C#, Outlook 2007 and VS2008 I have a Toolbar button that, when clicked, opens a windows form. This part works fine. However, what I am having a problem with is trying to, programmatically, open a new mailItem inspector by clicking on a button that resides on the windows form. I need to do it in this fashion to: 1- be able to populate the mailitem properties using the winForm fields 2- avoid recreating all the functionality(attachment,spell check, follow up, address book, etc ) that is already built into the mail inspector window My question: is it possible to open a new Message Inspector from withing a windows form that is part of an Outlook add-in? If the answer is yes, and I hope so, How would you do it? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ Here is what I have in place so far: public void CreateNewMail(string subject) { Outlook.MailItem mail = null; Outlook.Application m_Outlook = null; try { m_Outlook = Globals.ThisAddIn.Application; mail = (Outlook.MailItem)m_Outlook.CreateItem(Outlook.OlI temType.olMailItem); mail.Subject = subject; mail.Display(false); } catch (System.Exception ex) { MessageBox.Show(ex.Message); } finally { if (mail != null) Marshal.ReleaseComObject(mail); } } Thank you for your time and effort. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Access to MailItem properties before opening new inspector ? | Marcin | Add-ins for Outlook | 8 | April 25th 08 07:50 PM |
Spell check on custom MailItem form when replying | István Becze | Add-ins for Outlook | 1 | June 27th 07 02:14 PM |
Is it possible to open the default Contact form with the Activities tab activated from a custom form? VSTO 2005, Outlook 2003 | David Webb | Outlook and VBA | 1 | June 20th 06 09:59 PM |
Help with 'MailItem' object of WordMail Inspector | [email protected] | Add-ins for Outlook | 2 | May 18th 06 07:28 PM |
Cannot programmatically open custom message in custom form | ms | Outlook - Using Forms | 1 | January 20th 06 03:01 PM |