Results 1 to 2 of 2

Mail merge data source lost when opening document with Macro

Threaded View

jimbojsy Mail merge data source lost... 04-22-2014, 10:15 AM
alansidman Re: Mail merge data source... 04-22-2014, 10:17 AM
  1. #1
    Registered User
    Join Date
    04-22-2014
    Location
    Jersey, Channel Islands
    MS-Off Ver
    Excel 2007
    Posts
    1

    Mail merge data source lost when opening document with Macro

    Hi

    I am using a simple macro to open a word document from excel. The document contains a mail merge to run on records defined with a check box in the workbook, which works fine when opened independantly.
    When i use the macro in excel to open the mail merge the SQL comand to link the data source does not run and defaults to blank

    any help would be appreciated!

    thanks

    my macro:

    Sub Confirmemployment()
    Dim WdApp As Object, WdDoc As Object
    
    Set WdApp = CreateObject("Word.Application")
    WdApp.documents.Open "\\athfile1\2005$\PERSONNEL\OROM Jersey\OROM templates\Confirmation of Employment.docx"
    WdApp.Visible = True
    
    End Sub
    Last edited by alansidman; 04-22-2014 at 10:17 AM. Reason: Code tags added

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro to insert a TOC after Mail Merge to new document from Excel vba
    By nickveeken in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-31-2014, 04:56 AM
  2. Microsoft Mail Merge macro not printing document
    By Jenn68 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-12-2012, 05:26 AM
  3. Excel Macro to Import Data Into Word Mail Merge Document
    By djboyag in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-21-2012, 10:09 AM
  4. Replies: 0
    Last Post: 11-30-2005, 04:45 AM
  5. Replies: 1
    Last Post: 08-30-2005, 09: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