+ Reply to Thread
Results 1 to 17 of 17

Macro to Label folders with Tags and Filter as Required

  1. #1
    Registered User
    Join Date
    01-29-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    10

    Macro to Label folders with Tags and Filter as Required

    Hello everyone,

    I am relatively new to macro coding, but I shall explain none the less... Basically I have a large database of folders of examples of projects/notes etc, each with essentially lots of potential topic "tags". I want to sort them to be able to tell the macro what topic I am looking for and it give me the folders that contain that info. I will need to tag each folder individually (which is no problem). I am looking for a piece of script (that either exists or that I can write) that will do the following:

    - tag specific folders with numerous "tags". The folders will all be stored in a database. The tags will be user input.
    - sort these folders based on specified tags and show filepath/location/name/file number or something unique based on the tags input

    I am not sure if this is possible, or if someone has a clever idea of how to approach this problem, but any help is much appreciated! Any questions please ask.

    Cheers,

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro to Label folders with Tags and Filter as Required

    Hello Excel_2014,

    Welcome to the Forum!

    This is possible. Can you provide an example of what a "tag" would like attached to a folder name?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    01-29-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Macro to Label folders with Tags and Filter as Required

    Cheers Leith,

    Ok an example would be...I have many many folders with examples of projects I have completed in the past with notes on numerous aspects of the project (it's bridge engineering). So I wish to create tags like:

    - single span bridge
    - concrete
    - I-girder
    - short/medium/long-span bridge
    - XXX Department of Transportation
    - XXX Specifications
    - XXX Design Codes
    ...

    The list of tags is endless. The idea is when I want to look for an "I-girder" example I can search based on that. Or based on "concrete", or on any other tag for that matter. As it stands I have to sort the folders into sub folders and only get to name each folder once. Eg the "I-girder" example is in the "concrete" folder which is in the "single span bridge" folder, and there is no way of me displaying all of the "I-girder" bridge examples, only all the "single span bridge" examples as I only have that particular folder.

    Does this explain a little better? I have been told I need to write a Wiki (which would be great), but I think a macro could work...

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro to Label folders with Tags and Filter as Required

    Hello Excel_2014,


    Are all these folders in the same parent folder?

    Are these tags part of each folder's name?

  5. #5
    Registered User
    Join Date
    01-29-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Macro to Label folders with Tags and Filter as Required

    The folders are all in the same parent folder (this is the database of folders I currently have).

    The tags are not part of the folder name and I need to be able to add tags to new folders relatively easily as I add to my database.

    Thanks,

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro to Label folders with Tags and Filter as Required

    Hello Excel_2014,

    Still working on this. I can read the Tags easy enough but it seems changing them is a bit more obtuse.

  7. #7
    Registered User
    Join Date
    01-29-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Macro to Label folders with Tags and Filter as Required

    Ok thanks Leith!

  8. #8
    Registered User
    Join Date
    01-29-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Macro to Label folders with Tags and Filter as Required

    Hi Leith,

    Cheers for you help with this, did you make any headway with the macro, or any info on it?

    Thanks,

    Excel_2014

  9. #9
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro to Label folders with Tags and Filter as Required

    Hello Excel_2014,

    From my research so far, you can not change the "tag" value from outside Excel with VBA. The application creates a standard structure within its own code. The operating system can read this information from the structure but can not modify it. I also looked to other scripting methods and the Windows API to see if the data could be modified by these means but no luck. It appears the only method is updated the tags through the Excel dialog box.

  10. #10
    Registered User
    Join Date
    01-29-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Macro to Label folders with Tags and Filter as Required

    It's not ideal, but that could be an alternative - just to have the tags input in a excel file and when I have new files I just update the tags for that file. Would it then be easy enough to link new folders to the macro and along with some new tags?

  11. #11
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro to Label folders with Tags and Filter as Required

    Hello Excel_2014,

    I think I understand what you to do but can you put together an example for me?

  12. #12
    Registered User
    Join Date
    01-29-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Macro to Label folders with Tags and Filter as Required

    Essentially I'm looking to write a program to do this for me so it's difficult to put together an example! Can I explain the following example better in any way?

    "Ok an example would be...I have many many folders with examples of projects I have completed in the past with notes on numerous aspects of the project (it's bridge engineering). So I wish to create tags like:

    - single span bridge
    - concrete
    - I-girder
    - short/medium/long-span bridge
    - XXX Department of Transportation
    - XXX Specifications
    - XXX Design Codes
    ...

    The list of tags is endless. The idea is when I want to look for an "I-girder" example I can search based on that. Or based on "concrete", or on any other tag for that matter. As it stands I have to sort the folders into sub folders and only get to name each folder once. Eg the "I-girder" example is in the "concrete" folder which is in the "single span bridge" folder, and there is no way of me displaying all of the "I-girder" bridge examples, only all the "single span bridge" examples as I only have that particular folder."


    Thanks,

  13. #13
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro to Label folders with Tags and Filter as Required

    Hello Excel_2014,

    Are you saying the user would choose a tag in the list and the macro would open the parent folder and look through the tags for those documents, list them, and then open subfolders of the parent folder and repeat the process?

  14. #14
    Registered User
    Join Date
    01-29-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Macro to Label folders with Tags and Filter as Required

    No need to open the folders, just identify them. But the user could specify more than one tag, to elaborate on the previous example, if I want a concrete, I-girder, single span bridge, I search for those tags and I would get results containing those tags. This way I could have thousands of examples and notes etc and each folder has a tag with what it contains. Then when I am looking for a specific example, I can input the tags and get all of the examples in the data base that match the search. Presently I do this by folder structure, but it allows me only to specify one folder name...this is equivalent to one tag, which is limiting.

    Thanks,

  15. #15
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro to Label folders with Tags and Filter as Required

    Hello Excel_2014,

    I will put together an example workbook that will look at the tags for the workbooks in a single folder and list them. This will at least give us a starting point to build on.

  16. #16
    Registered User
    Join Date
    01-29-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Macro to Label folders with Tags and Filter as Required

    That would be ideal. Thanks.

  17. #17
    Registered User
    Join Date
    01-29-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Macro to Label folders with Tags and Filter as Required

    Hi Leith,

    Did you manage to put together the above?

    Cheers,

+ 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. PDF Page Count VBA Sub Folders VBA code required
    By johnny2000 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-06-2017, 03:22 PM
  2. Replies: 6
    Last Post: 01-07-2014, 03:24 PM
  3. Filter Pivot Table Row Label by Another Row Label
    By bdcelli in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 01-14-2013, 12:57 PM
  4. Formula Tags & New Title label (for new threads)
    By arlu1201 in forum The Water Cooler
    Replies: 0
    Last Post: 06-21-2012, 07:21 AM
  5. macro required to filter data on several tabs and save to a file, then repeating action
    By Stevengreen22 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 04-04-2012, 10:26 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