E
Ed from AZ
I had a macro I built last year that would iterate through my
Favorites folder and its subfolders and write the names of the links
into a Word doc. I copied the bulk of it from somewhere, and never
really thought through the process of how it worked. Well, it seems
IT made another midnight push, and several of my macros are gone. (I
suspect the push somehow ate a chunk of my Normal template!)
I'm now trying to rebuild this macro, but am getting hung up on the
concept of the recursive process. I'm using SHELL, and it's working
fine through the first level. I capture the name of the top-level
folder ("Favorites"), then iterate through the links directly under
that, and that works great. I can then iterate through the subfolders
and capture the links in each of those. Again, no problem. I have
the "iterate links" and iterate subfolders" as two separate macros
called as needed by the master loop.
But if a subfolder contains a subfolder, it's going to want to call
the same procedure that's already running to iterate through _that_
subfolder. Likewise if there's a fourth-level subfolder.
So how do I fold this back on itself without causing problems? I
originally got this from a Script sample, and while it did return the
names, it also locked into an endless loop and I had to End the
processes - all six of them! I could just scour the net for a working
sample - I'm sure there's a bunch of them. But I'm hoping to learn
something along the way, too. Any help is greatly appreciated.
Ed
Favorites folder and its subfolders and write the names of the links
into a Word doc. I copied the bulk of it from somewhere, and never
really thought through the process of how it worked. Well, it seems
IT made another midnight push, and several of my macros are gone. (I
suspect the push somehow ate a chunk of my Normal template!)
I'm now trying to rebuild this macro, but am getting hung up on the
concept of the recursive process. I'm using SHELL, and it's working
fine through the first level. I capture the name of the top-level
folder ("Favorites"), then iterate through the links directly under
that, and that works great. I can then iterate through the subfolders
and capture the links in each of those. Again, no problem. I have
the "iterate links" and iterate subfolders" as two separate macros
called as needed by the master loop.
But if a subfolder contains a subfolder, it's going to want to call
the same procedure that's already running to iterate through _that_
subfolder. Likewise if there's a fourth-level subfolder.
So how do I fold this back on itself without causing problems? I
originally got this from a Script sample, and while it did return the
names, it also locked into an endless loop and I had to End the
processes - all six of them! I could just scour the net for a working
sample - I'm sure there's a bunch of them. But I'm hoping to learn
something along the way, too. Any help is greatly appreciated.
Ed