How to run the custom Appointment form code ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I’ve developed my COM AddIn. (C++) I have the custom button on toolbar inside
of the Appointment form.
When user clicks on this button then I have to execute some VB methods
inside of my custom form.
Could you advise please how to make it work?
Thanks
 
You mean that you want VBScript (not VB) code that is part of your custom form to run? Why not put the code in your addin?

If you really do want code on the form to run, you'll need to make an event on the form fire to run the code, e.g. change a property value to invoke the PropertyChange or CustomPropertyChange event.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
This is very common scenario by my opinion.
You develop AddIn which introduces a button on Appointment form then You
develop the custom Appointment tab (form) which has some routines on the
script level in order to communicate with the back-end, retrieve the data and
populate fields on the custom form.
In order to run this VBA routine inside of the form (I'm confused since some
sources call it VBSript and some VBA) user has to push on AddIn button and
then I have to run the routine inside of the script. I could access the
_UserForm object and then get access to all controls, but there is no such
method as "Execute" to run the code inside of the script.
 
The scenario you describe is not, in fact, common at all. Most add-in applications put all the code in the add-in, rather than dividing it between a custom form and the add-in.

There should be no confusion on this point: Code behind an Outlook custom form is VBScript, always VBScript. It is all event-driven code. Therefore, to run any routine behind the form, you must cause the item to fire the appropriate event.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top