Merge field in the subject line of a Word e-mail mail merge

Orcagal

New Member
Joined
Mar 18, 2014
Messages
1
Hi,

I use Word 2007 for an e-mail mail merge to create personalised invoices. The source data comes from Excel 2007, with fields such as "Contact name" "Firm name" and "month"

While the whole process now runs largely smoothly, one thing bugs me...when I come to send the mail messages, there is no option to insert a merge field into the subject line of the dialogue box that appears, so I have to make do with a generic subject line.

This is both impersonal to the firm, and makes it harder to find a particular invoice once they are saved.

I want to be able to create a personalised Subject line to the effect of

Charges Statement <Month> <Firm>

with the Month and Firm being merge fields.

Is there a simple way around this please? I don't know VBA code or anything like that.

Thanks

Dawn
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
I dont know much about mail merge or VBA but do use Excel to generate an email and use values within cells of the Workbook.

The code below is self explanatory i.e. It picks the recipient from one cell, subject from another, main body text etc...

I guess you would need to learn basic VBA on how to make a macro so you can copy this code into it and then add a button on your sheet to generate the email. Its pretty easy if you have a quick search online. Ron DeBruin has some good info on his site.

Code:
Sub

'Open email
        
    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)

    On Error Resume Next
    With OutMail
        .To = (ActiveSheet.Range("C22").Value)
        .CC = ""
        .BCC = ""
        .Subject = (ActiveSheet.Range("A28").Value)
        .Body = (ActiveSheet.Range("C30").Value)
        .Attachments.Add PDF_Name
        .Display   'or use .Send
    End With
    On Error GoTo 0

    Set OutMail = Nothing
    Set OutApp = Nothing

EndSub
 
Upvote 0

Forum statistics

Threads
1,225,691
Messages
6,186,467
Members
453,358
Latest member
Boertjie321

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top