Mail Merge (Word 2003 & SQL server)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 
Back
Top