Linking Word Templates & Access (Both XP)

HockeyNut

Tureco Del Hockey
Local time
Today, 00:55
Joined
Feb 25, 2003
Messages
62
I guess this is similar to a mail merge, but I want it all controlled from Access. I want it to take information from Access and put it into the appropriate template (selected by user from a combo or series of buttons).

I was thinking of having a series of buttons at the bottom of a form, or even better a combo, with an on click/selection event to load up the chosen template, automatically fill in the the data from the current database client record and give the option to print. May need to make the Letters (Templates) into reports? Would it be better if they could remain as word documents?

Another way may be to have these options somehow similar to above or have a tick box as an option to print, and then get it to pick these records out for there appropriate template and do them on a print run when they want to?

I will as ask users opinion on best approach of the above two options, but I imagine it would be the first option.


  1. Users recieve the application form and fill in the basic client data.
  2. Course of action is decided and appropriate temaplate is filled in from a choice of approximately 10 different ones.
  3. They input various feilds in the template, (most of which is repeated data which was input into the client record. The data that isn't in this could probably be included to save duplication of inputting.
  4. Letters (this is what the templates are) are then sent. Maybe even include option to print Envelope?
    [/list=1]

    I was wondering if you knew whether this is possible, and if so any advice on how to go about it?

    Thanks,

    David
 
I've posted this before:

I have a form with a list box called DocName. The relevant document is selected in here and the routine below uses a mailmerge to create the letter. Note that I have separate directories set up for each user so that there are no naming conflicts. The path is held as Workfolder. The master documents are held in a folder called DocMaster.

I'm sure there are many clumsy elements of my code (especially the empty directory fudge!) but it works for me!

'Check for document selected
If IsNull(DocName.Column(2, DocName.ItemsSelected)) Then
MsgBox "No contract selected"
GoTo Exit_Writelet_Click:
End If
'Create variables for document name and document path
Docpath = DocName.Column(2, DocName.ItemsSelected)
Doctitle = DocName.Column(1, DocName.ItemsSelected)
'MsgBox Docpath
'Empty workfolder, copy template and source file to workfolder
FileCopy (ParentDir & "dummy.txt"), (WorkFolder & "dummy.txt")
Kill (WorkFolder & "*.*")
FileCopy (ParentDir & "DocMaster\" & Docpath), (WorkFolder & Docpath)
'FileCopy (ParentDir & "Docmaster\mergedata.doc"), (WorkFolder & "mergedata.doc")
'Create mailmerge file
Datafile = WorkFolder & "mergedata.doc"
'MsgBox Datafile
DoCmd.OpenQuery "Letcontract", acNormal, acReadOnly
DoCmd.TransferText acExportMerge, "", "Letcontract", Datafile, False, ""
DoCmd.close acQuery, "Letcontract"
'Open word and load file
Dim objword As Word.Application
Set objword = New Word.Application
objword.Visible = True
objword.Activate
objword.Documents.Open (WorkFolder & Docpath)
 

Users who are viewing this thread

Back
Top Bottom