+ Reply to Thread
Results 1 to 4 of 4

Coding a MACRO to list document name and file path

  1. #1
    Registered User
    Join Date
    08-28-2013
    Location
    Bristol
    MS-Off Ver
    Excel 2007
    Posts
    26

    Coding a MACRO to list document name and file path

    Hi,

    I am a mechanical engineer with reasonable excel skills, but no experience in using MACRO. My task is to create a list of all the documents my company has created from the file directories we have stored on the network. Obviously these documents are split up into a number of sub folders, eventually leading to the required document. To do this manually I would locate the document in the lowest level file path, copy and paste the name of the file, copy this into cell A1, and than copy and paste the file path into cell B2.

    I have created a MACRO that will do this for this simple example. What I want it to do is to repeatedly go through each folder to the lowest file location and list the name of the document and the file path for every single document.

    I realise that I need some sort of repeat function coded, but other than that I am pretty much at a loss. Does anyone know whether this can be done and if so how?

    Thank you for your time and I apologise in advance for my ignorance!

    Will

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Coding a MACRO to list document name and file path

    Hi will

    I have a program that will list all files in a folder including its sub folders.

    It then does a lot more with those files but I will strip out the rest of the macro.

    just drop the file into the folder you are interested in. It could be your c drive for example and open it.

    It will run automatically and list all files in their folders.

    Mem
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    08-28-2013
    Location
    Bristol
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Coding a MACRO to list document name and file path

    Thank you very much, your solution is perfect! I have one question, the company I work for are often very panicky about security. Is there away I can check the macro coding to prove that it isn't a security threat (i realise it wont be!)?

    Many thanks,

    Will

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Coding a MACRO to list document name and file path

    just open it and read it.

    click on developer.

    then macro

    select the macro

    and click edit

    you can read and amend it.

+ 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. Printing word document from full file path in textbox in userform
    By pharmsunil2010 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-14-2010, 05:37 AM
  2. How to parse a file path, omiting a document filename
    By Raisedwell in forum Excel General
    Replies: 8
    Last Post: 07-16-2010, 04:20 PM
  3. Replies: 1
    Last Post: 01-16-2010, 11:51 AM
  4. [SOLVED] Can you automatically insert a file path in an Excel document?
    By Mimi in forum Excel General
    Replies: 2
    Last Post: 03-21-2006, 08:15 PM
  5. macro to list file name and path in separate cells
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-21-2006, 11:20 AM

Tags for this Thread

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