#  Other Applications & Softwares  > Outlook Formatting & Functions >  > [SOLVED] Export of Attachment "Names" to Excel from all Folders and Sub-folders

## dbsbender

Happy Thanksgiving eve friends.  I hope this finds you all well.

The title pretty much tells you what I am hoping to accomplish.  Whether a tricK, a tip or VBA, I would like the ability to select a folder and return a list of all attachments in that folder and sub-folders.  Of course it would be great for some additional details, like sender, date and the folder it was in, but the name of the attachment is the most important.  No, I don't want to export it.  

Thanks for looking, thanks for responding and have a Happy Thanksgiving.

Dianne

----------


## vba_php

you have to loop the main folder and all its subs.  to find a folder, select it from the MAPI, like this:



```
Please Login or Register  to view this content.
```


here is an example of looping subfolders in a main:



```
Please Login or Register  to view this content.
```


that code is a modified version of that found here by MS:

https://docs.microsoft.com/en-us/pre...3(v=office.11)

see the image below for the printout that the code gave me, based on my programs' PST info.  PST = all outlook info for one profile.

this post by me a while back is also relevant, and should give you everything else you need:

https://www.excelforum.com/outlook-f...ml#post5428264

----------


## dbsbender

Thank you  so much.  I havent gotten it to work yet, but I will go to the link you referenced and play.  Have the nicest holiday.  Thank you for your kindness.  Dianne :Smilie:

----------


## vba_php

sure thing.  u2.  post back if you get stuck.  after all, isn't everything we do nothing but a bunch of ""playing to see what works""?  LOL.

----------

