Outlook 2011 - copy attachment to new message

Greetings,

I’m midway writing a script that will parse a message for specific text and create a new message with said text. That part works fine. The difficulty I’ve run into is getting the new message to grab any attachments that were in the original message. I’m able to get the new message to add an attachment based on a Finder selection, which I plan on implementing as well, but I need to be able to copy over any existing attachments as well.

FWIW, here is the script that I’m testing with. All this does is set the existing attachment as a variable and create a new message. It does not make an attempt to attach anything to the new message.

Any and all help would be greatly appreciated.


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 att to the attachments of theMsg
	
	
	set newMessage to make new outgoing message with properties {subject:"attachment"}
	open newMessage
	--get newMessage
	
		
end tell


underneath set newMessage to make new.

	tell newMessage to set the attachements to att

I have not tested this out, however, so YMMV

Thanks for the response, but that does not seem to do anything.

Back from vacation…

The closest I’ve seen is using the Outlook item to OmniFocus route, where it temporarily saves the attachment to the desktop, adds it to OmniFocus item (Outlook message, in my case) and then deletes the temporary file.

Is there really no way to do this??