View Single Post
  #3  
Old March 25th 08, 10:00 PM posted to microsoft.public.outlook.program_forms
morna
external usenet poster
 
Posts: 11
Default Save a Form Region Content

On Mar 25, 1:05*pm, "Sue Mosher [MVP-Outlook]"
wrote:
VS 2008 or VSTO 2005 SE? If 2008, did you create the region in the designer or import an .ofs file?

To create a new instance of a custom form programmatically, use the Add method on the target folder's Items collection:

* * newItem = targetFolder.Items.Add("IPM.Appointment.MS Event")
* * newItem.Display

If the target is a default folder, you can use the Namespace.GetDefaultFolder method to return it as a Folder object.

--
Sue Mosher, Outlook MVP
* *Author of Microsoft Outlook 2007 Programming:
* * *Jumpstart for Power Users and Administrators
* *http://www.outlookcode.com/article.aspx?id=54



"morna" wrote in ...
I have created a form region from a IPM.Appointment item and have my
new item on the Actions menu "New MS Event". *Two things...when I
select "New MS Event" in a calendar I am presented with the new form
region that I created. *I populate all the fields on the form region
and the select "Save" button on the Ribbon. *When I select open again
on the item I saved the fields on the form region are not populated.
I have this built within a VSTO addin and I can catch the
FormRegion_FormRegionClosed(..) event.. should I be saving the content
of this form region or should Outlook be saving the content? *Does
anyone have a code example?


Also - I would like to put a "MS Event" commandbar on the content menu
when a user right clicks on the calendar - I have a commandbar
included there, however don't know what to put in the event handler to
make the new form region to appear...anyone got any thoughts?


Thanks for your time.
-Morna- Hide quoted text -


- Show quoted text -


Hey Sue -

I used VS 2008 and I did create the region in the designer?

How can I get a hook to the FormRegion.cs object from the ThisAddin
class? Also... when a user selects the "Save" on the ribbon of the
FormRegion can I catch this event in my addin?
I can create a new appointment item on the fly if I can catch the save
event and the use UserProperties to save fields that are not really in
the IPM.Appointment object and save them to the MS Event folder if I
can catch the "Save" event that fires when a user selects the "Save"
on the ribbon of the FormRegion... just thinking out loud.

Thanks so much for your time.

-Morna

Ads