
Signature
Edoardo Benussi - edo@mvps.org
Microsoft® MVP - Windows Server
http://mvp.support.microsoft.com
OK, some more info that may help you:
a. when you use MS Query to set up a merge data source, it is really only
used to generate the SQL Query that Word uses to get the data. After you
have set up the merge, Word does not use MS Query to get the data (unless
you are connecting to a .dqy that you have saved from MS Query, in which
case things are different).
b. you can inspect the value of
ActiveDocument.MailMerge.DataSource.QueryString to see what SQL Word is
issuing. However, in Word 2002 you may not be able to do that - in that case
you can save your document as HTML format, open the HTML file using e.g.
Notepad, and look for the block of MailMerge information near the top.
c. (Probably not relevant) By the time the field format switches operate on
the data, all the data is in /text/ format (in other words, as far as I
know, the switches are not working with the underlying ISO datatime format,
they are working with the text string you see when you just use { MERGEFIELD
MYDATE }
d. If you are using either Word 2002/2003 yu can always try the OLEDB route
instead...
Peter Jamieson
>> I have tried to replicate this problem using an SQL server source but
>> have not been able to do so.
[quoted text clipped - 26 lines]
>
> Regards.
Edoardo Benussi [MVP] - 21 Apr 2005 10:28 GMT
[cut]
> c. (Probably not relevant) By the time the field format switches
> operate on the data, all the data is in /text/ format (in other
> words, as far as I know, the switches are not working with the
> underlying ISO datatime format, they are working with the text string
> you see when you just use { MERGEFIELD MYDATE }
[cut]
goal!
i have modified the "select" instruction in msquery
from
select mydate from ...
in
select cast(mydate as char(20)) from ...
and
{ MERGEFIELD MYDATE \@ "dd/MM/yyyy"}
work fine.
tnx.
Bye.

Signature
Edoardo Benussi - edo@mvps.org
Microsoft® MVP - Windows Server
http://mvp.support.microsoft.com