Group:  Microsoft Outlook ยป microsoft.public.outlook.program_vba
Thread: Outlook : Run the VBA macro on send button click

Geek News

Outlook : Run the VBA macro on send button click
masani paresh 12/23/2008 3:21:01 PM
Hi Friends,

Is it possible to capture the send button click event from VBA code, read
the body of mail and display message box if there is no attachment attached?

Thanks,
Paresh
Re: Outlook : Run the VBA macro on send button click
"Michael Bauer [MVP - Outlook]" <mb[ at ]mvps.org> 12/23/2008 5:30:07 PM


You could capture the button click, but what about using the SendItem event?

--
Best regards
Michael Bauer - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <http://www.vboffice.net/product.html?pub=6&lang=en>


Am Tue, 23 Dec 2008 07:21:01 -0800 schrieb masani paresh:

[Quoted Text]
> Hi Friends,
>
> Is it possible to capture the send button click event from VBA code, read
> the body of mail and display message box if there is no attachment
attached?
>
> Thanks,
> Paresh
Re: Outlook : Run the VBA macro on send button click
masani paresh 12/24/2008 3:51:00 AM
Thaks for reply Michael. I did not know SendItem event is available. Could
you point me some example where I can use SendItem event?

How would I get the body of mail being sent? and How could I stop sending
mail if it not meets some requirements?

Thanks,
Paresh

"Michael Bauer [MVP - Outlook]" wrote:

[Quoted Text]
>
>
> You could capture the button click, but what about using the SendItem event?
>
> --
> Best regards
> Michael Bauer - MVP Outlook
>
> : Outlook Categories? Category Manager Is Your Tool
> : VBOffice Reporter for Data Analysis & Reporting
> : <http://www.vboffice.net/product.html?pub=6&lang=en>
>
>
> Am Tue, 23 Dec 2008 07:21:01 -0800 schrieb masani paresh:
>
> > Hi Friends,
> >
> > Is it possible to capture the send button click event from VBA code, read
> > the body of mail and display message box if there is no attachment
> attached?
> >
> > Thanks,
> > Paresh
>
Re: Outlook : Run the VBA macro on send button click
"Michael Bauer [MVP - Outlook]" <mb[ at ]mvps.org> 12/24/2008 11:05:44 AM


In the VBA environment, select Application from the left combobox above the
code window, then select ItemSend from the right combobox. That will create
the declaration of the procedure for you. You can read the body from
Item.Body, and set the Cancel argument to True if you want to cancel the
sending process.

--
Best regards
Michael Bauer - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <http://www.vboffice.net/product.html?pub=6&lang=en>


Am Tue, 23 Dec 2008 19:51:00 -0800 schrieb masani paresh:

[Quoted Text]
> Thaks for reply Michael. I did not know SendItem event is available. Could
> you point me some example where I can use SendItem event?
>
> How would I get the body of mail being sent? and How could I stop sending
> mail if it not meets some requirements?
>
> Thanks,
> Paresh
>
> "Michael Bauer [MVP - Outlook]" wrote:
>
>>
>>
>> You could capture the button click, but what about using the SendItem
event?
>>
>> --
>> Best regards
>> Michael Bauer - MVP Outlook
>>
>> : Outlook Categories? Category Manager Is Your Tool
>> : VBOffice Reporter for Data Analysis & Reporting
>> : <http://www.vboffice.net/product.html?pub=6&lang=en>
>>
>>
>> Am Tue, 23 Dec 2008 07:21:01 -0800 schrieb masani paresh:
>>
>>> Hi Friends,
>>>
>>> Is it possible to capture the send button click event from VBA code,
read
>>> the body of mail and display message box if there is no attachment
>> attached?
>>>
>>> Thanks,
>>> Paresh
>>
Re: Outlook : Run the VBA macro on send button click
masani paresh 12/24/2008 11:15:01 AM
Thanks for the reply Michael. Could you please tell me how could I make the
form default after adding this macro?

Thanks,
Paresh

"Michael Bauer [MVP - Outlook]" wrote:

[Quoted Text]
>
>
> You could capture the button click, but what about using the SendItem event?
>
> --
> Best regards
> Michael Bauer - MVP Outlook
>
> : Outlook Categories? Category Manager Is Your Tool
> : VBOffice Reporter for Data Analysis & Reporting
> : <http://www.vboffice.net/product.html?pub=6&lang=en>
>
>
> Am Tue, 23 Dec 2008 07:21:01 -0800 schrieb masani paresh:
>
> > Hi Friends,
> >
> > Is it possible to capture the send button click event from VBA code, read
> > the body of mail and display message box if there is no attachment
> attached?
> >
> > Thanks,
> > Paresh
>
Re: Outlook : Run the VBA macro on send button click
"Michael Bauer [MVP - Outlook]" <mb[ at ]mvps.org> 12/27/2008 2:29:02 PM


Paresh, what form do you talk about? The mentioned VBA code cannot be used
as VBScript behind a custom form.

--
Best regards
Michael Bauer - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <http://www.vboffice.net/product.html?pub=6&lang=en>


Am Wed, 24 Dec 2008 03:15:01 -0800 schrieb masani paresh:

[Quoted Text]
> Thanks for the reply Michael. Could you please tell me how could I make
the
> form default after adding this macro?
>
> Thanks,
> Paresh
>
> "Michael Bauer [MVP - Outlook]" wrote:
>
>>
>>
>> You could capture the button click, but what about using the SendItem
event?
>>
>> --
>> Best regards
>> Michael Bauer - MVP Outlook
>>
>> : Outlook Categories? Category Manager Is Your Tool
>> : VBOffice Reporter for Data Analysis & Reporting
>> : <http://www.vboffice.net/product.html?pub=6&lang=en>
>>
>>
>> Am Tue, 23 Dec 2008 07:21:01 -0800 schrieb masani paresh:
>>
>>> Hi Friends,
>>>
>>> Is it possible to capture the send button click event from VBA code,
read
>>> the body of mail and display message box if there is no attachment
>> attached?
>>>
>>> Thanks,
>>> Paresh
>>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net