Create 'Edit As New Message' like in Thunderbird on Outlook for Mac

I want to take a message and then resend it but as a new message. Thunderbird had this as a built in feature. Outlook has it as resend but there is a bug that won’t allow you to CC or BCC when you send.

I had this working until recently but now it says this is not a sent message. If I remove the check for Sent message it Errors with "Syntax Error. Microsoft Outlook got an error. Can’t make missing value into type account. The value in account is CAct. This is were I am stuck.

[format]-- Resend Message v1.0 (2010-10-27)
– an applescript by Barry Wainwright
– Restores the ‘Resend’ function that was in Entourage but never made it to Outlook
– when the script is run, with a sent message selected or open, a new copy of the
– message will be created, with all the original recipients and attachements and
– from the correct sending account.
– This script released under a Creative Commons Attribution, NonCommercial, ShareAlike 2.0 England & Wales License.
– see for full details

tell application “Microsoft Outlook”
try
set theMessage to item 1 of (get current messages)
if not («class wSnt» of theMessage) then error -98
on error
display dialog “This script acts only on already sent messages. Please select a sent message and run the script again.” buttons {“Abort”} default button 1
return -99
end try
set theSource to source of theMessage
set theAccount to account of theMessage
set newmessage to make new outgoing message with properties {account:theAccount, source:theSource}
open newmessage
end tell[/format]

Hi. Welcome to MacScripter.

I don’t have Outlook myself, but from your description of the problem and the fact that you see «class wSnt» in your script editor instead of some keyword like sent, it could be that your copy or version of Outlook doesn’t recognise that token for some reason.

Try opening Outlook’s scripting dictionary in Script Editor (Script Editor → File menu → Open Dictionary. → choose Outlook), look up its entry for a ‘message’ class (or perhaps ‘outgoing message’), and see if the listed properties include something like sent which takes a boolean value and indicates the ‘sent’ status of the message. If there is one, write that property name into the script instead of «class wSnt» and see if it then works. If not, I don’t know what else to suggest. I see that the ‘message’ class of Mail (which I don’t use) has no such property, while that of PowerMail has a ‘status’ property, one of whose possible values is ‘sent’.

By the way, these MacScripter fora have [applescript] and [/applescript] tags for posting AppleScript code, which would make your script appear here like this:

-- Resend Message v1.0 (2010-10-27)
-- an applescript by Barry Wainwright 
-- Restores the 'Resend' function that was in Entourage but never made it to Outlook
-- when the script is run, with a sent message selected or open, a new copy of the 
--    message will be created, with all the original recipients and attachements and 
--    from the correct sending account.
-- This script released under a Creative Commons Attribution, NonCommercial, ShareAlike 2.0 England & Wales License.
-- see  for full details

tell application "mail"
	try
		set theMessage to item 1 of (get current messages)
		if not («class wSnt» of theMessage) then error -98
	on error
		display dialog "This script acts only on already sent messages. Please select a sent message and run the script again." buttons {"Abort"} default button 1
		return -99
	end try
	set theSource to source of theMessage
	set theAccount to account of theMessage
	set newmessage to make new outgoing message with properties {account:theAccount, source:theSource}
	open newmessage
end tell

Thanks for that Nigel

It does indeed replace the «class wSnt» with ‘was sent’ which seems to work.
I have removed the line and also the Account line and now my script works.


tell application "Microsoft Outlook"
	
	set theMessage to item 1 of (get current messages)
	set theSource to source of theMessage
	set newmessage to make new outgoing message with properties {source:theSource}
	open newmessage
end tell

I now just need to a script to take an .eml open in outlook and run my previous script.

I need do it to any eml file dropped in the Downloads folder but I am at a loss.