Using combo of Excel VB, Access--to create auto-letters in Word!

ipisors

New member
Local time
Today, 12:21
Joined
Oct 21, 2008
Messages
7
I have word, access and excel. I can handle basic VB coding in Excel, as well as writing Access .mdb queries in the design grid. I'm somewhat familiar also with basic Access built-in macros.

I need to create and print letters in word, I want to get to the point where a user can simply click a button, prompts him/her for a 17-digit account number - and based on that, it will query; i can write the query, and then populate a word document with the results.

obviously the challenge is, i have these Word templates...but I need it to only populate the data returned by the query in very specific locations on the page.

Can someone please get me started? Should I approach the whole thing as an Access "report" ? i need to get the coding in the Excel workbook, to run code, so all the user has to do is type in a 17 digit acct# which will be the ONLY criteria-specific in the query, and then after he hits Enter, it will return the results of my query, (for the one account), placed in various spots on a page, on a template already ready with our logo, and ready to print............help please! i need it to print, too.
 
I think you need to look at word bookmarks. I seem to remember to can use the Word COM to navigate to a specific bookmark (using Goto bookmark name) and then insert the required text.

HTH

Art
 
you mean, look at word bookmarks to be used from wtihin Excel coding?
see , there is so much information out there for how to generate letters in word using information already contained in Access FORMS.

But my problem is, the informatino is not in a FORM. It will be queried. I want people to be able to type in an account number, and then a query will run to get the customer's name, and some other information. i want all of those informations coming back from the query to be placed into certain fields on a Word document.
 

Users who are viewing this thread

Back
Top Bottom