maybe there's already a way to do this, but I couldn't find it. I was trying to do this myself, but got MAJOR help from the forum users at macosxhints.com...please include the credit (not mine, the author's) if you distribute it:
-- Send Nisus Writer Express Document as Mail Attachment
--
-- By BigPixel Software
-- http://bigpixel.macintoshdevelopers.net
-- You don't have t keep this header here, but if you do
-- redistrbute it, I would like some credit for my work.
tell application "Nisus Writer Express"
set theFile to path of document of front window
end tell
tell application "Mail"
set theMessage to make outgoing message
tell theMessage
make new attachment with properties {file name:theFile} at after the last paragraph
end tell
set visible of theMessage to true
end tell
Here's an applescript to attach current Nisus doc to email.
- martin
- Official Nisus Person
- Posts: 5228
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Thanks for posting this script. I tried it and it works just fine.
Not exactly the same, but there is another way to email content from within Express. Select the text you'd like to email and choose the menu Nisus Writer Express > Services > Mail > Send Selection. Just thought I'd mention it as another option.
Not exactly the same, but there is another way to email content from within Express. Select the text you'd like to email and choose the menu Nisus Writer Express > Services > Mail > Send Selection. Just thought I'd mention it as another option.
Thanks to soulbarn for this handy script!
Most of the time, I tend to use the Mail PDF 'PDF service' via the Print dialogue, mainly to avoid sending editable documents, but this is very handy if you do want to send the RTF.
As such, I've made a tiny modification; I've moved the 'activate Mail' instruction, to better ensure that the new email is always the foremost window (I tend to have multiple windows open in Mail, and the previous tweak would bring Mail to the front, after the new message was set as 'visible', and for me that meant it was rarely the front window):
Most of the time, I tend to use the Mail PDF 'PDF service' via the Print dialogue, mainly to avoid sending editable documents, but this is very handy if you do want to send the RTF.
As such, I've made a tiny modification; I've moved the 'activate Mail' instruction, to better ensure that the new email is always the foremost window (I tend to have multiple windows open in Mail, and the previous tweak would bring Mail to the front, after the new message was set as 'visible', and for me that meant it was rarely the front window):
Code: Select all
tell application "Nisus Writer Express"
set theFile to path of document of front window
end tell
tell application "Mail"
set theMessage to make outgoing message
tell theMessage
make new attachment with properties {file name:theFile} at after the last paragraph
end tell
activate
set visible of theMessage to true
end tell