matan justme
matan justme

Reputation: 399

How to get a default Outlook folder from a second email address?

There is a command for getting a default folder:

OutlookApplication.Session.GetDefaultFolder(x)

for example:

OutlookApplication.Session.GetDefaultFolder(olFolderOutbox)

The email user name isn't stated in the code, therefore it'll use the default Outlook user.

How do I work with both users, assuming I have two emails addresses linked to my Outlook account?

Upvotes: 0

Views: 215

Answers (1)

Dmitry Streblechenko
Dmitry Streblechenko

Reputation: 66316

Loop though the stores in the Namespace.Stores collection and use Store.GetDefaultFolder instead.

Upvotes: 1

Related Questions