Re: Scripting Outlook Express
Re: Scripting Outlook Express
- Subject: Re: Scripting Outlook Express
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 21 Sep 2001 21:32:14 -0700
On 9/21/01 8:52 PM, "Irwin Poche" <email@hidden> wrote:
>
Hi all,
>
>
Does anyone know of a site or other reference that goes into AS'ing Outlook
>
Express ?
>
>
The first thing I'd like to do is is have a script that sets the font and
>
size of selected text in a message
>
Unfortunately you picked the last thing you'll ever be able to do, You can't
script any of the styled text in OE's HTML. It's not scriptable.
If you're talking about a received or saved message, you would have to first
get its content and work with it in a new message, as follows::
For new messages, make sure you've got your default new message prefs
(Composition In the prefs) set to HTML. You can't do that by script either,
although you can check to see if it's set right:
set newMsg to make new draft window with properties {subject:"anything",
to recipients:"joe blow <email@hidden>", content:"something"}
set content of newMsg to "" -- all this will get the cursor into the
message body
if has html of newMsg is false then
beep
display dialog "You need to set the front window to HTML, then run
the script again." with icon 2
return
end if
Then you'd have to to script the fonts and sizes, and any other formatting
(color) of various parts of the message in Tex-Edit Plus (or another good
text editor) or Smile, which can script styled text in the Text Suite. Then
copy the whole finished, formatted text to the clipboard, and finally
tell application "Outlook Express" to set selection to (the clipboard)
This ought to work, although I've never actually tried it.
The only reference, aside from the AppleScript Dictionary, which would have
shown you that there's no styled text, is the AppleScript Reference in the
online help, which is just the Dictionary in a slightly clearer format (plus
a lesson in how to make Keyboard Shortcuts which has an error: use \
backslash, not / as the Guide says.)
You'll have to ask here.
--
Paul Berkowitz