Thanks, that got me on the right track. 

I googled around and found something that works good. It uses a dsn but it
makes the connection. The user then could use word to insert the merge
fields like usual.


ActiveDocument.MailMerge.MainDocumentType = wdMailingLabels
ActiveDocument.MailMerge.OpenDataSource Name:="", _
Connection:="dsn=ampgpl", SQLStatement:= _
"Select W1CSNM,W1CTNM,W1ADR1,W1CITY,W1STA2,W1ZIP " & _
"From BPCS.AMPGPL.AMP647W AMP647W " & _
"Order by W1CSNM", _
SQLStatement1:="", SubType:=wdMergeSubTypeWord2000 

Dan Goldberg

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of MikeB
Sent: Friday, December 18, 2009 9:49 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: report templates

I use a Word Application written in VBA to print stuff with RBase as the
data source.

I use a DSN-Less connection and would eschew any other connection means as
inflexible and difficult to maintain.

The driver is just RBase, but the connection string would be the same
excepting substutute the Oterro driver:

Watch for line wrap..

Const strCnn = "Provider=MSDASQL.1;DRIVER={R:BASE 7.6 Database Driver
(*.rb1)};DBQ=F:\rb76\bar\bar;UID=;PWD=;"



----- Original Message ----- 
From: "Dan Goldberg" <[email protected]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Friday, December 18, 2009 10:33 AM
Subject: [RBASE-L] - report templates


>I would like to create a report template for letters.
>
> The user would create the guts of the letter in MS Word. I would give them
> the mail merge field naming so they could put it into their Word doc. Then
> they save it as an rtf and e-mail it to me. I then have to go into report
> designer and put it into the report so they can print it.
>
> It would be nice if there was a property to grab the rtf and put it into a
> field on the report.
>
> I have tried oterro but it does not behave nicely with office. Everytime I
> try to connect to the database from Word it gives me an error:
>
> "The Data Connection Wizard cannot obtain a list of databases from the
> specified data source."
>
> Any suggestions??
>
> Dan Goldberg
>
> 


Reply via email to