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




Posts: 3
Joined: 2018-08-30
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




Posts: 3
Joined: 2018-08-30
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: 17375
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.

Regards from Belarus (GMT+3),

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