Outlook Macro No Longer Working in 2007

Hello!

I have an Access 2003 Database that sends emails with attachments to the Drafts folder for review.  We then created a macro (in Outlook 2003) to cycle through the emails in the Drafts folder, opening each one & clicking the SEND button.

Office 2007 was installed, and the Outlook 2007 macro is now now longer working.

HELP!!!  Did the sendkeys sequence change?

Thanks!

Ronda
Sub SendAll()
'This macro sends all selected messages from the Drafts Folder,
'for emails generated from the TMA Database
 
    Dim olExplorer As Outlook.Explorer, _
        olSelection As Outlook.Selection, _
        olItem As Outlook.MailItem
    Dim x As Integer
    Set olExplorer = Application.ActiveExplorer()
    Set olSelection = olExplorer.Selection
    If olSelection.Count > 0 Then
        For x = olSelection.Count To 0 Step -1
            If x <> 0 Then
                Set olItem = olSelection.Item(x)
                olItem.Display
                SendKeys "^~"
                DoEvents
            End If
        Next
    End If
    Set olItem = Nothing
    Set olSelection = Nothing
    Set olExplorer = Nothing
End Sub

Open in new window

Ronda-SAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

justinmoore14Commented:
Ronda-S, if possible could you give a few more details on what you mean (Not Working). IE is the macro not running when you open Outlook, When you manually run the Macro it does nothing, etc....

Also, from within Outlook have you tried going to Tools/Trust Center/Macro Security and made sure either the "Warnings for all macros" or "No security check for macros (Not recommended)" bubble is selected?? Hope this helps.

One last thing you said (Outlook 2007 macro is now now longer working) I take that you meant Outlook 2003??



Justin
0
David LeeCommented:
Hi, Ronda-S.

Outlook 2007 security isn't as restrictive as Outlook 2003 and earlier.  You could simply replace the SendKeys command with

    olItem.Send

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ronda-SAuthor Commented:
That was IT !!  Thanks a bunch!  :-)
0
David LeeCommented:
You're welcome.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Outlook

From novice to tech pro — start learning today.