This is how I am able to access the inbox:
outlook = Dispatch("Outlook.Application").GetNamespace("MAPI")
inbox = outlook.GetDefaultFolder("6")
When I tried to access the user created folders in Outlook using the below code:
outlook = Dispatch("Outlook.Application").GetNamespace("MAPI")
Folder = outlook.Folders[1]
print (Folder)
I got this error:
raise IndexError("list index out of range")
IndexError: list index out of range
Any help would be appreciated.