Mail Merge

I

Irwin109

Once you use MS Communities you never go back!

Ok, so as I go on making more and more user friendly items on my database I
come across more and more problems!

This one is Mail Merging. I've got a query (which in the Front End is
visible as a subform on a form) for clients that need a file printing, the
file is a Mail Merged Word document.

I need to be able to get the Word Document to pick up which record(s) I want
printing.

If possible I want it to print a document for each client in the query, if
that's not possible just the top one (or even current one in the View Clients
form if neither are possible). The [ID] on the form should be the same as the
record number +1 if that makes defining the record any easier.

Help is appreciated and I will always give more information if it's needed.

At the moment I have VBA that just opens the word document in question but
does not help with the record selection:

Private Sub Command5_Click()

Dim LWordDoc As String
Dim oApp As Object

'Path to the word document
LWordDoc = "\\CHRISSY\SharedDocs\File.doc"

If Dir(LWordDoc) = "" Then
MsgBox "Document not found."

Else
'Create an instance of MS Word
Set oApp = CreateObject(Class:="Word.Application")
oApp.Visible = True

'Open the Document
oApp.Documents.Open filename:=LWordDoc

End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top