problem compile error "method of data are not found" to open file based on cell

  • hi experts

    I face showing this error ' compile error' in word open in this line

    AcroApp.Open searchFolder & fileName

    the code should open file from pdf extensions when write in A1

    any help to fix it

  • I don't understand what you mean?

    My point is that you are using the wrong object to open the file.

    Theory is when you know something, but it doesn’t work. Practice is when something works, but you don’t know why. Programmers combine theory and practice: nothing works and they don’t know why

  • Maybe like this

  • royUK actually your code works perfectly. my mistake is writing file extension . it shouldn't be when write the file name .

    thanks so much for your solution ;)

  • royUK do me favor,please ? if it's possible add warning message when write extension then should show the message" please, write only file name"

    the aim of this to overcome for this problem when write extension and the code doesn't work

    thanks again

  • See if this works

  • You need to change this line back to your folder path.

    Try this

  • This is the path in your first post.

    searchFolder = "C:\search\files\reports\"

  • How can it open your computer?

    This works for me

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!