Extracting File Path from Document Link RRS feed

  • Question

  • Hi all

    I have used a form to display a set of query results on our drawing database.

    One field on this form (which displays the drawing number for that record to the user) contains an event with the filepath to an image.  So when the user dbl clicks that drawing number field, the PDF image of that drawing is displayed.

    The path to the file is usually of the form G:\SCANNED DRAWINGS\CIW\C7300 - C7349\C7340 Astarta, Ukraine\Item 16863 Extraction\Item 16863.01 51013 Model III 703 Extractor\AK703-000 Rev 0 - Hard - A1 (16863.01).pdf.

    What I would like to do is capture the path to the folder in which the PDF is saved and give the user the option to open that folder by clicking a button which actions the method below...

    Dim ProjPath
    ProjPath = "Z:\Projects\" & Me.txtProjectID.Value

    Shell "C:\WINDOWS\explorer.exe """ & ProjPath & "", vbNormalFocus

    The vbNormalFocus, you can change into vbMaximizedFocus if you want this. 

    The bit that I don't understand is how do I isolate the path to the folder from the complete path above (which includes the PDF image filename)?



    Tuesday, March 14, 2017 1:57 PM


All replies