Quantcast
Channel: Microsoft Outlook Interoperability
Viewing all articles
Browse latest Browse all 109

Outlook automation - SendUsingAccount readonly?

$
0
0
Hi experts,

I am trying to change the default Outlook account but it seems to be
readonly for new mail messages... Does somebody know the solution?

My code (Visual FoxPro):
oOutlook = CREATEOBJECT("Outlook.Application")
oNamespace = oOutlook.GetNameSpace("MAPI")
oNamespace.Logon()
loItem = oOutlook.CreateItem(0)
loitem.To = 'some@email.com'
loitem.Body = "BODY"

*-- Here is the problem
loitem.SendUsingAccount = oOutlook.Session.Accounts.Item[2] && I am sure
this is valid POP3 account

*--...

Outlook automation - SendUsingAccount readonly?

Viewing all articles
Browse latest Browse all 109

Trending Articles