Results 1 to 8 of 8

Thread: [RESOLVED] Having a very difficult time using Shell to open up a file

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2010
    Location
    Southern California
    Posts
    88

    Resolved [RESOLVED] Having a very difficult time using Shell to open up a file

    Alright, I spent 4 hours yesterday trying to figure this out until I past out from being so tired. I have tried to do what I am about to explain in EVERY way I can think of or have found, and it's something simple and I use to be able to do it easily but I completely forgot how to do it. It's been 1 year since I have done any programming and it wasn't much back then.

    Anyway, all I am trying to do is simply launch a freaking PDF file. I need it to be in the same path in whatever the folder will be on so i'm using "app.path". My suspicion is that I am messing up the "quotes" in my lines of code.

    Here is one of the lines of code I have been working with..here is the last one (I have tried it with different quotes and other things like "()" or using "Call"):

    VB Code:
    1. Shell app.path & "\book.pdf", vbnormalfocus

    I have tried all of them like

    VB Code:
    1. Shell app.path & "\book.pdf", 1

    VB Code:
    1. Call Shell (app.path & "\book.pdf")

    ..Ecetera, and it keeps giving me a runtime 5 error, invalid procedure.

    I have looked at other threads on here and tried those methods...I get the same error or I just get nothing. I have also tried shellexcute. Anyway, what am I doing wrong?


    edit:

    is my code showing? it's not for me, I used the vbcode tags.
    Last edited by si_the_geek; Jun 16th, 2011 at 01:09 PM. Reason: corrected issue with tags

Posting Permissions

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



Click Here to Expand Forum to Full Width