We have an AppleScript for Outlook for Mac 2011 (version 14.5.0) that is supposed to, after performing the desired action on the selected message(s), move the message(s) to a folder.

The script to move messages to a folder is straightforward:

tell application "Microsoft Outlook"

  

  set currentMessages to current messages

  repeat with x from 1 to (count of currentMessages)

    set theMessage to item x of currentMessages

    

     -- Do other actions here

    move theMessage to folder "Saved"
  end repeat
end tell

The problem is that while the script works, it fails to move the message(s) for some users (two out of roughly 25 or 30 users total).

The organization is using Gmail to host its mail and so the Outlook accounts are standard IMAP accounts to the Gmail servers. The folder called "Saved" appears in Outlook here: "Inbox > Our Google Apps > Saved".

If the user connects to Gmail via a Web browser, the folder appears as "INBOX/Saved".

This user is running OS X 10.10.3.

The error that appears is "-10008: Microsoft Outlook got an error: The specified object is a property, not an element." This error is thrown when the script attempts to move the message to the folder "Saved". 

I can reproduce the error on my own machine (using the same versions of everything and a Gmail account) if I attempt to move the message to a folder that doesn't exist. (When the folder does exist, the script works perfectly.)

I believe the folder exists in this user's environment. We can manually move a message into that folder from Outlook and confirm that it is moved by looking at the "Saved" folder via the Web browser. Additionally, we ran a script that simply listed all of the folders in all of the user's accounts. This folder shows up and has the same name as is being used in the script.

I have tried re-naming the "Saved" folder to something else, syncing it to Gmail, then naming it back to "Saved".

I have tried re-naming the "Saved" folder to something else and then creating a new "Saved" folder.

Nothing seems to work for this particular user even though the script works perfectly for me and for other users with the same version os OS X, Outlook, the script, etc.

Gmail does have a setting that limits the number of messages in an IMAP folder. The user's message count is significantly under the lowest limit setting available (350 messages out of the 1000 message limit). So I don't think that is an issue and, again, we can manually move messages into the folder.

Any ideas you have on what else might be causing the move to folder action to fail would be most appreciated.

Thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.