Answered by:
[C#]RegionForm New Mail

Question
-
Hello everybody.
I'm French, so i'll do my best to be understandable.
I want to create a RegionForm IPM.Note, and to "call" it from a button in a Ruban (for example).
If someone have something on it.
Thanks.Wednesday, October 12, 2011 8:56 AM
Answers
-
There are lots of articles and samples for getting started with Form Regions, you can try these to start:"Corredera Romain" <=?utf-8?B?Q29ycmVkZXJhIFJvbWFpbg==?=> wrote in message news:189cdbd3-0367-4651-ae3e-f678aa184b76...
Hello everybody.
I'm French, so i'll do my best to be understandable.
I want to create a RegionForm IPM.Note, and to "call" it from a button in a Ruban (for example).
If someone have something on it.
Thanks.
Ken Slovak MVP - Outlook- Marked as answer by 许阳(无锡) Wednesday, November 2, 2011 8:42 AM
Wednesday, October 12, 2011 2:20 PM -
I done this, and it work :
I maked a FormRegion with a (IPM.Perso) MessageClass, replacement , and when i want to display it i created a new mail item with "IPM.Perso" messageclass.
Easy. ;D Like this :Outlook.
Application ObjOutlook = new Outlook.Application
();
Outlook.
NameSpace
ObjNS;
Outlook.
MAPIFolder
ObjFolder;
Outlook.
MailItem
objForm;
Outlook.
Items ObjItems;
ObjOutlook.CreateObject(
"Outlook.Application"
);
ObjNS = ObjOutlook.GetNamespace(
"MAPI"
);
ObjFolder = ObjNS.GetDefaultFolder(Outlook.
OlDefaultFolders
.olFolderNotes);
ObjItems = ObjFolder.Items;
objForm = ObjItems.Add(
"IPM.Perso"
);
objForm.Display();
- Marked as answer by Corredera Romain Tuesday, November 15, 2011 1:49 PM
Tuesday, November 15, 2011 1:48 PM
All replies
-
There are lots of articles and samples for getting started with Form Regions, you can try these to start:"Corredera Romain" <=?utf-8?B?Q29ycmVkZXJhIFJvbWFpbg==?=> wrote in message news:189cdbd3-0367-4651-ae3e-f678aa184b76...
Hello everybody.
I'm French, so i'll do my best to be understandable.
I want to create a RegionForm IPM.Note, and to "call" it from a button in a Ruban (for example).
If someone have something on it.
Thanks.
Ken Slovak MVP - Outlook- Marked as answer by 许阳(无锡) Wednesday, November 2, 2011 8:42 AM
Wednesday, October 12, 2011 2:20 PM -
I read it.
But i didnt find a solution for my problem.
I would to display or not my region form by an button on the ruban.Friday, November 4, 2011 10:51 AM -
As far as I know you would have to change the MessageClass of the item to one that does or doesn't use the form region and re-display the item (or re-select it in the Explorer in 2010 only)."Corredera Romain" <=?utf-8?B?Q29ycmVkZXJhIFJvbWFpbg==?=> wrote in message news:7e9d293b-40bf-4ccb-83d3-ff82c0472a78...
I read it.
But i didnt find a solution for my problem.
I would to display or not my region form by an button on the ruban.
Ken Slovak MVP - OutlookFriday, November 4, 2011 1:23 PM -
I'll explain better.
In a 2010 AddIn Project, i Have a Ruban, and A FormRegion.cs (and my classes & forms).
Manifest : FormRegionType = Adjoining.
And FormRegionMessageClass("IPM.Note")]
So , when I launch my Solution, I Have my RegionForm here :
"Zone de formulaire" Contain my RegionForm.
How do the same that this clic on this button ?If you need more explications , tell me.
Thanks for your answers.
Friday, November 4, 2011 2:57 PM -
If you are using your form region with all message items there's no way to do what you want that I know of without changing message classes to a custom class then.I do not think you will be able to do what you want to do."Corredera Romain" <=?utf-8?B?Q29ycmVkZXJhIFJvbWFpbg==?=> wrote in message news:97c01b7c-bf9c-41cd-9900-b01c495b2db7...
I'll explain better.
In a 2010 AddIn Project, i Have a Ruban, and A FormRegion.cs (and my classes & forms).
Manifest : FormRegionType = Adjoining.
And FormRegionMessageClass("IPM.Note")]
So , when I launch my Solution, I Have my RegionForm here :
"Zone de formulaire" Contain my RegionForm.
How do the same that this clic on this button ?If you need more explications , tell me.
Thanks for your answers.
Ken Slovak MVP - OutlookFriday, November 4, 2011 3:03 PM -
So, if i create a new MessageClass like IPM.Note.Perso
How Launch my Form only when I want to ?
Presently i want to Keep the default Form for the "normal" message,and i want to use a 2nd Form for "my messages".
Because After changing the MessageClass i dont find the button "Zone de formulaire".Thanks.
Friday, November 4, 2011 3:12 PM -
I have no idea what "Zone de formulaire" is.If you register your form region to only work for a custom MessageClass you can set the MessageClass for any open Inspector's CurrentItem, or you can set it when the item opens, or you can use the Add method of a folder's Items collection or you can use CreateItemFromTemplate. In other words the same ways you'd open any item with a custom MessageClass."Corredera Romain" <=?utf-8?B?Q29ycmVkZXJhIFJvbWFpbg==?=> wrote in message news:bf18eae1-244b-4235-a7cd-7d544a4d5459...
So, if i create a new MessageClass like IPM.Note.Perso
How Launch my Form only when I want to ?
Presently i want to Keep the default Form for the "normal" message,and i want to use a 2nd Form for "my messages".
Because After changing the MessageClass i dont find the button "Zone de formulaire".Thanks.
Ken Slovak MVP - OutlookFriday, November 4, 2011 3:36 PM -
I done this, and it work :
I maked a FormRegion with a (IPM.Perso) MessageClass, replacement , and when i want to display it i created a new mail item with "IPM.Perso" messageclass.
Easy. ;D Like this :Outlook.
Application ObjOutlook = new Outlook.Application
();
Outlook.
NameSpace
ObjNS;
Outlook.
MAPIFolder
ObjFolder;
Outlook.
MailItem
objForm;
Outlook.
Items ObjItems;
ObjOutlook.CreateObject(
"Outlook.Application"
);
ObjNS = ObjOutlook.GetNamespace(
"MAPI"
);
ObjFolder = ObjNS.GetDefaultFolder(Outlook.
OlDefaultFolders
.olFolderNotes);
ObjItems = ObjFolder.Items;
objForm = ObjItems.Add(
"IPM.Perso"
);
objForm.Display();
- Marked as answer by Corredera Romain Tuesday, November 15, 2011 1:49 PM
Tuesday, November 15, 2011 1:48 PM