+ Reply to Thread
Results 1 to 5 of 5

Open PDF file knowing it's directory and only part of the unique file name.

  1. #1
    Registered User
    Join Date
    10-16-2023
    Location
    Australia
    MS-Off Ver
    Office 2016
    Posts
    16

    Open PDF file knowing it's directory and only part of the unique file name.

    Hi folks,

    I'm looking for assistance with Excel. Looking for a method that will open PDF file knowing it's directory and only part of the unique file name. I'm hoping there's some sort of wildcard reference that can assist in doing what I need.

    The data for the file name will be located in cell D4 and the data will contain "Q184645"

    Located in the directory "C:\TESTQUOTES" is the file with the full name "Q184645_07_09_15_23-100622709.pdf"
    Attached Files Attached Files

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,006

    Re: Open PDF file knowing it's directory and only part of the unique file name.

    If there is only one file with such name or you want to open first that match criteria then this can be simplified.

    If there is multiple option use this:

    In D1 enter folder where you save pdf's
    Then click List files button to show all files using this name.
    Then simply click on one you want to open.
    Attached Files Attached Files
    Last edited by zbor; 10-24-2023 at 02:42 AM.

  3. #3
    Registered User
    Join Date
    10-16-2023
    Location
    Australia
    MS-Off Ver
    Office 2016
    Posts
    16

    Re: Open PDF file knowing it's directory and only part of the unique file name.

    There's an ever growing list of files, the only constant is that each file starts with Q and usually has 6 digits following (the rest of the data appears to be a time and date stamp for when the file was generated).

    In theory there should be only one file with such a name (though there is the possibility that two people may add the same Q###### with a slightly different time and date stamp). I haven't actually thought about that possibility, but assuming it does happen, is it possible to load the newest file (meaning its the most recently updated)?

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,006

    Re: Open PDF file knowing it's directory and only part of the unique file name.

    If you enter just Q in D4 then all files with Q will be opened (try).

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,006

    Re: Open PDF file knowing it's directory and only part of the unique file name.

    This will sort them by last edited:


    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by zbor; 10-24-2023 at 05:27 AM. Reason: Check does file exist before sorting

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Open PDF file knowing it's directory and only part of the unique file name.
    By Travisty123 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-24-2023, 02:34 AM
  2. Open file without knowing file location
    By cc2019 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-25-2019, 02:04 PM
  3. [SOLVED] how do i open up a file knowing the first part of the filename in excel using vba
    By BrianTFC in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-22-2019, 03:31 PM
  4. Replies: 0
    Last Post: 02-09-2016, 06:14 PM
  5. Open File in Directory with a Part of Filename as String
    By paesu57 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-11-2014, 06:27 AM
  6. Replies: 5
    Last Post: 09-29-2012, 12:40 PM
  7. Find File in Directory(s) and Open Folder highlighting file
    By cpadude in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-08-2010, 05:39 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1