Get mail folder list outlook to array or excel

Hi to everyone,
I’m facing following issue:
I try to automate an Outlook use case where all mails from several dynamic subfolders will be converted to pdf and saved to local file system.
I didnt find a solution to get this dynamic list of subfolders in outlook. I found following code from Sojan_Davis @ ‘Get Outlook Mail Folders and Sub-Folders List’:

Dim olApp As Microsoft.Office.Interop.Outlook.Application
Dim olNs As Microsoft.Office.Interop.Outlook.Namespace
Dim olParentFolder As Microsoft.Office.Interop.Outlook.MAPIFolder
Dim olFolderA As Microsoft.Office.Interop.Outlook.MAPIFolder
Dim olFolderB As Microsoft.Office.Interop.Outlook.MAPIFolder
olApp = New Microsoft.Office.Interop.Outlook.Application
olNs = olApp.GetNamespace(“MAPI”)
olParentFolder = olNs.Folders(“”).Folders(“Inbox”)
For Each olFolderA In olParentFolder.Folders
'Msgbox(olFolderA.FolderPath, olFolderA.Items.Count, olFolderA.Folders.Count)
For Each olFolderB In olFolderA.Folders
'Msgbox(olFolderB.FolderPath, olFolderB.Items.Count)

This worked! But the problem is, that Im not familar with coding. So, Im just able to copy this was happy that this worked. But to make my workflow running I would need to have an array or datatable out of this to iterate in next steps.
Could you please help me?
Thanks! Max