amitcohen
Board Regular
- Joined
- Jan 14, 2010
- Messages
- 118
Hi
I have found this macro (http://www.slipstick.com/outlook/2010/multiple-accounts-and-the-default-account/)
This allow me to select the account for sending email other then the default one.
However, when running the macro, I'm getting the compile error: User-defined type not defined.
I did activated the 'Microsoft DAO n3.6 Object Library.
And yet, still giving me that error..
Any ideas how to solve this?
Thanks,
Amit.
I have found this macro (http://www.slipstick.com/outlook/2010/multiple-accounts-and-the-default-account/)
Code:
'Sub Mail_small_Text_Change_Account()
Public Sub New_Mail()
Dim oAccount As Outlook.Account
Dim oMail As Outlook.MailItem
For Each oAccount In Application.Session.Accounts
If oAccount = "me@mywebsite.com" Then
Set oMail = Application.CreateItem(olMailItem)
oMail.SendUsingAccount = oAccount
oMail.Display
End If
Next
End Sub
However, when running the macro, I'm getting the compile error: User-defined type not defined.
I did activated the 'Microsoft DAO n3.6 Object Library.
And yet, still giving me that error..
Any ideas how to solve this?
Thanks,
Amit.