Reply
 
Thread Tools Display Modes
  #1   Report Post  
Paul Lautman
 
Posts: n/a
Default Forgetting source on "non-simple" SQL

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


  #2   Report Post  
Doug Robbins
 
Posts: n/a
Default

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

--
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
"Paul Lautman" wrote in message
...
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




  #3   Report Post  
Paul Lautman
 
Posts: n/a
Default

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.


Doug Robbins wrote:
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


Doug Robbins - Word MVP
"Paul Lautman" wrote in message
...
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




  #4   Report Post  
Paul Lautman
 
Posts: n/a
Default

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?

Doug Robbins wrote:
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


Doug Robbins - Word MVP
"Paul Lautman" wrote in message
...
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




  #5   Report Post  
Paul Lautman
 
Posts: n/a
Default

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.


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MSWord -- link to source doc does not print multi-page source when cleongue Microsoft Word Help 1 March 15th 05 09:11 AM
Make Word simple to use Frustrated with Microsoft Microsoft Word Help 4 February 15th 05 11:17 PM
Cannot Find Its Data Source Dave Foote Mailmerge 3 December 17th 04 11:27 AM
merging Word 2000 data source and word 2003 envelopes Jini Mailmerge 1 December 2nd 04 10:48 PM
disconnect a data source Cindy M -WordMVP- Mailmerge 0 November 30th 04 05:25 PM


All times are GMT +1. The time now is 11:20 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"