Can the value of an Access 2000 field determine which particular merge document should be used?

  • Thread starter Thread starter L. T. Portella
  • Start date Start date
L

L. T. Portella

Can the value of an Access 2000 field determine which particular merge
document should be used?

An Access 2000 table has a field which could have a value from 1 to 20.
Depending on the value say if it is one then the mail merge should be done
with Document 1. If the value is 2 then the merge document should be
document 2 etc. Can this be done without coding? If not, will the coding be
difficult? Thank you.
 
No, you would need some coding to accomplish this. Here's portion of some
code in one of my Access applications that creates a document based on the
template selected in a combobox control on an access form that has the name
of cmbTemplate:

Dim WordApp As Object
Dim WordDoc As Object
Dim strtemplate As String

On Error GoTo CreateWordApp
Set WordApp = GetObject(, "Word.Application")
On Error GoTo 0
strtemplate = Me.cmbTemplate.Text
'Create a new document from the template
Set WordDoc = WordApp.Documents.Add(strtemplate)
WordApp.Visible = True

CreateWordApp:

Set WordApp = CreateObject("Word.Application")
Resume Next

End Sub

For specific help with coding Access forms, post to
microsoft.public.access.forms.coding
--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
 
No, but you could use a series of conditional fields to place the required
text in the one document, based on the content of a field or fields.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP
E-mail (e-mail address removed)
Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
 
thank you Doug. I will go to microsoft.public.access.forms.coding
"Doug Robbins - Word MVP - DELETE UPPERCASE CHARACTERS FROM EMAIL ADDRESS"
 
Back
Top