jzdojo
asked on
Outlook 2007 macro to create new message on Windows Vista and Windows 7
With some help from Experts-Exchange, several years ago, I created a macro for Outlook 2007 on Windows XP. The macro was used to create a toolbar button. A button was created for each e-mail account except for the default account. When one of these buttons was clicked it would create a new e-mail message and set the sending account.
Below is the code:
Sub SendUsing(intIndex As Integer)
Dim olkAccount As Outlook.Account, _
olkMail As Outlook.MailItem
Set olkAccount = Application.Session.Accoun ts.Item(in tIndex)
Set olkMail = Application.CreateItem(olM ailItem)
With olkMail
.SendUsingAccount = olkAccount
End With
olkMail.Display
Set olkMail = Nothing
End Sub
I've tried utilizing the same code in Outlook 2007 on Windows Vista and Windows 7. When I click the button nothing happens.
Any ideas on what I need to do?
The idea is to have one button access to create a new message sent from a specifica account and eliminate the need to click the account button.
Below is the code:
Sub SendUsing(intIndex As Integer)
Dim olkAccount As Outlook.Account, _
olkMail As Outlook.MailItem
Set olkAccount = Application.Session.Accoun
Set olkMail = Application.CreateItem(olM
With olkMail
.SendUsingAccount = olkAccount
End With
olkMail.Display
Set olkMail = Nothing
End Sub
I've tried utilizing the same code in Outlook 2007 on Windows Vista and Windows 7. When I click the button nothing happens.
Any ideas on what I need to do?
The idea is to have one button access to create a new message sent from a specifica account and eliminate the need to click the account button.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
It was a security issue. Thanks.
Ah Good Deal.
Gald to help
Gald to help
ASKER