SQL, merge fields, and other mysteries

G

Geri

Setting the scene...

I have inherited a Filemaker database (Recruitment
Agency). Part of its job is to export (Candidate) data to
a .MER format (called 'Candidate.mer')

A .DOT CV template in Word was created ages ago (by a
previous employee, not trackable) that is nicely
formatted, and holds all the relevant fieldnames that
match the .MER file fields. On opening this .dot
template, a dialogue box is displayed: "OPening this
docuement will run the following SQL command: Select *
from C:\Desktop\Candidate.mer". On selecting 'Yes', it
goes ahead and inserts the related merge field data from
my Filemaker exported file Candidate.mer, into a new
unsaved document.

That's all OK. But now I want to save this document in
plain Word format. So I removed the fields, then save the
file and close it. But no matter what I do, on re-opening
the document (now saved with the name of the Candidate eg
Alvarez.doc etc) it keeps displaying the dialogue box on
opening that asks if I want to run the SQL command. I am
not an SQL expert by any stretch and am stumped.

Here's what I have tried.... Selecting all the text, then
removing fields (CTRL + SHIFT + F9) (that does work, but
doesn't take away the dialogue box on opening). So while
I have removed the fields, there must be some SQL command
embedded in the document that needs to be de-activated in
the saved document. But where?

TIA, Geri
 
D

Doug Robbins

To stop the message from appearing, see the following Knowledge Base
article:
"Opening This Will Run the Following SQL Command" Message When You Open a
Word Document - 825765 at:

http://support.microsoft.com?kbid=825765


--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
P

Peter Jamieson

Normally when you merge to a new document, that document is not a Mail merge
main document and does not have any fields that would cause this problem to
occur. Although it doesn't really sound like it, I am wondering whether you
are actually opening the mail merge main document, using the preview
facilities to move to a specific record in the data source, then saving that
document under a new name - in which case it will still be a mail merge main
document. IN any case, what you probably need to do is...
a. in Word 2000 and earlier, click on the mail merge helper button in the
Mailmerge toolbar, which should be visible. Click on the Create button and
select the "Restore to Normal Word Document" option.
b. in Word 2002 and later, enable the Mailmerge toolbar (Tools|Customize)
if it is not already displayed, click the first button and select the Normal
document option.
 
G

Geri Vaughan

Thanks Doug and Peter

I had done as you suggested, but that didn't work.
Eventually, I did this + selected all the text and
Ctrl+Shift+ F9 to remove fields, and then embedded that
within a macro ... that seems to have done the trick,
although I don't know if it can be done more elegantly.
As to what Peter is suggesting (saving it as a mail
merge) perhaps I am doing that, like I said I don't know
enough about its origin!

Thank you, Geri
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top