Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2005

Tip: Looking for answers? Try searching our database.

Data from SQL server in a Word document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Crisp - 10 Feb 2005 17:55 GMT
I would like to write a Word macro to get some data out of a SQL server
database and put it into the Word document.  Can anyone show me how to do
this or point me to enough documentation within MSDN to accomplish this?  I
have working SQL queries and subqueries, I just need to know how to make the
connections and write that particular type of macro.  Thanks!
Dian D. Chapman, MVP - 12 Feb 2005 14:14 GMT
Go here:

http://www.mousetrax.com/techpage.html#autoforms

And read article # 5 in the Please Fill Out this Form series. Download
the sample form and Access DB. You can open the code to see how it was
done.

Then you will need to change the JET Provider for the SQL Provider.
Either see this link: www.microsoft.com/data or get this book
http://www.mousetrax.com/books.html#ado.

Good luck...

Dian D. Chapman, Technical Consultant
Microsoft MVP, MOS Certified
Editor/TechTrax Ezine

Free MS Tutorials: http://www.mousetrax.com/techtrax
Free Word eBook: http://www.mousetrax.com/books.html
Optimize your business docs: http://www.mousetrax.com/consulting
Learn VBA the easy way: http://www.mousetrax.com/techcourses.html

>I would like to write a Word macro to get some data out of a SQL server
>database and put it into the Word document.  Can anyone show me how to do
>this or point me to enough documentation within MSDN to accomplish this?  I
>have working SQL queries and subqueries, I just need to know how to make the
>connections and write that particular type of macro.  Thanks!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.