Results 1 to 4 of 4
  1. #1
    tuniwes is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Nov 2015
    Posts
    43

    Help please code for opening a specific file

    Hi All



    Hoping somebody can help me with this. I am trying to open autocad drawing viewer and load a specific drawing based on clicking a drawing number in a report

    I have got this far
    Private Sub Command47_DblClick(Cancel As Integer)
    Dim AppName As String

    AppName = "C:\Program Files\Autodesk\DWG TrueView 2016 - English\dwgviewr.exe"
    Shell AppName, vbNormalFocus
    End Sub

    So far so good, can open the application but I'm stumped on loading the specific drawing file from the drawing no field in the report

    Any help would be most appreciated

    Many thanks

    Ian

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    I would try FollowHyperlink with the path to the file. It should open in the app registered in Windows, presumably your viewer.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    tuniwes is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Nov 2015
    Posts
    43
    Thanks Paul

    Dim AppName As String


    AppName = "k:\shop floor drawings\shop floor drawings" & Me!Item


    Application.FollowHyperlink AppName, , False

    Did the trick!

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    Happy to help! Unless you're sure everyone has the same drive mapping, I'd use a UNC path.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Opening Forms In Specific Order
    By StampMan in forum Forms
    Replies: 10
    Last Post: 10-09-2015, 02:21 PM
  2. Replies: 5
    Last Post: 01-24-2015, 12:59 AM
  3. Replies: 4
    Last Post: 12-13-2013, 04:50 PM
  4. Opening Form to a Specific Record
    By PPat in forum Forms
    Replies: 9
    Last Post: 04-24-2013, 08:47 PM
  5. Help with opening form to specific record
    By manic in forum Programming
    Replies: 7
    Last Post: 09-18-2012, 08:44 PM

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