Exporting Data to Word From Access via VB?

Hi Guys,

I have an app that works great and the boss has asked me if he can export some of the data to Word and Excel.  The app is in VB and the data coming from an Access db.  

Is there a way to set up a template and just feed the records from vb to word?  Does anyone have any examples?

Sorry, I know it's a broad question but I'm quite clueless about it.  I've tried this http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=3799&lngWId=1 but I don't understand it :)

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

See whether it help

using ado from access to excel

jetgrrrlAuthor Commented:
oops, wrong paste... I've looked at this http://www.freevbcode.com/ShowCode.asp?ID=2562 not the above paste :)
jetgrrrlAuthor Commented:

All those exmples assume I'm in either Access or Excel, I noticed I already had the page bookmarked so I know I've already failed to understand it.

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

The easy thing is you just write your data to some delimiter file such as csv(comma delimiter) file so that it can read from excel
Here is a good place to start:

Automating Microsoft Office


How To Automate Microsoft Word by Using Visual Basic to Create a New Document

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ryan ChongCommented:
try create a Mail Merge document, and link the Mail Merge data source to a Query from your Access database?
If they are specific record types you need, you could set up a mail merge document in word and use the word object to pass the data to the mail merge document.

I am not an expert but I think the "very easy" way is to open your Access db, create a new macro for exporting the data to an MsWord or MsExcel (there is a wizerd for it... ) and then just call this macro from you VB program, or you can resave the macro as a VBA code and then call it from your VB program.
Is is possible?

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.