Want to set RegionState programmatically but can only set DefaultRegionState

Add-in Express™ Support Service
That's what is more important than anything else

Want to set RegionState programmatically but can only set DefaultRegionState
 
aydio


Guest


Hi,

this is my first time digging through Add-In Express code so apologies if the question is dumb.

I want to programmatically collapse the Outlook form / task pane and found the following article explaining the RegionState property: https://www.add-in-express.com/creating-addins-blog/2010/06/25/outlook-regions-forms-size-state/

However, I didn't see any instance of AdxOlForm in our code base but instead, I found AdxOlFormsCollectionItem. Here, I only seem to be able to set the DefaultRegionState property.

I just want to be able to set the RegionState property during runtime. What am I missing?

Thanks!

Cheers,
aydio
Posted 30 Aug, 2018 02:56:44 Top
aydio


Guest


Just solved it myself - it turns out that the AdxOlFormsCollectionItem contains the AdxOlForm which you can retrieve with GetCurrentForm().
Posted 30 Aug, 2018 03:18:14 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hello,

Thank you for letting us know.

I'd suggest using ADXOlFormsCollectionItem.GetForm() instead of GetCurrentForm; see also section Outlook form region's instancing at https://www.add-in-express.com/docs/net-outlook-forms.php#caching.


Andrei Smolin
Add-in Express Team Leader
Posted 30 Aug, 2018 03:31:10 Top