[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Outlook Macro No Longer Working in 2007

Posted on 2009-07-06
4
Medium Priority
?
153 Views
Last Modified: 2012-05-07
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

0
Comment
Question by:Ronda-S
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 8

Expert Comment

by:justinmoore14
ID: 24787907
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
 
LVL 76

Accepted Solution

by:
David Lee earned 2000 total points
ID: 24787999
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
 

Author Closing Comment

by:Ronda-S
ID: 31600313
That was IT !!  Thanks a bunch!  :-)
0
 
LVL 76

Expert Comment

by:David Lee
ID: 24789896
You're welcome.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you have clients or friends from around the world, it becomes a challenge to arrange a meeting or effectively manage your time. This is where Outlook's capability to show 2 time zones in one calendar comes in handy.
The core idea of this article is to make you acquainted with the best way in which you can export Exchange mailbox to PST format.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question