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!