Re: Basic Mail Merge Question

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



You receive the "Opening this will run the following SQL command" message
when you open a Word mail merge main document that is linked to a data
source - http://support.microsoft.com/?kbid=825765

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Rhino wrote:
I have a document that I wrote to produce a set of labels and it does
a mail merge. The merge works fine and the labels come out perfectly.
I just want to understand one thing.

Whenever I open the document, I get a warning message:

==============================================================
"Opening this document will run the following SQL command:

SELECT * FROM `Members2006` ORDER BY `SequenceNumber` ASC

Data from your database will be placed in the document. Do you want to
continue?

(YES) (NO)
==============================================================

When I press YES, I get a Microsoft Word dialog that says:

Membership_Cards.doc is a mail merge document. Word cannot find its
data source, C:\..\My Data Sources\Members.mdb.

(Find Data Source...) (Options...)

If I click on Options..., it offers to "Remove Data/Header Source" or
"Remove All Merge Info".

Neither of those is quite what I want to do.

My document is creating membership cards for my club and I want the
document to point to a data source whose name includes the current
year. For example, in 2006, I want the document to open a table
called Members2006 in my data source. But in 2007, I want the
document to open a table called Members2007. And so on.

Is that possible? If so, how do I do modify my document to do that?
I'm willing to use a macro if I can't do it any other way.


.



Relevant Pages

  • Re: Mail Merge using Word XP and Access XP
    ... "Opening This Will Run the Following SQL Command" Message When You Open a ... > I have several dozen MS Word mailmerge documents using a MS Access DB (on ... but different disk drive letter) as the data source. ... > following message "Opening this document will run the following SQL ...
    (microsoft.public.word.mailmerge.fields)
  • Re: How do I convert Word 2000 label file to Word 2003?
    ... "Opening This Will Run the Following SQL Command" Message When You Open a ... But all you may really need to do is navigate to the data source after ... "n johnson cpa" wrote in message ... > says "Opening this document will run the following SQL ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Save 2,400 letters saved from merge document
    ... You receive the "Opening this will run the following SQL command" message ... Word MVP web site http://word.mvps.org ... and/or edit individual letters as needed; without linking it to the ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Excel-MS Word Mail Merge open error
    ... You receive the "Opening this will run the following SQL command" message ... Word MVP web site http://word.mvps.org ... Chila 10-22-07 wrote: ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Wierd - Cannot Merge Mail Merge Letter
    ... when you open a Word mail merge main document that is linked to a data ... Word MVP web site http://word.mvps.org ... Opening this document will run the following SQL command. ...
    (microsoft.public.word.mailmerge.fields)