HD Guest
|
Posted: Wed Jun 22, 2005 4:20 pm Post subject: Merge in Word - Using parameter |
|
|
Hi,
I am using Delphi 7 and late binding to the Word application to execute a
merge.
In the OpenDataSource Event, I used to have only the Name
parameter(oMerge.OpenDataSource("c:tempdatasourcename.dbf")), but now, I
need to add the Connection parameter(this to avoid the appearance, while
merging, of an list of ODBC to choose from).
I would like to add the parameter without having to use the "emptyparam" a
certain amount of time. Since I use late binding, I thought that I could
just use the event by naming the parameter and its value, like this:
oMerge.OpenDataSource('Name:= "c:tempdatasourcename.dbf"',
'Connection:="DSN=dBASE files;
DBQ=C:temp; DefaultDir=C:temp; DriverId=533; MaxBufferSize=2048;
PageTimeout=5;" ', 'SQLStatement:="SELECT * FROM datasourcename.dbf"',
'SQLStatement1 :=""')
but it does not seem to work.
Any idea on how I can avoid the EmptyParam solution???
HDumas
|
|