Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Run command in an Outlook 97 form

0 views
Skip to first unread message

Blurp

unread,
Mar 14, 2000, 3:00:00 AM3/14/00
to
Is it possible to run a command or an application by clicking on a button in
a custom form in outlook 97 ?

How can I do that ?

Mathieu.


Daniel B

unread,
Mar 14, 2000, 3:00:00 AM3/14/00
to
Mathieu,

To run an Outlook command include the following line in
the button's Click event:
Item.GetInspector.CommandBars.ActiveMenuBar.Controls(idOfYourCommand).Execute

To run an Application include the following line in the
button's Click event:
Set myApp = Application.CreateObject("objectName")

To find out which object name you have to use for the
application, use the Registry editor and look in
HKEY_CLASSES_ROOT.

To start MS Word you have to use "Word.Application" and
then code:

myApp.Activate

To start MS Excel you have to use "Excel.Application"
and then code:

myApp.Visible = True

Daniel

0 new messages