Senseful
Senseful

Reputation: 91641

Getting notes from a folder other than the default one in Outlook VBA

I'm currently getting notes from the default folder using the code:

Set myNote = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderNotes)

How can I get notes from a different folder?

Upvotes: 1

Views: 205

Answers (1)

JimmyPena
JimmyPena

Reputation: 8754

You have to walk the folder hierarchy, for example if your other Notes folder is one level below the Inbox, the code would be

Set myNote = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Folders("My New Notes Folder Name")

Upvotes: 1

Related Questions