View Single Post
  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
 
Posts: n/a
Default Mail Merge Data Question

When I open the document, a message box pops up with the following
message:
"Opening this document will run the following SQL command:
SELECT * FROM 'Sheet1$'
Data from your database will be placed in the document. Do you want to
continure?"


Certainly that suggests that Word thinks the document is linked to a
datasource. If you say "no" and choose the option to get rid of the mail
merge connection (the fields will be left in the document), then close and
re-open the document, what happens?

Does the document have any macros in it, or is it linked to a template with
an AutoOpen macro?

PEter Jamieson

"Tom Bean" wrote in message
...
Peter,

The commands did not return anything. Since the datasource doesn't exist,
could it be a SQL command in some other object?

When I open the document, a message box pops up with the following
message:
"Opening this document will run the following SQL command:
SELECT * FROM 'Sheet1$'
Data from your database will be placed in the document. Do you want to
continure?"

Do you have any suggestions about what else I could check?

Thanks,
Tom

"Peter Jamieson" wrote in message
...
1. Open the VB editor, type the following in the Immediate window

print activedocument.mailmerge.datasource.name
print activedocument.mailmerge.datasource.connectstring
print activedocument.mailmerge.datasource.querystring

(If you're using Word 2002 unfortunately some of those commands may
fail).

Do the results give you any clues? If not, what are the results?

Peter Jamieson
"Tom Bean" wrote in message
...
I have a mail merge document that has never been linked to a data source
but shows data when Alt-F9 is pressed to hide the merge fields. The data
shown is from a data source, an Excel workbook, that was linked to
another mail merge document but the Excel workbook has been deleted.

My question is: Where is Word getting the data to merge into the
document?

Thanks,
Tom