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
Solved

Outlook Macro No Longer Working in 2007

Posted on 2009-07-06
4
148 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
  • 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 500 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Large Outlook files lead to various unwanted errors and corruption issues. Furthermore, large outlook files can also make Outlook take longer to start-up, search, navigate, and shut-down. So, In this article, i will discuss a method to make your Out…
How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
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…

829 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