User Defined Fields

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
 
S

Sue Mosher [MVP]

J

James Winton

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
 
S

Sue Mosher [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top