Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / May 2005

Tip: Looking for answers? Try searching our database.

Forgetting source on "non-simple" SQL

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul Lautman - 03 May 2005 13:37 GMT
When I open a mail merge document, Word tells me something like "Opening
this document will run the following SQL command: SELECT * FROM 'Sheet3$'
...". It doesn't tell me the actual DataBase that it'l be using but hey -
can't have everything!

Anyway, in my merge I only want records that have something in the "Name"
field. So I go to the "Mail Merge Recipients" dialog and using the Filter
drop down arrow, select (Nonblanks). I can then perform the merge.

BUT!!! If I save the main document with (Nonblanks) selected, when I
subsequently open it, I see the new SQL statement as "SELECT * FROM
'Sheet3$' WHERE ('Name' IS NOT NULL And 'Name' <> '')" as expected BUT!!! it
then tells me that it cannot find the data source, and I have to go through
the file dialogs to link it to the source once again, and in the process it
looses the (Nonblans) selection once again.

If I save it with the "simple" "SELECT * FROM 'Sheet3$'" (i.e. no filters
applied to the Recipients) then it remembers the data source, if I have a
filter applied then it remembers the filter but forgets the source.

So, how can I get it to remember BOTH the filter AND the source (using Word
2002 (10.6754.6626) SP3)

Any ideas?

TIA
Paul Lautman
Doug Robbins - 03 May 2005 19:11 GMT
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

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> When I open a mail merge document, Word tells me something like "Opening
> this document will run the following SQL command: SELECT * FROM 'Sheet3$'
[quoted text clipped - 27 lines]
> TIA
> Paul Lautman
Paul Lautman - 03 May 2005 21:33 GMT
Not quite my problem.

Yes I see that prompt and yes when I select yes it works fine. I'm not
bothered about the prompt.

My problem is when I have set a filter on the data source and so my prompt
is not exactly that one, but one with the filter details included. In that
case, when I click yes, the data source is NOT attached.

> See the following Knowledge Base article:
>
[quoted text clipped - 37 lines]
>> TIA
>> Paul Lautman
Paul Lautman - 03 May 2005 22:20 GMT
Thanks for trying. I tried it out but all it did was to stop the "Opening
this document..." prompt from coming up.

However, if I had saved the document with the data filter set, the document
is still losing its attachment to the data source.

Anyone got any other ideas?

> See the following Knowledge Base article:
>
[quoted text clipped - 37 lines]
>> TIA
>> Paul Lautman
Paul Lautman - 06 May 2005 11:25 GMT
A post to Woody's Lounge (www.wopr.com) elicited support from one of the
administrators (Hans).

His investigations showed that this is a bug in OLE DB. Choosing ODBC (after
selecting "Confirm Conversion at Open") seems to work OK.

Hope this helps anyone else who comes across this problem.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.