Mail merge with SQL Server view as source

D

DataDay

I'm trying to run an MailMerge where the source is an SQL Server view, but
I'm getting a "Word was unable to open the data source" message.

The final goal is to do this with code, but I can't even get it to work
manually.
 
C

Cindy M.

Hi =?Utf-8?B?RGF0YURheQ==?=,
I'm trying to run an MailMerge where the source is an SQL Server view, but
I'm getting a "Word was unable to open the data source" message.

The final goal is to do this with code, but I can't even get it to work
manually.
Where does VBA come into this (since you're posting in a VBA rather than the
word.mailmerge.fields newsgroup)?

Which version of Word is involved, here?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
D

DataDay

Hi Cindy - Thanks for looking at this.

It's in a command button on a Form right now I'm trying to use:

ActiveDocument.MailMerge.OpenDataSource Name:= _
"C:\Documents and Settings\eshurak.PHJW\My Documents\My Data
Sources\ATLVM1 Aria phjw_vw_microsoft_emails.odc" _
, ConfirmConversions:=False, ReadOnly:=False, LinkToSource:=True, _
AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="", _
WritePasswordDocument:="", WritePasswordTemplate:="", Revert:=False, _
Format:=wdOpenFormatAuto, Connection:= _
"Provider=SQLOLEDB.1;Persist Security Info=False;User
ID=UserID;Initial Catalog=Aria;Data Source=ATLVM1;Use Procedure for
Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=EVANSVR;Use
Encryption for Data=False;Tag with column collation w" _
, SQLStatement:="SELECT * FROM ""phjw_vw_microsoft_emails""", _
SQLStatement1:="", SubType:=wdMergeSubTypeOther

I'd love to simply that (well, I'd really love to make it work).
 
C

Cindy M.

Hi =?Utf-8?B?RGF0YURheQ==?=,
I'm trying to run an MailMerge where the source is an SQL Server view, but
I'm getting a "Word was unable to open the data source" message.
Have you been able to solve this in the meantime? (Sorry, real life kept me
out of the newsgroups for a while)

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top