+ Reply to Thread
Results 1 to 2 of 2

VBA, Word, Excel and MailMerge

  1. #1
    Registered User
    Join Date
    04-22-2020
    Location
    London
    MS-Off Ver
    16
    Posts
    5

    VBA, Word, Excel and MailMerge

    Hello! I have built a macro to generate and send invoices using the full Microsoft Office Suite and VBA. Cover letters are generated using Word and MergeMail. It's working pretty smoothly except when the macro opens the template mail in Word, it always ask to select the table from Excel. I would really like to get my program to OK this step automatically. Any suggestion?

    Set docMail = wrdApp.ActiveDocument

    With docMail.MailMerge

    .MainDocumentType = wdCatalog
    .OpenDataSource Name:="Y:\Accounts\Credit Control\CreditControlSystem.xls", _
    ReadOnly:=True, _
    Connection:="aaSummary"

    This is where i get stopped to OK the table selection.
    Attached Images Attached Images

  2. #2
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: VBA, Word, Excel and MailMerge

    Did you try Connection:="aaSummary$"

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Use Excel Macro to run a Word mailmerge
    By davidm_uk in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-25-2014, 03:14 PM
  2. Mailmerge from Excel and Word to new word document
    By PooH in forum Word Programming / VBA / Macros
    Replies: 3
    Last Post: 11-12-2011, 05:09 PM
  3. Excel - Word Mailmerge
    By OLDCell in forum Word Formatting & General
    Replies: 0
    Last Post: 06-29-2010, 10:04 AM
  4. [SOLVED] Word/Excel Mailmerge problems
    By havenlad in forum Excel General
    Replies: 3
    Last Post: 07-11-2006, 01:35 PM
  5. [SOLVED] Excel Word - Mailmerge
    By Peppermint in forum Excel General
    Replies: 1
    Last Post: 03-02-2006, 01:30 PM
  6. [SOLVED] can i use mailmerge to in excel like you would in word?
    By acain1711 in forum Excel General
    Replies: 3
    Last Post: 02-07-2006, 07:55 AM
  7. [SOLVED] How do I do an excel merge like a word mailmerge with another exc.
    By jaewon223 in forum Excel General
    Replies: 0
    Last Post: 02-28-2005, 01:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1