none
Macro button for my toolbar in Outlook 2007 RRS feed

  • Question

  • I want to add a button to my toolbar that will reply to active email quotes that I receive with "Please order [#] of the quoted on PO# [000000-M] and send me a confirmation with pricing and lead time."  The brackets I want to be able to fill in with message windows that pop up asking me to enter the values.  Is this asking too much?  I was hoping for a macro that I could just record, but it's not looking that easy.  
    Monday, October 21, 2013 3:17 PM

Answers

  • Hi,

    What's the meaning of "active email quotes"?

    If I understand correctly, I assume you want to add a button in the ribbon to reply a mail with a macro when you receive a mail.

    If you add the button into the ribbon with XML and add a click event to this button with VBA macro, here is a link for your reference: Create a button for a macro

    I write a VBA sample to reply all to the last mail for your reference. I set the body as "Test". You could add the custom form with a textbox and pop up it to fill in the information and add the add the returned value to the body.

    Sub ReplyAllTest()
        Dim oApp As Outlook.Application
        Dim oExplorer As Outlook.Explorer
    
        Dim oMailItem As Outlook.MailItem
        Dim oReply As Outlook.MailItem
        
        Set oApp = Application
        Set oExplorer = oApp.ActiveExplorer
        
        Set oMailItem = oExplorer.CurrentFolder.Items.GetLast
        
        Set oReply = oMailItem.ReplyAll
        
        oReply.Body = "Test"
        
        oReply.Send
    End Sub
    

    Hope it can help you.

    Tuesday, October 22, 2013 11:45 AM