Results 1 to 5 of 5
  1. #1
    memberFDIC is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    5

    Opening a file with default application

    How does one launch for instance an Adobe Acrobat PDF file from within Access using VBA code?



    I would like something that would also be used to launch all other known file types, such as TXT, JPG, DOC etc.

    Thanks.

  2. #2
    memberFDIC is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    5
    Never mind. I found the answer to my question myself.

  3. #3
    dcgrove is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    3
    Care to post your solution?

  4. #4
    memberFDIC is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    5
    Quote Originally Posted by dcgrove View Post
    Care to post your solution?

    Public Sub Launch(ByVal OpenThis As String)
    Call ShellExecute(0, "open", OpenThis, "", "", SW_SHOWMAXIMIZED)
    End Sub



    Examples:

    Launch("readme.pdf")

    Launch("http://pc-shareware.com")

  5. #5
    dcgrove is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    3
    Can you post your ShellExecute macro?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Form opening as default
    By SFC in forum Forms
    Replies: 2
    Last Post: 12-05-2011, 05:18 PM
  2. Opening up a form to a default value
    By Lupson2011 in forum Forms
    Replies: 2
    Last Post: 12-05-2011, 06:03 AM
  3. Replies: 10
    Last Post: 09-15-2011, 03:58 PM
  4. Value List with opening a file.
    By seaper in forum Forms
    Replies: 0
    Last Post: 10-21-2009, 01:32 PM
  5. Table opening by default
    By rod147 in forum Access
    Replies: 1
    Last Post: 07-07-2009, 10:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums