If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Wildcard search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-05-02, 12:26
hirkos hirkos is offline
Registered User
 
Join Date: Feb 2002
Posts: 55
Arrow Wildcard search

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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On