I'm looking for a way to edit the Recent Recipient list (the auto-complete list under Contacts and Recent Addresses) using AppleScript.  I have a need to prune that list programmatically, instead of manually clicking the X button to remove individual addresses.  I'm aware of the clear recent recipients command in AppleScript, but that clears the entire list.  I need to be able to remove selected entries (e.g. by domain name of the address).

Is that list an accessible object within AppleScript?  Any thoughts as to how I could do this?

Thanks!

Hi,


First of all, if there is another way other than applescript that also does the trick, that is also fine.

I've been searching the web for a script to save all the attachments from my email to a local folder (Or network folder) and then delete them using applescript.
I came acros alot of script but all of them don't save my actual attachment, the best script I found deleted the attachment and added a line in the email saying the attachment was deleted. I tried so many scripts, trying to combine and edit them but they all don't seem to save my attachments.

so somehow the this part of saving does not work

     save a in “/Users/****/Desktop/” & id of msg & “/” & name of a

Is there a change in code maybe? Cause the posts are from 2 years ago.

tell application "Microsoft Outlook"

set msgs to current messages

set sz to 0

repeat with msg in msgs

set theName to subject of msg

set fixName to theName as string

set AppleScript's text item delimiters to "/"

set theString to text items of fixName

set AppleScript's text item delimiters to " "

set fixName to theString as string

set AppleScript's text item delimiters to ""

log "Subject: " & subject of msg

tell application "Finder"

set p to path to desktop

make new folder at p with properties {name:fixName}

end tell

set fileDownloadedList to "Attachments Removed:<br>------------------------<br>"

if msgs is {} then

display dialog "Please select a message first then run the script" with icon 1

return

end if

set atts to attachments of msg

repeat with att in atts

set a to att

try

set asz to file size of a

save a in "/Users/ssbg/Desktop/" & fixName & name of a

set sz to sz + asz

set fileDownloadedURL to "file://localhost" & my path2url(POSIX path of fileDownloaded)

set fileDownloadedList to fileDownloadedList & "Attachment:  <a href=\"" & fileDownloadedURL & "\">" & fileDownloaded & "</a><br>"

on error

exit repeat

end try

end repeat

set content of msg to fileDownloadedList & "<br>" & content of msg

set attachmentCount to count of atts

repeat (attachmentCount) times

delete item 1 of atts

end repeat

end repeat

end tell

Thanks,

Sandy

I'm trying to run an AppleScript by Ed Asmus for office Outlook 2011 for Mac and then having problems.  The reason I'm trying to run the AppleScript is to remove duplicate and sometimes triplicate copies of contacts.  When I run the AppleScript I get the following error message

Microsoft Outlook got an error: Cannot delete this item number -10003 from contact id 5578

My questions are:

1. How do identify what I am assuming to be the problem contact under the ID "5578"?
2. Can I manually remove this problem contact ID?
3. where did these duplicate contacts come from?
4. how do I prevent them from returning?

Thank in advance for any assisttance

Is there a way to create an outgoing rule that is triggered on a category, or another way to do the following;

I want to trigger an applescript to create a To Do (in Things) when I send an email that needs a followup. I would like to add the category @followup to the email, and then have an outgoing rule that see this, and triggers the applescript.

I can set a condition for incoming email that has a category, but not outgoing.


Using Outlook 2011 for Mac, I have been trying to select the applecsript, "file message by category" for all outgoing mail.

Under rules I selected:
outgoing (under my computer)
when a message is sent:

from= exists
run applescript =script

When I select the script button and go to the folder of scripts under
library/application support/ microsoft/outlook script menu items

I am not allowed to select any of them (greyed out).

I also tried moving a copy of the script I want to the
library/scripts folder

but I still cannot select it.




I have an AppleScript program which does many things. It needs to determine the "front" or active window. According to the Outlook dictionary, each window has the following property:
   index (integer) : The index of the window in the back-to-front window ordering.

I am experiencing at least three bugs with the index property:

1. I can access the index property, but it never changes as windows are brought to the front, pushed to the back, or selected from the Window menu.


2. The index for every Main window is a Real, not an Integer.

tell application "Microsoft Outlook"

   index of every window

end tell 

{2.147483647E+9, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}



3. The indices for two Main Windows are indistinguishable. If there is a difference, it is way down in the small digits of the floating point: 

tell application "Microsoft Outlook"

   index of every main window

end tell

{2.147483647E+9, 2.147483647E+9} 

The AppleScript method provided by Microsoft (Create Task from Message) has stopped working for me.  Any advise to resolve?

HI,

This started happening with the last upgrade to Outlook.  I don't have any size limits set on attachments in my e-mail for the account.  Can you help me with a couple questions please:

1) The Outbox isn't showing any messages that are stuck, but obviously something isn't sending.  Where do I find this message?  and how do I "remove/delete" it?
2) Where can you change the settings? so this doesn't happen again please.

I did partially solve this by using the following answer, but how do I prevent it from happening again?  and I also don't know what message I just deleted....

Try this:

Open the AppleScript Editor found in /Applications/Utilities. Paste in the following three lines:

tell application "Microsoft Outlook"
    delete every message of outbox
end tell

Click the Run button at the top and this should delete every message in your Outbox.

Hope this helps! 
Thanks.
Wiggly1
Hello,

I'd need assistance writing an AppleScript to extract the first name, last name,  nickname, and sender address from every message in a folder in Outlook for mac:2011 then populate a new Excel spreadsheet. Once in Excel, I'll manually remove duplicates.

I want to rebuild my autocomplete history in Outlook for mac:2011 after migrating from Apple Mail.

Outlook only allows you to Add Sender to Address Book one message at a time.

Here's what I have:

on run {}

tell application "Microsoft Outlook"

set theAccount to imap account "Me"

-- Get the messages selected in Outlook

set currentMessages to current messages

set mailFolders to name of folders of theAccount as list

-- Check to make sure items are selected, if not then quit

if ((count of currentMessages) < 1) then return

-- Iterate through selected messages

repeat with aMessage in currentMessages

-- Get the account for the message

set messageAccount to account of aMessage

set messageSender to sender of aMessage

sender of every message of folder "INBOX" of the theAccount as list

end repeat

end tell

end run



Thank you.