M
Mark Lawrence
Outlook 2007, VS2008 with VSTO
I know about creating form regions, associating them with custom message
classes, adding controls to them, using the FormRegionShowing event to fill
the controls with data and so forth.
I'm having difficulty making some fundamental connection that I'd appreciate
pointers to information about.
I have buttons on the ribbon that are going to take action with the
information that's in the controls on the formregion. I need to get to the
controls to collect the data in them and save it off (in this particular
case, they're going to be sent to a database via a web service).
In the button click event handler, how do I get a hold of the object handle
for the form region? I thought about traversing the object hierarchy from
the ActiveInspector and that does lead to the ModifiedFormPages property
(holding a Pages) collection but when I check that property within the event
handler I find it's got a count of 0 even though I have a postItem with a my
form region showing. So I'm kind of scratching my head about how to traverse
down the object hierarchy to the form region.
Should I take an alternative path and call the Close method on the active
inspector and hang my data collection and saving work in the FormRegionClosed
event?
I know about creating form regions, associating them with custom message
classes, adding controls to them, using the FormRegionShowing event to fill
the controls with data and so forth.
I'm having difficulty making some fundamental connection that I'd appreciate
pointers to information about.
I have buttons on the ribbon that are going to take action with the
information that's in the controls on the formregion. I need to get to the
controls to collect the data in them and save it off (in this particular
case, they're going to be sent to a database via a web service).
In the button click event handler, how do I get a hold of the object handle
for the form region? I thought about traversing the object hierarchy from
the ActiveInspector and that does lead to the ModifiedFormPages property
(holding a Pages) collection but when I check that property within the event
handler I find it's got a count of 0 even though I have a postItem with a my
form region showing. So I'm kind of scratching my head about how to traverse
down the object hierarchy to the form region.
Should I take an alternative path and call the Close method on the active
inspector and hang my data collection and saving work in the FormRegionClosed
event?