Search notes:

Outlook Object Model: Account

Methods and properties

accountType An element of the olAccountType enumeration
application
autoDiscoverConnectionMode An element of the olAutoDiscoverConnectionMode enumeration
autoDiscoverXml An XML string retreived from the auto-discovery service of the MS Exchange Server that is associated with the account
class
currentUser A recipient object
deliveryStore
displayName A string
exchangeConnectionMode Returns a member of the olExchangeConnectionMode enumeration
exchangeMailboxServerName The name of the server that hosts the account. For example https://outlook.office365.com/mapi/emsmdb/?MailboxId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx@somewhere.xy. Similar to namespace.exchangeMailboxServerName
exchangeMailboxServerVersion For example 15.20.5314.13
getAddressEntryFromID() Similar to nameSpace.getAddressEntryFromID()
getRecipientFromID() Similar to nameSpace.getRecipientFromID()
parent
session Returns the namespace object
smtpAddress This is not the IP address of an SMTP server
userName

Iteration over accounts

option explicit
sub main()

    dim acc as account
    for each acc in application.session.accounts
        debug.print acc.currentUser
        debug.print "  Username:       " & acc.userName
        debug.print "  Display Name:   " & acc.displayName
        debug.print "  Account type:   " & acc.accountType
        debug.print "  SMTP Address:   " & acc.smtpAddress

        debug.print "  Mailbox Server: " & acc.exchangeMailboxServerName
        debug.print "  Mailbox vers.   " & acc.exchangeMailboxServerVersion

        debug.print "  Conn. method:   " & acc.exchangeConnectionMode

        debug.print "  auto disc mode: " & acc.autoDiscoverConnectionMode
'       debug.print "  " & acc.autoDiscoverXml
    next acc

end sub

Index