![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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 |
Ads |
#2
|
|||
|
|||
![]() 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 |
#3
|
|||
|
|||
![]()
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 |
#4
|
|||
|
|||
![]() 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: 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 |
#5
|
|||
|
|||
![]()
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 |
#6
|
|||
|
|||
![]() 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: 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 |
#7
|
|||
|
|||
![]()
I found a great macro like you are talking about but I can't remember the
site, but I included the top comment from his macro. Maybe you can do a search for it. ' VBA program for Outlook, (c) Dan Evans. dan at danevans.co.uk ' Will check if your outgoing email mentions an attachment, but you've ' forgotten to attach it "masani paresh" wrote: 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 |
#8
|
|||
|
|||
![]()
Thanks Carol,
The code mentioned by you is available at http://ezinearticles.com/?The-Bigges...Scam&id=259190 It seems to be very useful and thanks for that. It seems to give false alarm in below situation: 1. I got a mail which has "attach" word and also has attachment 2. Now if I reply to that mail(just to say thanks) without having "attach" word as I dont want to attach anything then this macro ask for attachment. Could you tell me how to get rid of this. Thanks, Paresh "Carol Bell" wrote: I found a great macro like you are talking about but I can't remember the site, but I included the top comment from his macro. Maybe you can do a search for it. ' VBA program for Outlook, (c) Dan Evans. dan at danevans.co.uk ' Will check if your outgoing email mentions an attachment, but you've ' forgotten to attach it "masani paresh" wrote: 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 |
#9
|
|||
|
|||
![]()
In situations like that I cancel the macro.
You could write some code to see if the line containing the word 'attach' is preceeded by a but that would work only if your replies are configured that way. Or maybe parse the message looking for ----Original Message--- and stop searching for the word 'attach'. Good luck "masani paresh" wrote: Thanks Carol, The code mentioned by you is available at http://ezinearticles.com/?The-Bigges...Scam&id=259190 It seems to be very useful and thanks for that. It seems to give false alarm in below situation: 1. I got a mail which has "attach" word and also has attachment 2. Now if I reply to that mail(just to say thanks) without having "attach" word as I dont want to attach anything then this macro ask for attachment. Could you tell me how to get rid of this. Thanks, Paresh "Carol Bell" wrote: I found a great macro like you are talking about but I can't remember the site, but I included the top comment from his macro. Maybe you can do a search for it. ' VBA program for Outlook, (c) Dan Evans. dan at danevans.co.uk ' Will check if your outgoing email mentions an attachment, but you've ' forgotten to attach it "masani paresh" wrote: 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 |
#10
|
|||
|
|||
![]()
I am not sure but there must be some flag got be set for current oMail item
so that we should know the mail is getting forwarded or replied or just new. Regards, PAresh "Carol Bell" wrote: In situations like that I cancel the macro. You could write some code to see if the line containing the word 'attach' is preceeded by a but that would work only if your replies are configured that way. Or maybe parse the message looking for ----Original Message--- and stop searching for the word 'attach'. Good luck "masani paresh" wrote: Thanks Carol, The code mentioned by you is available at http://ezinearticles.com/?The-Bigges...Scam&id=259190 It seems to be very useful and thanks for that. It seems to give false alarm in below situation: 1. I got a mail which has "attach" word and also has attachment 2. Now if I reply to that mail(just to say thanks) without having "attach" word as I dont want to attach anything then this macro ask for attachment. Could you tell me how to get rid of this. Thanks, Paresh "Carol Bell" wrote: I found a great macro like you are talking about but I can't remember the site, but I included the top comment from his macro. Maybe you can do a search for it. ' VBA program for Outlook, (c) Dan Evans. dan at danevans.co.uk ' Will check if your outgoing email mentions an attachment, but you've ' forgotten to attach it "masani paresh" wrote: 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 |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Getting a button for my VB Script macro in outlook | Matt L | Outlook and VBA | 1 | April 10th 08 02:54 AM |
Start a macro after clic on "Send" button | [email protected] | Outlook - General Queries | 1 | August 10th 07 05:54 PM |
can't click To: button when sending attached rtf in outlook 2003 | [email protected] | Outlook - General Queries | 0 | February 22nd 07 05:32 PM |
Outlook 2007 Click a Button on the Ribbon through Code | [email protected] | Add-ins for Outlook | 5 | December 14th 06 09:04 PM |
click a button on the toolbar (via VBA?) | Dan | Outlook and VBA | 7 | May 2nd 06 10:35 AM |