Microsoft 2010 Publisher E-mail Merge

Posted on 2011-04-28
Last Modified: 2012-05-11
I created a microsoft office 2010 email merge document and I can not figure out how to keep the subject line when I click finish and merge. I have tried putting in the information I want in the subject line then sending the emails but when I close the document and open it again select finish and merge the subject field is blank again
Question by:natevelli
    1 Comment
    LVL 16

    Accepted Solution

    You can perform the mail merge FROM outlook, which is the easiest and provide a common subject here for step by step instructions

    If you want to do it from Publisher, there is a VBA solution to your issue, found here

    Basically it says that:
    f you are familiar with VBA, you can use Word's MailMerge events and
    VBA to specify the subject for each email.
    e.g. in the VBA Editor, Insert a new Class Module, name it
    EventClassModule, and insert the following code:

    Public WithEvents App As Word.Application
    Private Sub App_MailMergeBeforeRecordMerge( _
    ByVal Doc As Document, _
    Cancel As Boolean)
    ' set this to be the exact name
    ' of the field you want to use
    ' (uppercase/lowercase are
    ' significant here)
    Const strSubjectFieldName = "mysubjectfield"
    Doc.MailMerge.MailSubject = _
    End Sub

    In an ordinary module, put the following VBA
    Dim x As New EventClassModule
    Sub MergeWithEvents()
    ' Do the merge
    ActiveDocument.MailMerge.Execute Pause:=False
    ' The events fire for all documents
    ' so disable them
    End Sub

    Sub EnableEventHandler()
    Set x.App = Word.Application
    End Sub

    Sub DisableEventHandler()
    Set x.App = Nothing
    End Sub

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
    In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
    This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now