Hi Peter, thanks for your reply.
It's not actually that dialog that's the problem. It's the one headed
Select Table, which has the name of the sheet (Sheet1$), description,
modified, etc.. Would this box also require a registry change to get rid
of it?
Thanks
Denise
OK, I was trying to address the original problem, and it /might/ be worth
going back to the original version of the sheet and following the article I
mentioned. But maybe not. Otherwise, it may just be that you need to provide
different connection settings. I would suggest that if you want to connect
using DDE, you use
.OpenDataSource Name:="C:\temp\mailmerge.xls", _
Connection:="Entire Spreadsheet", _
SQLStatement:="SELECT * FROM `Sheet1$`", _
SubType:=wdMergeSubTypeWord2000
You shouldn't need any of the other parameters. Notice that the single
quotes around Sheet1$ are backwards quotes, not the more common vertical
ones. If the Workbook's sheets have been renamed you will probably need to
substitue the actual name used for the sheet. (In fact, that is a possible
reason why it has suddenly gone wrong).
DDE opens a copy of Excel and your user may be able to tell you whether that
is what used to happen. If you just want to use the default method, you may
find that
.OpenDataSource Name:="C:\temp\mailmerge.xls"
is actually enough but if not, try
.OpenDataSource Name:="C:\temp\mailmerge.xls", _
Connection:="", _
SQLStatement:="SELECT * FROM `Sheet1$`"
or
.OpenDataSource Name:="C:\temp\mailmerge.xls", _
Connection:="", _
SQLStatement:="SELECT * FROM `Sheet1$`", _
SubType:=wdMergeSubTypeAccess
(Yes, Access, even though it's an Excel sheet)
If that doesn't help it's difficult to know what to do next - I think I
would try similar code with a newly created sheet. if that works, you may
need to reconstruct the spreadsheet. If it does not, no idea what's wrong!
Peter Jamieson
> Hi Peter, thanks for your reply.
>
[quoted text clipped - 73 lines]
>>>
>>> Denise Crawley
Denise - 21 Jun 2005 13:08 GMT
Peter, you're a genius. I hadn't noticed that the single quotes were
backward ones. I changed them and it works perfectly! Shame on me for not
realising.
Thanks very much for your help. I should have some very happy users now.
Denise
> OK, I was trying to address the original problem, and it /might/ be worth
> going back to the original version of the sheet and following the article I
[quoted text clipped - 117 lines]
>>>>
>>>> Denise Crawley