Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook - Using Forms (http://www.outlookbanter.com/outlook-using-forms/)
-   -   How to run the custom Appointment form code ? (http://www.outlookbanter.com/outlook-using-forms/43859-how-run-custom-appointment-form.html)

DP March 20th 07 05:27 AM

How to run the custom Appointment form code ?
 
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

Sue Mosher [MVP-Outlook] March 20th 07 02:23 PM

How to run the custom Appointment form code ?
 
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
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"DP" wrote in message ...
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


DP March 20th 07 03:02 PM

How to run the custom Appointment form code ?
 
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.


"Sue Mosher [MVP-Outlook]" wrote:

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
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"DP" wrote in message ...
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



Sue Mosher [MVP-Outlook] March 20th 07 03:48 PM

How to run the custom Appointment form code ?
 
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
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"DP" wrote in message ...
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.


"Sue Mosher [MVP-Outlook]" wrote:

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.

"DP" wrote in message ...
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




All times are GMT +1. The time now is 10:28 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com