Print Outlook 2011 messages, Mac

I want to print my messages using the rules.

I made a script with applescript to get the attachments names print on the message too. The script works but the thing is I dont know how to tell applescript to refer to the message that the rules is applying to.

Here is what I wrote down:

tell application “Microsoft Outlook”
set myMessage to first message
tell myMessage
set AppleScript’s text item delimiters to return
set myAttachment to get name of every attachment as string
set AppleScript’s text item delimiters to “”
open
set myContent to myAttachment
set content to content of myMessage & “-----” & myAttachment
print myMessage with properties {target printer:“dnssd://HP%20Color%20LaserJet%20CP3525%20%5B896CB3%5D._printer._tcp.local.”, copies:1, pictures:true, message header name:true, message header display name:“infographie”, show email address:true, background:true, description:true}
end tell
end tell

My problem is where it says (set myMessage to first message)

Everytime I run the Rule it refers to the same first message.

That’s the only thing that I have to do before my trials end if I want to buy.

Please help me!
:frowning: :frowning: :frowning: :frowning:

Finally got through this alone so I share if somebody wants to do the same thing.

tell application “Microsoft Outlook”
set myMessage to item 1 of (get current messages)
tell myMessage
set AppleScript’s text item delimiters to " // "
set myAttachment to get name of every attachment as string
set myContent to myAttachment
set content to content of myMessage & return & return & "ATTACHMENTS: " & myAttachment
print myMessage with properties {target printer:“Phaser 4510N (00:00:aa:c2:6c:ca)”, copies:1, pictures:false, message header name:true, message header display name:“infographie”, show email address:true, background:true, description:true}
end tell
end tell

it get’s the list of the attachment of your message, add it to the content of the selected message (separating each attachment with //, then it print your email to the desired printer.

create a rule in Outlook that run this applescript.

:slight_smile: