I am looking for a way to have the appropriate document be used based on the name. The
date will vary, but the name will be constant.

Any help would be appreciated...


------------------------------------------------------------------------

Dim DocToUse As String

If lngIndicatorID.Value = 1 Then

DocToUse = "Document1 (05/20/2002)"

ElseIf lngIndicatorID.Value = 2 Then

DocToUse = "Document2 (04/14/2002)"

End If

Dim appWord As New Word.Application
Dim FileLocation As String

'Set the folder location where the document templates exist
FileLocation = "C:\Documents and Settings\"

'Set values that will be propagated to the documents
With appWord

.Documents.Add FileLocation & DocToUse
.ActiveDocument.ShowSpellingErrors = False

.Selection.Goto wdGoToBookmark, Name:="Name"
.Visible = True
appWord.Selection.TypeText Forms!frm_Requests!strName