Making standard letters in Word with VB (1 Viewer)

Doppenberg

Registered User.
Local time
Today, 21:30
Joined
May 25, 2000
Messages
25
Can someone please help me with the following problem?

I want to start Word from VB and use a Query as the source for making standard letters.
I already have a query with the fields I am using in the Word-letter and users are able to make a selection from that query through a form.
What I want to do is let them select some records (for example 1 - 100) and then print 100 letters in Word just by pushing one button.

Does anyone has any experience with this?
Please help ?
 

areichhart

New member
Local time
Today, 21:30
Joined
Jul 16, 2000
Messages
5
Hi,

I have come across several solutions for this problem yet but the best one, from my poit of view is still:

You need the MS Word object library
You then can use a code that should be similar to the folowing:

Dim WordApplication As Word.Application
'You then have to either create a new instance of Word using Create or Get and existing one.

Then use:

WordApplication.Documents.Add template:=Templatepath, NewTemplate:=(True or False)' as you like

Here is your new WordDocument based on the Template "Templatepath" and it will either be a new template or simply a document

You then can refer to all its properties using WordApplication.ActiveDocument

The best thing to add Text is using Bookmarks.

Simply use the Access Help for more details on it. It is quiet good.

Hope, I could help you
 

Users who are viewing this thread

Top Bottom