Script to nuke messages in Outlook 2011

I have the following script for Entourage, and thought it would work under Outlook but it does not. it hangs on the first 'message'
Anybody know how to fix this?
FYI the script deletes a selected message immediately bypassing the trash.
on run
tell application "Microsoft Outlook"
if the class of the front window is message window then
set theMsg to the displayed message of the front window
my ProcessMsg(theMsg)
else
set theMessages to the selection
repeat with theMsg in theMessages
my ProcessMsg(theMsg)
end repeat
end if
end tell
end run
-- process the messages
on ProcessMsg(theMsg)
tell application "Microsoft Outlook"
move theMsg to deleted items folder
delete theMsg
end tell
end ProcessMsg

Thank you for this script, it has helped solve my desire to nuke the message from my Outlook 2011. I added a dialog to the script to ask for confirmation as sometime I little to quick with the keyboard shortcuts:
tell application "Microsoft Outlook"
          set theMsgs to the current messages -- selected messages
          try
                    set question to display dialog "Permanently Delete Message(s)?" buttons {"Yes", "No"} default button 2
                    set answer to button returned of question
                    if answer is equal to "Yes" then
                              repeat with theMsg in theMsgs
  permanently delete theMsg
                              end repeat
                    end if
          on error errMsg number errNum
                    set theSubject to subject of theMsg
                    set theFolder to name of «class stor» of theMsg
  beep
                    display dialog errMsg & return & return & errNum & return & return & "(Erroring on message: " & theSubject & " in " & theFolder & ")" with icon 2
          end try
end tell

Similar Messages

  • Applescript to choose folders to save sent messages in Outlook 2011 for MAC

    I want to create a rule to apply to messages as they are sent that gives me a dialog box in which to choose what folder I want to save the copy of the sent message (instead of the regular default of the Sent Items folder).
    I just moved from a PC to a MAC and I miss this feature on Outlook 2011 for the MAC as I like to keep my replies/new messages sent in the same folders by subject as I leave received messages.
    I've looked everywhere for an AppleScript I could use as part of a rule that applies to messages as they are sent and brings up a dialog box to chose the folder in which to save the sent message.
    Anybody able to help here? It would be much appreciated!

    Hi ZRANY,
    First, you must be aware that “Mail does not apply rules to sent messages - if you want to organize your sent messages in mailboxes together with your received messages, you have to manually select all messages in your "Sent" mailbox and choose "Apply Rules to Selection" from the menu.” ([Mail Scripts 2.10.2|http://homepage.mac.com/aamann/Mail_Scripts.html]).
    That being said, maybe the following very simple script could act as a starting point:
    *using terms from application "Mail"*
    *on perform mail action with messages theMessages*
    *tell application "Mail"*
    *repeat with eachMessage in theMessages*
    *set theSubject to subject of eachMessage*
    *choose from list (get name of mailboxes) with title "My mailboxes" with prompt "Subject: " & theSubject & return & return & "Select a mailbox where to copy this message."*
    *duplicate eachMessage to mailbox 1 whose name is (item 1 of result) as text*
    *end repeat*
    *end tell*
    *end perform mail action with messages*
    *end using terms from*
    Hope it can help.
    Message was edited by: Pierre L.

  • Help with "The end of file was reached" error message in Outlook 2011

    Hello, I am having an issue with Outlook 2011 that after 24 hours or so I am getting a “The end of file was reached” error message code -17895.
    Right after this error I get a disconnected from Exchange server and even after re opening the client it stays like this for about 5 minutes then restores. Has anyone else seen this error? I am able to reproduce this on multiple machines with multiple Exchange
    2010 mailbox accounts.  

    Same situation here:
    Outlook 2011 for Mac using Office 365, 3 users have reported the End of File Reached error when trying to send email.
    I have logged a ticket with Microsoft support and they have followed up with the following directions.
    1.    
    Repair Disc Permissions On A Mac
    o   
    1
    Log in to your computer with the administrative account. Open the hard drive, go into the "Applications" folder and then open the "Utilities" folder. Now launch the Disc Utility application.
    o   
    2
    Select your main hard drive. You'll probably see two options--one is the manufacturer's name of the disc and the other name is what you've called it. Choose the name of your hard drive.
    o   
    3
    Click on "Verify Disc Permissions" and the computer will perform a diagnostic test. After a few minutes, the problems with disk permissions will be reported in the Disc Utility window.
    Click on "Repair Disc Permissions" to fix them.
    o   
    4
    Insert your Mac OS X installation disk and restart your computer. Hold down the "C" key on your keyboard to boot from the disk rather than your computer's hard drive. Cancel the OS
    installation and open Disc Utility.
    o   
    5
    Click on "Verify" to have Disc Utility check your computer's hardware. Notice that this option is only available when the program is run from the CD. You can only test the hardware
    of a computer that isn't running the program locally.
    o   
    6
    Use Disc Utility to try and repair any hardware errors that it detects. Usually fixing the permissions will be enough to maintain your computer. If you still experience frequent lockups
    and crashes, then you should try repairing it with this method.
    Tips & Warnings
    If you use your computer for high-performance work, such as software compiling or video editing, then you may want to check the permissions weekly. Most computer users will only need
    to fix permissions after noticing problems with applications or the operating system.
    If the computer's performance does not improve after repairing permissions, then you'll have to troubleshoot for other issues. You may want to purchase more RAM for your computer to
    help speed it up.
    Permissions repairs will not correct problems caused by applications that did not use Apple's installer. Try deleting all files associated with the application and then reinstalling
    it.
    Avoid repairing the permissions after you've booted the computer from the OS X CD. It won't cause problems to your drive, but the version of "Disc Utility" on the CD may not be updated
    to address permission changes that are required by certain software updates.
    Secondly, the information for repairing an Outlook 2011 database is as follows:
    http://support.microsoft.com/kb/2360509

  • How to read Entourage 2004 messages using Outlook 2011?

    I have recently upgraded to Microsoft office 2011 and started using Outlook as my mail software. I am having probelms opening Entourgae 2004 messages. When I double click on them they apear as attachment in an Outlook message. The Etourage icon appears for a second in the dock and then disappears. I tried importing them to outlook but got nothing.
    I am using MacOs 10.6.8.
    Any advice will be most appreciated.
    Many thanks!

    Try Lion forum, this is not MacBook Pro forum. And there is MacTopia MS support.

  • Cannot see full email message in outlook 2011 inbox

    I can only see trancated emails after a one month, how do I display full email messages in the inbox.

    Hi,
    Please disable Aero in Windows to try again:
    http://www.howtogeek.com/howto/windows-vista/disable-aero-on-windows-vista/
    If the issue persists, please perform a clean boot to determine whether background programs are interfering with Outlook:
    http://support.microsoft.com/kb/929135
    Thanks,
    Melon Chen
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click
    here

  • Exchange 2010/Outlook 2011 woes

    A cautionary tale for anyone thinking of upgrading to an Exchange 2010 server. I have been working successfully with Mail/iCal/Address Book on an Exchange 2007 for over a year. My hosted exchange provider offered a free upgrade to Exchange 2010, and I decided to purchase Office 2011 to use Outlook. Big mistake. Now I am stuck with the following issues:
    1. Mail has an incompatibility with Exchange 2010 - sent messages lack a "From:" field in the raw message source (see http://discussions.apple.com/message.jspa?messageID=12591913)
    2. My hosted Exchange provider also has a Blackberry Enterprise server. But when you file sent messages in Outlook 2011, they fail to appear in the corresponding Blackberry subfolders - they disappear from the main message list and then do not appear in the subfolder. Received messages file with no problems - sent ones don't. Very weird, and very annoying. Sent messages filed in subfolders via Outlook Web Access appear properly on the BB handheld.
    3. Time zones in Outlook 2011 conflict with the Exchange server. Adding an appointment via the Blackberry, the appointment initially appears in the correct place, then a few seconds later, jumps an hour forward. Quitting Outlook on the desktop machine solves the problem... Outlook has Sydney as GMT+11, which is incorrect. It is GMT+10, but with an extra hour for daylight saving in summer. The server settings, as displayed on Outlook Web Access, correctly show Sydney as GMT+10.
    As a result, I am now stuck using Outlook web access as my only reliable mail/calendar application, with all the limitations that that entails (no recall of previously used email addresses for example). And I will now have to wait for either a new version of Outlook, or a new version of Mail...
    Any other users experiencing any of these issues?
    Thanks in advance.

    I'm in the middle of a PC -> Mac migration and have hit a lot of snags with Exchange 2010.
    All clients are running 10.6.4. Mail and Contacts seem to be working properly. iCal however is very problematic. When attempting to add shared calendars through the delegation tabs of Account Settings I am able to find the accounts, add them to the delegate list, but the client is not able to grab any calendar data.
    I've got another issue which is Outlook 2011 font sizes being way to small for my older users, and the inability to separate shared calendars by color. In the past admin assistants were able to separate all the calendars of the attorneys they support by color and in columns, using Exchange 2007 for PC. Now the only way to distinguish between calendars is by selecting the calendar you want to see from the calendar list on the left, causing the calendar events to highlight with a darker shade of the default gray all shared calendars are assigned.
    The fonts are a whole separate issue which I've researched exhaustively and found nothing to indicate that there is any way to fix this currently. The older users have on their own gone about decreasing their screen resolution and increasing the default font size at the system level.
    Is there any support avenue within MS to or Apple to help with this? Apple has been useless, I've tapped into the Apple Consultants Network and they too are unaware of how to resolve these issues. Does MS have a support vein for Outlook 2011 users on an Exchange 2010 server?

  • Outlook 2011 Slow in Mavericks

    About every minute or so when typing a new message in Outlook 2011, I get the spinning color wheel indicating a pause.
    It's really frustrating and makes outlook almost unusable. It happens in all accounts. I ahve one echange, one imap, and one pop account.
    Any help would be much appreciated.
    Hardware Overview:
      Model Name:    MacBook Air
      Model Identifier:    MacBookAir3,2
      Processor Name:    Intel Core 2 Duo
      Processor Speed:    2.13 GHz
      Number of Processors:    1
      Total Number of Cores:    2
      L2 Cache:    6 MB
      Memory:    4 GB
      Bus Speed:    1.07 GHz
      Boot ROM Version:    MBA31.0061.B07
      SMC Version (system):    1.66f61
    Macintosh HD:
      Available:    15.56 GB (15,564,636,160 bytes)
      Capacity:    250.14 GB (250,140,434,432 bytes)
      Mount Point:    /
      File System:    Journaled HFS+
      Writable:    Yes
      Ignore Ownership:    No
      BSD Name:    disk0s2
      Volume UUID:    6B2667F4-85F9-3B20-A14E-BBCE0C0BB2F8
      Physical Drive:
      Media Name:    APPLE SSD SM256C Media
      Medium Type:    SSD
      Protocol:    SATA
      Internal:    Yes
      Partition Map Type:    GPT (GUID Partition Table)
      S.M.A.R.T. Status:    Verified

    *** ALTERNATIVE SOLUTION IF USING A PROXY ***
    Hi all,
    Similarly, I've been battling with Outlook for Mac related issues since Mavericks. Although this might not be relevant to all Outlook users, I'm posting this in case of others coming across this thread, and using this solution that has remedied my long standing problems.
    Symptoms:
    Issue connecting to Exchange server, continually trying to refresh email, emails took ages to construct - often letter by letter, unable to click into emails, etc.
    Solution:
    I was experiencing repeated Proxy login prompts. Details were saved in keychain, but still I needed to keep updating. Unbeknown to me, this was impacting the ability of Outlook to function normally. Although these prompts didn't originate from Outlook, they were impacting.
    The solution is to ensure that you have working proxy settings saved in the system keychain, not just your personal login keychain.
    So when you next get one of these dialogs:
    Note the server name that is requesting authentication, the port (usually 8080) and if it is an http or https request. Typically it will be something in the form https://someproxyserver.someorganization.com:8080
    See if you already have an entry for that server in your login keychain. If not, make one manually, (being sure to enter the whole thing as per the example above with the :8080 at the end). Typically that there needs to be two separate keychain entries per proxy server, one for http and a second for https, though syncdefaultsd only uses https.
    Once you have login keychain entries for the proxy server, double-click them and ensure that under Access all applications are allowed, and that your user name is saved.
    Now for the fun bit. Option-drag and drop these entries into your system keychain. Click on the system keychain, and confirm that they are there, and that all the settings are exactly right.
    For good measure, do a shift-restart then a normal restart.
    You should now get no more annoying dialogs for that particular proxy server. If your proxy server has more than one alias, or if you have several, then whenever you get a new unidentified dialog, repeat the above.
    I hope this helps someone else in continuing to use Outlook.

  • I have recently bought a macbook and am using outlook 2011 as email. i am getting an error message 4.7.0 not allowed when sending emails how do I fix?

    i have a macbook and am using outlook 2011 as email.   receiving okay.   sending okay sometimes.  am now getting error message 4.7.0 not allowed when sending.  what is the cause? how do I fix please?

    I have discovered that the emails have in fact been sent but much later, maybe it's a network problem with the people i am sending it to.  so i checked my sent items and they are there, but at the time the email doesn't go straight into the sent box or drafts so i'm assuming it's disappeared and type it again.  i'll keep going with it, until someone can give me a possible solution or explanation as to what is happening.

  • Outlook 2011 for MAC, how do I stop "to protect your privacy some pictures in this message were not downloaded"  I've added to safe senders and added to contacts, it still happens with every single email

    Outlook 2011 for MAC, how do I stop "to protect your privacy some pictures in this message were not downloaded"  I've added to safe senders and added to contacts, it still happens with every single email

    Ask on the Microsoft Mac forums since it's their software you have questions about..
    http://answers.microsoft.com/en-us/mac

  • I am having problems with my outlook 2011. While i am able to check and SEND email on all my other devices ( Ipad, iphone, Macbook), I am unable to do so with my iMac. This problem started suddenly and the error message i get is error 5.7.8. Please Help

    I  am having problems with my outlook 2011. While i am able to check and SEND email on all my other devices ( Ipad, iphone, Macbook), I am unablesend any email with my iMac ( i can recieve email) . This problem started suddenly and the error message i get is error 5.7.8. I have read the threads on line and went into settings, even created a new profile, nothing helps...Please advice..is this something to do with my keychain Access?

    As Outlook is not an Apple product, you will find more helpers familiar with Outlook here:
    Office for Mac forums

  • Sent messages from secondary account are not saved in Outlook 2011 for Mac

    We are using a shared email account added in Outlook 2011 for Mac.  It's not the default account but we send from it often.
    Whenever sending from this secondary mailbox, the message is not saved in sent items folder under the secondary mailbox or the default mailbox.  There seems to be no record of the sent item anywhere.
    I verified the message is sent and received.
    All microsoft updates have been applied and we are using Exchange 2010.

    Hello,
    Please first log into OWA and check if the email are saved in the Sent Items folder.
    We can tick the option "Save copies of messages in Sent Items folder" in Outlook 2010 and Outlook 2013 to save a copy of sent message, please check if you get such option in Outlook for Mac.
    In addition, in Outlook for Windows, we can change a registry key to force Outlook to save sent emails in the default or secondary mailbox, but I'm not sure if Outlook 2011 has such trick. See:
    http://www.msoutlook.info/question/278
    Since this forum is general questions and feedback related to Outlook for Windows, it's better to post your question to the forum for Mac:
    http://answers.microsoft.com/en-us/mac/forum/macoffice2011-macoutlook?sort=lastreplydate&dir=desc&tab=Threads&status=&mod=&modAge=&advFil=&postedAfter=&postedBefore=&threadType=All&tm=1395990325271
    The reason why we recommend posting appropriately is
    you
    will
    get the most qualified pool of respondents,
    and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.
    Thank you for your understanding.
    Best Regards,
    Steve Fan
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click
    here

  • I have started to get this error message: 5.1.3 bad address syntax in my email account. I am using Outlook 2011. It does not appear to be affecting sending or receiving email. I have no idea what it means or how to resolve the issue. Any advice?

    I have started to get this error message: "5.1.3 bad address syntax" in my email account. I am using Outlook 2011. It does not appear to be affecting sending or receiving email. I have no idea what it means or how to resolve the issue. Any advice?  My email account is through Optimum online and I am using Airpost Express.
    P.S. The error sound "bong" is driving us nuts!

    Please post on the Office for Mac product forums that Microsoft hosts. It's their product and they can best troubleshoot the issue.

  • I have a macbook pro and use MS Office 2011. In Outlook 2011, i have noticed a strange phenomenon. In some messages, although the attachment icon appears indicating presence of attachments, i am unable to actually see or access the attachments.

    i have a macbook pro and use MS Office 2011. In Outlook 2011, i have noticed a strange phenomenon. In some messages, although the attachment icon appears indicating presence of attachments, i am unable to actually see or access the attachments.

    vivebk67,
    FYI, I have the same issue.  I converted from MS Office 2010 to Mac Office 2011 by importing .pst files several months ago and I have noticed that many emails, which I originally received in MS 2010 but coverted to Mac 2011, show the paperclip as if there is an attachment.  But when I open the email, the attachment is not there.
    At this point I cannot find any pattern as to why some converted emails retained their attachment and other emails appear to have retained their attachment but the attachment is not visible.
    I can confirm that there actually is an attachment by opening up MS Office 2010, but that is a huge pain becasue I have to open Parallels to do that.  I have no issues with any attachments received in Mac Office 2011.
    I spent an hour opening up a ticket with MS, sent them .pst files with examples and the guy was able to confirm that he could open the attachment in MS, but not Mac.  BUT, of course, I was told that I would not be apprised of any ticket updates and that the only way I would know if the issues was fixed was when I was finally able to view attachments that I was not able to view previously.
    Running MacBook Pro OS X 10.7.1

  • Error Message Outlook 2011

    Just bought a new MacBook Air together with Office mac 2011 Home & Business.First transferred all data from the old MacBook Air including the Office 2011 installed there. Then deleted the entire old Office and loaded the new Office from the DVD entering the new license key.  Wanted to start Outlook and I get the following error message: This identity cannot be opened with this version of Outlook! What to do? Thanks for anyone who can offer help! Marco

    Your newly installed version doesn't have the latest service packs.
    Find the "Microsoft AutoUpdate" app and run it.  You can run it from Word or any other Office app and click "Help" --> "Check for Updates".
    Got the solution here:
    http://salmagnone.typepad.com/lab09/2011/05/outlook-2011-for-mac-identity-cannot -be-opened-error.html

  • I need help exporting Apple Mail messages to Outlook for MAC 2011

    Good morning,
    I need help exporting Apple Mail messages to Outlook for MAC 2011. Please....

    It is possible to do this without external tools, but it is a tremendous faff. See
    http://answers.microsoft.com/en-us/mac/forum/macoffice2011-macoutlook/import-ema il-from-mail-to-outlook-2011/5e858173-e1f4-4adc-99d7-253cc467169d?page=2 for details.
    The easiest way, however, is to use Mail Exporter Pro https://itunes.apple.com/us/app/mail-exporter-pro/id675131616?mt=12 which will convert the email for you from one format to the other, and comes with an excellent manual.
    A third possibility is to connect Apple Mail to an email account via IMAP (this doesn’t have to be your usual account, you can just create a Gmail account for the purpose) . Copy all the messages into it and they will be uploaded. Then connect Outlook 2011 to the same account, via IMAP again, and let the messages download, then copy them to wherever you want to keep them and disconnect from that account. This is slow but preserves the attributes of your email (e.g. read/unead) better than any other method.

Maybe you are looking for

  • Different page footer

    Hi, I have a requirement: If the report is Multiple pages, First page footer should be repeated in all pages, except lage page, whch shud have diff footer. If the report is single page, last page footer will be used. Can any one please send the sampl

  • Upgrading Ram on macbook pro 13" late 2011

    Just wandering do I have to match the RAM size in each slot when I upgrade or can I just upgrade one from 2gb to 8bg ? I've heard that crucial are probably the best to buy from. I'd appreciate any advice.

  • After updating to ios7 my iphone 5 my phone is consuming battery alot

    after updating to ios7 my phone is consuming battery alot. it really *****

  • Searching for existing scripts..

    I have a question.when I open some application's folder (for example garageband) there is no existing scripts,does that means that some scriptable applications don't have any existing scripts that I can edit? I saw many sample scripts in some folder

  • Value presented as "#########"

    I have a project that has been unchanged for quite a long time, but today after resurrecting it it is having problems.  Upon previewing the project, it presents a certain value as "#########", but is still able to use the number as if it were there,