![]() |
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 folks,
I would really like to create a button that sends the email and then deletes it from the sent items folder. This would be really useful for getting rid of emails that just say "thanks" etc. Any ideas? Many thanks, Danny |
#2
|
|||
|
|||
![]()
Sub SendIt
On Error Resume Next Set msg = Application.ActiveInspector.CurrentItem msg.DeleteAfterSubmit = True msg.Send End Sub -- 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 "DannyJ" wrote in message ... Hi folks, I would really like to create a button that sends the email and then deletes it from the sent items folder. This would be really useful for getting rid of emails that just say "thanks" etc. Any ideas? Many thanks, Danny |
#3
|
|||
|
|||
![]()
Thank you Sue,
You are a star! Best wishes for the new year. Danny "Sue Mosher [MVP-Outlook]" wrote: Sub SendIt On Error Resume Next Set msg = Application.ActiveInspector.CurrentItem msg.DeleteAfterSubmit = True msg.Send End Sub -- 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 "DannyJ" wrote in message ... Hi folks, I would really like to create a button that sends the email and then deletes it from the sent items folder. This would be really useful for getting rid of emails that just say "thanks" etc. Any ideas? Many thanks, Danny |
#4
|
|||
|
|||
![]()
Hi Sue,
It works fantastically in Outlook.....but not if Word is the email editor. Also I was wondering if it is possible to get round the "a program is trying to send an email" message box. Stillk I love it, it will save a lot of time. Best wishes, Danny "Sue Mosher [MVP-Outlook]" wrote: Sub SendIt On Error Resume Next Set msg = Application.ActiveInspector.CurrentItem msg.DeleteAfterSubmit = True msg.Send End Sub -- 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 "DannyJ" wrote in message ... Hi folks, I would really like to create a button that sends the email and then deletes it from the sent items folder. This would be really useful for getting rid of emails that just say "thanks" etc. Any ideas? Many thanks, Danny |
#5
|
|||
|
|||
![]()
It works fantastically in Outlook.....but not if Word is the email editor.
If you want the code to run from Word VBA, you'd need to instantiate an Outlook Application object with CreateObject: Set objOL = CreateObject("Outlook.Application") Set msg =objOL.ActiveInspector.CurrentItem etc. Also I was wondering if it is possible to get round the "a program is trying to send an email" message box. See http://www.outlookcode.com/d/sec.htm for your options with regard to the "object model guard" security in Outlook 2000 SP2 and later versions. -- 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 "Sue Mosher [MVP-Outlook]" wrote: Sub SendIt On Error Resume Next Set msg = Application.ActiveInspector.CurrentItem msg.DeleteAfterSubmit = True msg.Send End Sub "DannyJ" wrote in message ... Hi folks, I would really like to create a button that sends the email and then deletes it from the sent items folder. This would be really useful for getting rid of emails that just say "thanks" etc. Any ideas? Many thanks, Danny |
#6
|
|||
|
|||
![]()
Dear Sue,
Thank you. I did not know you had a book out. Given that my knowledge of VBA is a 3 day course in Excel Macros and VBA (and your explanation above made me want to hide behind the sofa), would your book be too advanced for me? I am pretty good at using MS Office ....but pretty rubbish at programming. Danny "Sue Mosher [MVP-Outlook]" wrote: It works fantastically in Outlook.....but not if Word is the email editor. If you want the code to run from Word VBA, you'd need to instantiate an Outlook Application object with CreateObject: Set objOL = CreateObject("Outlook.Application") Set msg =objOL.ActiveInspector.CurrentItem etc. Also I was wondering if it is possible to get round the "a program is trying to send an email" message box. See http://www.outlookcode.com/d/sec.htm for your options with regard to the "object model guard" security in Outlook 2000 SP2 and later versions. -- 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 "Sue Mosher [MVP-Outlook]" wrote: Sub SendIt On Error Resume Next Set msg = Application.ActiveInspector.CurrentItem msg.DeleteAfterSubmit = True msg.Send End Sub "DannyJ" wrote in message ... Hi folks, I would really like to create a button that sends the email and then deletes it from the sent items folder. This would be really useful for getting rid of emails that just say "thanks" etc. Any ideas? Many thanks, Danny |
#7
|
|||
|
|||
![]()
My book would probably be just the right level to build on what you already know.
-- 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 "DannyJ" wrote in message news ![]() Dear Sue, Thank you. I did not know you had a book out. Given that my knowledge of VBA is a 3 day course in Excel Macros and VBA (and your explanation above made me want to hide behind the sofa), would your book be too advanced for me? I am pretty good at using MS Office ....but pretty rubbish at programming. Danny "Sue Mosher [MVP-Outlook]" wrote: It works fantastically in Outlook.....but not if Word is the email editor. If you want the code to run from Word VBA, you'd need to instantiate an Outlook Application object with CreateObject: Set objOL = CreateObject("Outlook.Application") Set msg =objOL.ActiveInspector.CurrentItem etc. Also I was wondering if it is possible to get round the "a program is trying to send an email" message box. See http://www.outlookcode.com/d/sec.htm for your options with regard to the "object model guard" security in Outlook 2000 SP2 and later versions. "Sue Mosher [MVP-Outlook]" wrote: Sub SendIt On Error Resume Next Set msg = Application.ActiveInspector.CurrentItem msg.DeleteAfterSubmit = True msg.Send End Sub "DannyJ" wrote in message ... Hi folks, I would really like to create a button that sends the email and then deletes it from the sent items folder. This would be really useful for getting rid of emails that just say "thanks" etc. Any ideas? Many thanks, Danny |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
delete button | Debbie | Outlook Express | 4 | October 10th 06 09:36 PM |
Some items can't be send in outlook 2003. Even after repeatly clicking the send button. | baarts | Outlook - General Queries | 1 | August 9th 06 02:52 PM |
Delete Button grayed out......... | §hirley | Outlook Express | 8 | July 16th 06 09:40 PM |
Delete Excel Command Button Before Email is Sent | White Horse | Outlook and VBA | 1 | April 28th 06 06:01 AM |
How do I modify Delete button to also mark item as read? | [email protected] | Outlook and VBA | 1 | April 24th 06 06:14 AM |