List of outlook folders

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(“Sojan.@abc.com”).Folders(“Inbox”)
For Each olFolderA In olParentFolder.Folders
Msgbox(olFolderA.FolderPath)
'Msgbox(olFolderA.FolderPath, olFolderA.Items.Count, olFolderA.Folders.Count)
For Each olFolderB In olFolderA.Folders
Msgbox(olFolderB.FolderPath)
'Msgbox(olFolderB.FolderPath, olFolderB.Items.Count)
Next
Next

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