Results 1 to 3 of 3

Thread: Opening a file

  1. #1
    Join Date
    Oct 2004

    Unanswered: Opening a file

    I adjusted the following code for finding a file that starts with a certain string, but what code do I use to open the file that it has found?

    With Application.FileSearch

    .LookIn = YourDirectoryPath
    .SearchSubFolders = False
    .FileName = YourSearchString
    .MatchTextExactly = False


    For intLoop = 1 To .FoundFiles.Count

    debug.print .FoundFiles(intLoop)

    Next intLoop

    End With

  2. #2
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    What do you intend to do with the file? "Open" is a pretty generic term...
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Oct 2004

    Opening File


    I have many Word documents in a folder that are customers contracts, these all start wita a number e.g 100 - customername or 101 - customername etc.

    I have a field in my DB that is the contract number only e.g 100 or 101 etc. I would like the code to find the file beginnning with the number in the field and open it for the users. The code works fine as in it finds the file, because I can make it prompt with a msgbox, but how do I open that file?

    Hope the info helps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts