Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2004
    Posts
    19

    Red face Unanswered: Need to know if a file exists

    I need to know if a file exists and if so, open it.

    ie. check if 'test.pdf' exists and then open it in Acrobat reader.

    I already did it a few yars ago, but can't remember how!!!

    Thanx

  2. #2
    Join Date
    Jan 2004
    Location
    Toronto, Canada
    Posts
    259
    Make sure you have Adobe Acrobat 5.0/6.0 Type Library Selected in your references.

    Dim AcroExchAVDoc As CAcroAVDoc
    Dim AcroExchApp As CAcroApp

    Set AcroExchApp = CreateObject("AcroExch.App")
    Set AcroExchAVDoc = CreateObject("AcroExch.AVDoc")

    OK = AcroExchAVDoc.Open("File Location eg. C:\test.pdf", "Sample Name you want to give to the window")

    if OK = 0 then
    MsgBox "File Does not exist"
    Else
    AcroExchApp.Show
    End if

  3. #3
    Join Date
    Aug 2004
    Posts
    19

    Smile

    thanks Jerrie.


  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    what's wrong with Dir ??

    izy
    currently using SS 2008R2

Posting Permissions

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