+ Reply to Thread
Results 1 to 2 of 2

Preserving link to an Excel sheet when running a mail merge

  1. #1
    Forum Contributor
    Join Date
    04-11-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    242

    Preserving link to an Excel sheet when running a mail merge

    Good morning!

    I am working on a project for a golf course which occassionaly donates gift certificates to local not-for-profit organizations such as churches, associations and the like. I believe that using a Mail Merge process is likely the best way to manage this project. Accordingly, I first created an Excel workbook containing the source data and a separate MS Word document which is the certificate template and destination document. I want users to only interact with the Excel document whenever the need to create a certificate arises. Once the user has completed the required data entry in the Excel document, they can click the button entitled "Create Certificate" which then produces the Certificate in MS Word. The Certificate can be saved and/or printed as a separate file if desired but the key is that the data supporting the certificate is, of course, preserved in the Excel source data file.

    Nowthen, the problem I'm having is trying to PERMANENTLY link the data in an Excel source file to the Word document. Shown below is code I found on the internet that specifies an SQL statement referring to Sheet1 in the source doc. However, when I open the Excel source document and click the "Create Certificate" button, the Word template opens up (as desired) but I then have to manually link it to the source data (i.e., from witin the Word template I choose... Mailings>Select Recipients>Use an Existing List>and then browse out to the source file.

    One final note. When testing this whole process I am occassionally presented with a message asking if I want to run the SQL command... SELECT * FROM 'Sheet1$'. I can't figure out what is driving this.

    I have attached both my Excel source document and the Word template. Be aware that the file paths in the code point to my own system.

    Please Login or Register  to view this content.
    Last edited by Grilleman; 06-17-2019 at 11:29 AM.

  2. #2
    Forum Contributor
    Join Date
    04-11-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    242

    Re: Preserving link to an Excel sheet when running a mail merge

    Thanks to all but I figured it out.

+ 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. [SOLVED] Running the mail merge with VBA
    By orhanceliloglu in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-06-2017, 05:25 PM
  2. Replies: 0
    Last Post: 01-05-2015, 07:35 AM
  3. Mail Merge link with Excel - decimal problem
    By cicihk in forum Excel General
    Replies: 1
    Last Post: 06-06-2014, 05:15 PM
  4. Replies: 2
    Last Post: 07-12-2012, 08:11 PM
  5. Excel running in background after exiting from mail merge
    By Dynamo Nath in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-20-2009, 11:07 AM
  6. [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
  7. Replies: 5
    Last Post: 07-01-2005, 02:05 PM

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