+ Reply to Thread
Results 1 to 2 of 2

Excel Mail Merge in VBA

Hybrid View

  1. #1
    Registered User
    Join Date
    10-03-2014
    Location
    London
    MS-Off Ver
    Windows XP
    Posts
    1

    Excel Mail Merge in VBA

    Hi

    I have drafted the below code in Excel 2003. My intent is that will open a word document with an existing mail merge, however when I run it I am presented with the error message, "Run Time Error '438: Object doesn't support this proporty or method"

    Can anyone advise of the code I should use

    Thanks

    Nick


    Sub automateword()
    
    
    'Set wordapp = Documents.Add
    Set appwd = CreateObject("Word.Application")
    appwd.Visible = True
    appwd.Documents.Open Filename:="G:\Corpdata\STRAT_Information\Open\2. Custody\Certification DB\Test_Letter.doc"
    
    
    With appwd.MailMerge
    .MainDocumentType = wdFormLetter
    .OpenDataSource _
    Name:="G:\Corpdata\STRAT_Information\Open\2. Custody\Certification DB\Input Sheet.xls", _
    LinkToSource:=True, AddToRecentFiles:=False, _
    Connection:="Details"
    End With 
    
    end sub

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Excel Mail Merge in VBA

    Cross post http://www.ozgrid.com/forum/showthread.php?t=191248

+ 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. Replies: 2
    Last Post: 01-22-2013, 11:37 AM
  2. Replies: 2
    Last Post: 07-12-2012, 08:11 PM
  3. Using Excel in a mail merge
    By M.H. in forum Excel General
    Replies: 1
    Last Post: 03-16-2007, 03:46 AM
  4. [SOLVED] Can I merge an excel list to an excel sheet like mail merge in wor
    By chcoach in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2006, 03:15 PM
  5. merge with Word How can I get excel to mail merge zip codes plus 4 correctly?
    By Kathy at Sauder Feeds in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-30-2005, 07:05 AM

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