Sue Mosher [MVP-Outlook]
2007-01-22 13:33:57 UTC
This is Outlook 2007? (Please always include your Outlook version in your posts.)
SendUsingAccount takes an Account object, not a string, so something like this:
itmnewmail.SendUsingAccount = Outlook.Session.Accounts(Nz(frm.cmbda,""))
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
SendUsingAccount takes an Account object, not a string, so something like this:
itmnewmail.SendUsingAccount = Outlook.Session.Accounts(Nz(frm.cmbda,""))
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
Hello. I need to set the email account from Access. I have a list of account
in Access and I need to use one of them as an account for an Outlook mail. I
Dim frm As Form
Dim itmnewmail As MailItem
Set itmnewmail = outlook.CreateItem(olMailItem)
Set frm = Forms(Nz(strfrm, ""))
itmnewmail.SendUsingAccount = Nz(frm.cmbda,"")
frm is my form in Access, cmbda is a combo for chosing an account from a list.
This code works to set the
itmnewmail.to
field, but not for the account sender.
Can anyone help?
Thanks.
in Access and I need to use one of them as an account for an Outlook mail. I
Dim frm As Form
Dim itmnewmail As MailItem
Set itmnewmail = outlook.CreateItem(olMailItem)
Set frm = Forms(Nz(strfrm, ""))
itmnewmail.SendUsingAccount = Nz(frm.cmbda,"")
frm is my form in Access, cmbda is a combo for chosing an account from a list.
This code works to set the
itmnewmail.to
field, but not for the account sender.
Can anyone help?
Thanks.