Associate custom IPM with a custom form

  • Thread starter Thread starter Peter Manesis
  • Start date Start date
P

Peter Manesis

Hi everybody

I want to create an add-in for Outlook 2003 and 2007 with Visual Studio
2005. This add-in will open a custom email form when a custom button is
pressed. Suppose that I have managed that. My question is how to make this
custom form to be opened automatically when one of these custom incoming
emails is clicked. In other words I want the code for my add-in in order to
make my custom form to be opened for viewing or even editing these custom
emails (e.x. IPM.Note.Request).

Thanks in advance
 
You would need to change the value of the item's MessageClass property to IPM.Note.Request. It is the value of that property that governs what form Outlook uses to display the item.
 
Thanks for taking time to answer my question, but that is not the difficult
part. I know how to do this, but what I don't know (and I cannot imagine) is
how to tell Outlook that this custom form (e.x. RequestForm) is the one that
should be opened when an IPM.Note.Request email (of inbox) is double clicked.
I guess that it should be done with some code and maybe using an Outlook
event like "BeforeItemOpen".
 
You would need to publish a custom Outlook form with the message class IPM.Note.Request to the Organizational Forms library on the Exchange server or to each user's Personal Forms library. Your original post -- "This add-in will open a custom email form when a custom button is pressed." -- suggests that you've already done that, because if you hadn't you wouldn't be able to open such a custom email form.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
 
Ok, I am a little bit confused with custom forms and custom MessageClass. Let
me explain.... What I have done since now is to create a custom form (e.x.
RequestForm) using Visual Studio2005 Add-in solution. When I click the custom
button on toolbar, this RequestForm shows up and an IPM.Note object is
created in the constructor of the form, then I set its MessageClass to
IPM.Note.Request and some other custom properties. Finally the object
IPM.Note.Request is sent to the recipient. And here is the problem: Let say
that I have received an IPM.Note.Request email (in the inbox) and I want to
read it or edit it with the RequestForm. How I am supposed to do that with
Visual Studio 2005 because I don't want in any way to use VBscript or
outlook's custom forms (I mean .oft), I just want the solution to be made
100% with Visual Studio. Maybe it is to simple and I don't get it, but how to
publish this RequestForm using Visual Studio 2005 add-in solution?

I hope I was explanatory
Thanks for your time
 
I may be just as confused as you are, because it is not possible to create an Outlook custom form with a Visual Studio 2005 add-in. Custom forms are created either with the form designer built into Outlook or (much more rarely) with C++ and Extended MAPI. What you can do -- with Outlook 2007 *only* -- is create a form region. That would not apply to your solution, given that you said you planned to support Outlook 2003 and 2007.

So is "this RequestForm" a Windows form? If so, please don't call it a "custom form" because that term has a distinctive meaning in an Outlook context.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
 
Yes you are right, I should not call the 'windows form' as 'custom form', it
was confusing. Actually I was afraid from the beginning that the answer to my
question whould be that and now it's true. So I will have to try VBscript or
so. Thanks again for your time.
 
Back
Top