Results 1 to 4 of 4

Thread: adobe

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    Folsom, CA USA
    Posts
    7
    how do you make it so that when a user hits a button, and it links to a file extension handled by another program. (for example an adobe .pdf file)

    i want the user to hit the button, and it opens adobe with the pdf file open.


    Durgon

  2. #2
    Guest

    Question

    Does it work to use

    Code:
      Shell "myfile.pdf", vbNormalFocus
    ? I guess I've never tried that...

    - john

    [Edited by RoyceWindsor1 on 05-05-2000 at 06:46 PM]

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    Folsom, CA USA
    Posts
    7

    no

    that doesnt work...

  4. #4
    Guest
    Hello,

    you will need to use the ShellExecute API call:

    PLace in a modual
    Code:
    Public Const SW_SHOWNORMAL = 1
    
    Public Declare Function ShellExecute Lib "shell32.dll" _
        Alias "ShellExecuteA" ( _
        ByVal hwnd As Long, _
        ByVal lpOperation As String, _
        ByVal lpFile As String, _
        ByVal lpParameters As String, _
        ByVal lpDirectory As String, _
        ByVal nShowCmd As Long) As Long
    use a call like the follwing:
    Code:
     sPath = App.Path & "\something.pdf"
      
      lRtn = ShellExecute(Me.hwnd, "Open", sPath, 0&, 0&, SW_SHOWNORMAL)
    I hope I got it all, APi calls can get very interesting with there paramaters.

    Hope this helps

    Best


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