Create macro in outlook- Send & Delete

  • Thread starter Thread starter JDebo
  • Start date Start date
J

JDebo

I want to create a macro that that will send then delete the item from my
sent Items.
Once I have this macro I can assign it to a custom botton in my Quick Access
Toolbar. Ther reason I want this button is for emails that you have no need
to keep a copy of. Like "Thanks"
There is a similar button in the Ribbon that says "Save and Close". I want
one that "Send and Delete"

Can any one write a Macro to do this?
 
Tried it but could not get it to work

Hi Michael,

I tried tying the code to a button on the toolbar in Outlook 2007 (Customize toolbar, choose macro, drag project onto the toolbar, same as in 2003 etc) but pushing the button doesn't achieve anything; the email just sits there and isn't even sent.

I think this may be a 2007 thing as I set up vba to send and delete for 2003 which worked fine...but did nothing in 2007; conversely tying the code to the button may be different...but I don't think so.

Any help much appreciated.

Best wishes,

Danny
 
Sorted!

Hi Michael,

Problem solved. I tried to debug the vba by running the code from the vba window and was told that the project had macros disabled. Would have been nice if it told me when I pushed the button :o).

So it all works! Yippeee!

Interestingly the button images you get to assign to a macro in 2007 differ between the start page when you first log in and the compose email page. Hopefully they will be synchronised in later versions.

Thank you for all your help,

Danny
 
I stumbled across this thread on a web search . . . as I was looking to find a way to add this kind of Send & Delete capability for my overstuffed Sent folder's future manageability.

I'm having trouble getting this set up . . . I added the code fine but I can't seem to find the way to create the button and then add it to the compose page. Can someone share more detailed instructions on how this is done? I'm not a programmer or anything, but wanting to get something like this to work and save me lots of headaches with deleting mails later.

Thank you!
 
Outlook 2003?

I am guessing that you have Outlook 2003 or earlier, which makes life tricky as I don't.

In general terms however....create a new email. Right click on any toolbar, choose customise, find your macro (one of the categories in the pane that opens up is macros), drag it onto the toolbar. Right click the macro. Rename it /add pictures etc. When you close the customisation pane the button will be active. If these instructions are too vague try looking in the help under customise toolbar (there may be something I don't know).

Good luck,

Danny
 
Actually, I do have Outlook 2007. I followed your steps and was able to add the button. Thank you! It doesn't seem to work, though, even when I think I have macros enabled (clicking the button doesn't do anything). But I will keep working on it. I did manage to get the button assigned to the macro and add it to the toolbar at least!


Did you have to do anything to the code that was linked to above, or was it just a cut & paste as-is?

**EDIT** Well, seems I figured it out. I enabled macros, but apparently I had to shut down Outlook and restart to get it to work. Works just as I had hoped, though. This will save me a TON of time when I can just have an email deleted that I don't care about keeping after sending. Great for those quick replies and less important garbage and I won't have to clean out the Send box nearly as often.

THANKS!!!!!!!!!!!!!
 
Last edited:
Well done! Why Microsoft don't just have it as a standard option goodness knows :o)

Best wishes,

Danny
 
Thank! This works! Only thing is, that I would like to start the macro from the message.
I am only able to create a macro button in the main outlook menu.
This means I need to switch to the main window first, before I can click the button.
What do I do wrong?
Thanks!
 
Hi Stenflying,

What version of outlook do you have and did you create a new message and then right click on the message toolbars to add the button?
 
Outlook 2003.
I found the problem myself. When you use "email format Word 2003", the macro is not possible to activate within the new message.
I unmarked the use of Word 2003 Format and now it works!

Do you have an idea to use both this Macro and the Word 2003 format?
 
Back
Top