O
OutlookNewBie11
Using VSTO and C# anyone know how to get a listing of availabl
mailboxes a user has on his default profile? I would imagine this to b
simple.
mailboxes a user has on his default profile? I would imagine this to b
simple.
'Ken Slovak - [MVP - Outlook said:;314784']Outlook version?
"OutlookNewBie11" (e-mail address removed) wrote in
message
Using VSTO and C# anyone know how to get a listing of available
mailboxes a user has on his default profile? I would imagine this to
be
simple..
Ken Slovak - said:Use the Outlook 2007 Stores collection for that. It returns all opened
stores. The help on that method in the VBA Object Browser has examples of
how to get the default store and how to tell what mailboxes are primary and
secondary mailboxes.
NameSpace.Stores is all the loaded stores, NameSpace.DefaultStore is the
default one. Store.ExchangeStoreType returns olExchangeMailbox,
olExchangePublicFolder, olNotExchange and olPrimaryExchangeMailbox. That
should be exactly what you want.
You can set SendUsingAccount on a MailItem, but if there's only 1 account
(Exchange) that does you no good. So set the SendOnBehalfName property for
sending as another mailbox. For example, if I want to send something as my
sales mailbox I just use that in that property, and as I have SendAs
permissions for that mailbox it goes out from sales. Without SendAs
permissions you get a Sent on Behalf Of header instead of a change of From
address.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.