Results 1 to 2 of 2

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 (which is a Word document)that it has found? I would also like to do this with Excel files.

    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
    Open it for what? Just "open" it? Like with its native application? Try followhyperlink.
    oh yeah... documentation... I have heard of that.

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

Posting Permissions

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