Email Merge: Macro recorder will not record Finish & Merge step

Manually, I can 1) open my merge document, 2) open my recipient list in .csv, and 3) Finish & Merge - Send Email Messages.  However, when I record a macro for these steps, only steps 1 and 2 are recorded.  Step 3 will not record whether I use mouse actions or keyboard keystrokes.  How can I automate these three steps without having to manually program code in VBA or use an Add-In?  Thank you!
FWIW, I tried recording here (also Windows 7, Word 2010), using the button in the ribbon to initiate the merge to email. It did record that step partially, as follows:

    With ActiveDocument.MailMerge
        .Destination = wdSendToEmail
        .SuppressBlankLines = True
        With .DataSource
            .FirstRecord = wdDefaultFirstRecord
            .LastRecord = wdDefaultLastRecord
        End With
        .Execute Pause:=False
    End With

So I am wondering what could have gone wrong where you are - I wonder if for example you have allowed the merge to happen, or whether you could have cancelled it in some way that has prevented the recorder from working properly.

But in any case, that's not actually a complete recording of what I specified in the Merge to E-mail dialog box (i.e., the lines of code needed to set the field to use as the email address, the format (HTML etc.) and the Subject are not in there). So unless you are going to use your macro to merge from a Mail Merge Main Document where you have already set up those things, the recorded macro is not going to send anything (error messages will pop up). I don't really see any way around that other than to go in and edit the VBA.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Thank you for your reply, Peter.  Do you know the VBA code for setting up the Send Email parameters (email address location, format (HTML), and subject)?  I'm not a VBA programmer, but I can edit it.  Thank you!

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

  The whole thing would be more like this:

    With ActiveDocument.MailMerge
        .Destination = wdSendToEmail
        .SuppressBlankLines = True
        ' substitute the correct FieldName. You will probably need to
        ' get the case correct, e.g. If the field name is "theField", then "theField" may not work
        .MailAddressFieldName = "FieldName"
        .MailAsAttachment = False 'or True, and omit the .MailFormat line
        .MailFormat = wdMailFormatHTML ' or wdMailFormatPlainText
        .MailSubject = "your subject text"
        With .DataSource
            .FirstRecord = wdDefaultFirstRecord
            .LastRecord = wdDefaultLastRecord
        End With
        .Execute Pause:=False
    End With

 I can't check every detail right now, but I think that will do it.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated October 5, 2021 Views 321 Applies to: