0
votes

I'm working on a simple Outlook 2016 VSTO with a custom ribbon that contains a button and one custom form. I am currently trying to figure out how to display the custom form I created in button click action. I tried instantiating a new form of the custom form (FormAddGroups) type and .Show(); it, but there is something in the constructor I don't understand.

formAddGroups = new FormAddGroups(xxx);
formAddGroups.Show();

It asks me for a formRegion from the current project in the xxx arguement, but I'm not quite sure how to access it, or if it's even the right way of showing it.

I'm also considering creating a custom message class on that button click, but I'm not sure if that's even possible.

Is that the right approach or should I go back?

1

1 Answers

0
votes

Call MAPIFOlder.Items.Add("IPM.Note.MyCustomClass") to create the new item and display it (MailItem.Display).