Referencing a custome FORM control from "AdxOutlookAppEvents1_ItemSend" event

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

Referencing a custome FORM control from "AdxOutlookAppEvents1_ItemSend" event
 
Fumi




Posts: 12
Joined: 2020-12-12
All,

In my vb.netproject, thee are 2 files: frmMain (my stnadard vb.net form) and AddinModule.vb (add in expression vb module).

I am calling "AdxOutlookAppEvents1_ItemSend", and it is working fine.

Private Sub AdxOutlookAppEvents1_ItemSend(sender As Object, e As ADXOlItemSendEventArgs) Handles AdxOutlookAppEvents1.ItemSend



Within this event, I would like to refer to a value on my form. For example, frmMain (my form) contains a text box (txtValue). I would like to get txtValue within "AdxOutlookAppEvents1_ItemSend" event. Is that possible?

Thanks.
Posted 29 Aug, 2021 02:31:59 Top
Andrei Smolin


Add-in Express team


Posts: 17962
Joined: 2006-05-11
Hello Fumi,

You call ADXOlFormsCollectionItem.GetForm({an Explorer or Inspector object here}) to get an ADXOlForm. Then you cast the ADXOlFrom to your form class type e.g. frmMain. Finally, you access the control; you may need to have a public method accessing the control or to make that control public.

Regards from Poland (CEST),

Andrei Smolin
Add-in Express Team Leader
Posted 30 Aug, 2021 03:20:03 Top
Fumi




Posts: 12
Joined: 2020-12-12
Andrei, thanks for getting back to me.

Do you have any samples of this implementation on the website or the developer's manual?

Thanks.

Fumi
Posted 30 Aug, 2021 09:56:49 Top
Andrei Smolin


Add-in Express team


Posts: 17962
Joined: 2006-05-11
Hello Fumi,

Find the GetForm() method used in the code of the sample add-in projects at https://www.add-in-express.com/creating-addins-blog/2020/07/01/sample-com-addin-projects-outlook-excel-powerpoint-word/.

Regards from Poland (CEST),

Andrei Smolin
Add-in Express Team Leader
Posted 31 Aug, 2021 04:22:05 Top
Fumi




Posts: 12
Joined: 2020-12-12
Thank you!
Posted 01 Sep, 2021 09:53:49 Top