Hello,
Any help troubleshooting will be greatly appreciated. I'm trying to write a simple script in Applescript that takes the currently selected Outlook Message and moves it to an Outlook Folder called TEST. I'm on Outlook for Mac 2011 Ver 14. Here's the code.
*******************************************
tell application "Microsoft Outlook"
activate
set msgSet to current messages
if msgSet = {} then
error "No messages selected. Select at least one message."
error -128
end if
set theMsg to item 1 of msgSet
set theAccount to account of theMsg
set archiveFolder to folder "TEST" of on my computer
repeat with aMessage in msgSet
move aMessage to archiveFolder
end repeat
end tell
*******************************************
When I run this script I get an error as follows.
AppleScript Error
Microsoft Outlook got an error: Cant get folder "TEST" of on my computer.
It looks like the script can't see the folder. Here's what my folder hierarchy looks like in Outlook:
Any ideas on how to resolve this? Thanks!
Recent Comments