PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook Form Programming How can I run a macro from a custom button control

Reply

How can I run a macro from a custom button control

 
Thread Tools Rate Thread
Old 20-06-2006, 10:24 PM   #1
=?Utf-8?B?QUE=?=
Guest
 
Posts: n/a
Default How can I run a macro from a custom button control


Hi Experts,

I need to run a macro from a button control in a custom form. I tried to
call the macro from click script code event but it didn't work. What can I do?

Thank you so much for your help.
  Reply With Quote
Old 20-06-2006, 10:35 PM   #2
Sue Mosher [MVP-Outlook]
Guest
 
Posts: n/a
Default Re: How can I run a macro from a custom button control

Put the macro in the ThisOutlookSession module in VBA. You should then be able to call it as Application.MyMacro from your form code.

--
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

"AA" <AA@discussions.microsoft.com> wrote in message news:08CA07E7-2298-48C7-AE89-7CE8CC0C27CF@microsoft.com...
> Hi Experts,
>
> I need to run a macro from a button control in a custom form. I tried to
> call the macro from click script code event but it didn't work. What can I do?
>
> Thank you so much for your help.

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off