By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,151 Members | 1,028 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,151 IT Pros & Developers. It's quick & easy.

Mail Merge (Word 2003 & SQL server)

P: n/a
In our old VB 6 application we utilize a mail merge feature of Word 97 with
MS Access. A table in Access is populated from VB and a Word template is
wired to that table. So all we do in the code is call the merge method of
Word.
Problem:
We are moving to VB.NET (VS 2005) and Office 2003. I want to bypass Access
and either use a connection to SQL or a parametrized stored procedure. I
found some samples, but was not able to open the DataSource from VB.NET.
Can you please post instruction on how to setup a template in Word 2003 and
use a parametrized stored procedure to connect to SQL database from VB.NET
2005.
Jul 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Don't use a stored procedure, use a View. Then simply call the view like you
did queries in Access. Access - "Select * from qryPerson" SQL "Select *
from vwPerson"
You can add a WHERE clause to the end of your statement if you are filtering
the data

"antonovaCCCS" wrote:
In our old VB 6 application we utilize a mail merge feature of Word 97 with
MS Access. A table in Access is populated from VB and a Word template is
wired to that table. So all we do in the code is call the merge method of
Word.
Problem:
We are moving to VB.NET (VS 2005) and Office 2003. I want to bypass Access
and either use a connection to SQL or a parametrized stored procedure. I
found some samples, but was not able to open the DataSource from VB.NET.
Can you please post instruction on how to setup a template in Word 2003 and
use a parametrized stored procedure to connect to SQL database from VB.NET
2005.

Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.