User Defined Fields

  • Thread starter Thread starter James Winton
  • Start date Start date
J

James Winton

I added 4 textbox and 2 command buttons to a custom outlook(2002) form. The
textbox will have validation code on them and are bound to user defined
fields, and the command buttons will open a form to search for a Client No
and are not unbound.

I writing an add-in, and I am trying raise events on these fields using
VB.NET. Can someone share with me the object reference for these fields.
(i.e. Dim withevents myTextBox/myCommandButton as ?).

Thanks
 
My fault, struggling to get the syntax correct. The form I added the
controls to was an Item (MailItem).

I am writing a custom mailitem form, which will become our firms default
mail form, and it will require client no on the form. Record Retention
rules from the SEC.



You cannot raise form-level events, only items from the item (MailItem,
TaskItem, etc.) Your command button code on the form, however, can call a
public method of your COM addin. See
http://www.slipstick.com/dev/comaddins.htm#info

--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.slipstick.com/books/jumpstart.htm
 
So, if you want to use MailItem events in your add-in, such as CustomPropertyChange and PropertyChange, the best solution is to create a wrapper class that can handle multiple MailItem objects open at the same time. The Items Command Bar sample from http://www.microeye.com shows how to do this for Explorer windows.

Alternatively, put the code in the custom form itself. The only control event available is Click; see http://www.slipstick.com/dev/propsyntax.htm#unbound
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.slipstick.com/books/jumpstart.htm
 
Back
Top