Is there an applescript I can use from the applescript menu to create a
note from a contact: "Call <contact>, <work phone no.>" and link it to
the conatct??

Thanks
--
Jeremy
jeremyatcommunityhypenrelationsdotcoetc

Re: Create task from Contact by Paul

Paul
Mon Mar 14 09:49:42 CST 2005

> This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--B_3193631383_12497670
Content-type: text/plain;
charset="US-ASCII"
Content-transfer-encoding: 7bit

On 3/14/05 2:40 AM, in article 1gteti0.uez71a1927q7sN%jeremy@yahoo.com,
"Jeremy Fieldsend" <jeremy@yahoo.com> wrote:

> Is there an applescript I can use from the applescript menu to create a
> note from a contact: "Call <contact>, <work phone no.>" and link it to
> the conatct??


Here you go. It's designed for Entourage 2004, and will replicate the
category and project, if any, of the contact to the note. If you're in
Entourage X or 2001, just remove references to theProjects and project list
below.

It lets you select more than one contact at a time of you wish, and will
make notes for all of them. If there's no work phone number, it will use the
home phone number. You could change that to 'mobile phone number' or just
remove that line. If you want to open the note after it's made, remove the
"--" before the last line 'open theNote'.

Finally - you do realize you could make a task, optionally with a reminder,
instead of a note. But you'd have to know in advance how many days in
advance to make the reminder and/or due date.


tell application "Microsoft Entourage"
try
set theSelection to selection
if class of theSelection is not list then error number -128
on error
beep
display dialog "You can only run this script on selected
contact(s)." buttons {"Cancel"} default button 1 with icon 0
return
end try

repeat with i from 1 to (count theSelection)
repeat 1 times
set theContact to item i of theSelection
if class of theContact is not contact then exit repeat -- 1
times
set theName to name of theContact
set thePhone to business phone number of theContact
if thePhone = "" then set thePhone to home phone number of
theContact
set theText to "Call " & theName & ", " & thePhone
set {theCategories, theProjects} to theContact's {category,
project list}
set theNote to make new note with properties {name:theName,
content:theText, category:theCategories, project list:theProjects}
link theNote to theContact
open theNote
end repeat
end repeat
end tell


--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.


--B_3193631383_12497670
Content-type: text/html;
charset="US-ASCII"
Content-transfer-encoding: quoted-printable

<HTML>
<HEAD>
<TITLE>Re: Create task from Contact</TITLE>
</HEAD>
<BODY>
<FONT FACE=3D"Verdana, Helvetica, Arial"><SPAN STYLE=3D'font-size:12.0px'>On 3/=
14/05 2:40 AM, in article 1gteti0.uez71a1927q7sN%jeremy@yahoo.com, &quot;Jer=
emy Fieldsend&quot; &lt;jeremy@yahoo.com&gt; wrote:<BR>
<BR>
<FONT COLOR=3D"#0000FF">&gt; Is there an applescript I can use from the apple=
script menu to create a<BR>
&gt; note from a contact: &quot;Call &lt;contact&gt;, &lt;work phone no.&gt=
;&quot; and link it to<BR>
&gt; the conatct??<BR>
<BR>
<BR>
</FONT>Here you go. It's designed for Entourage 2004, and will replicate th=
e category and project, if any, of the contact to the note. If you're in Ent=
ourage X or 2001, just remove references to theProjects and project list bel=
ow.<BR>
<BR>
It lets you select more than one contact at a time of you wish, and will ma=
ke notes for all of them. If there's no work phone number, it will use the h=
ome phone number. You could change that to 'mobile phone number' or just rem=
ove that line. If you want to open the note after it's made, remove the &quo=
t;--&quot; before the last line 'open theNote'.<BR>
<BR>
Finally - you do realize you could make a task, optionally with a reminder,=
instead of a note. But you'd have to know in advance how many days in advan=
ce to make the reminder and/or due date.<BR>
<BR>
<BR>
<FONT COLOR=3D"#0000FF"><B>tell</B></FONT> <FONT COLOR=3D"#0000FF">application<=
/FONT> &quot;Microsoft Entourage&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>try<BR>
</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"=
><B>set</B></FONT> <FONT COLOR=3D"#408000">theSelection</FONT> <FONT COLOR=3D"#0=
000FF"><B>to</B></FONT> <FONT COLOR=3D"#0000FF">selection<BR>
</FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>=
if</B></FONT> <FONT COLOR=3D"#0000FF">class</FONT> <FONT COLOR=3D"#0000FF"><B>of=
</B></FONT> <FONT COLOR=3D"#408000">theSelection</FONT> <FONT COLOR=3D"#0000FF">=
<B>is</B></FONT> <FONT COLOR=3D"#0000FF"><B>not</B></FONT> <FONT COLOR=3D"#0000F=
F">list</FONT> <FONT COLOR=3D"#0000FF"><B>then</B></FONT> <FONT COLOR=3D"#0000FF=
"><B>error</B></FONT> <FONT COLOR=3D"#0000FF">number</FONT> -128<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>on</B></FONT> <FONT COLOR=3D=
"#0000FF"><B>error<BR>
</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"=
>beep<BR>
</FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF">dis=
play dialog</FONT> &quot;You can only run this script on selected contact(s)=
.&quot; <FONT COLOR=3D"#0000FF">buttons</FONT> {&quot;Cancel&quot;} <FONT COLO=
R=3D"#0000FF">default button</FONT> 1 <FONT COLOR=3D"#0000FF">with icon</FONT> 0=
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>re=
turn<BR>
</B></FONT> &nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>end</B></FONT> <FONT=
COLOR=3D"#0000FF"><B>try<BR>
</B></FONT> &nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>repeat</B></FONT> <FONT CO=
LOR=3D"#0000FF"><B>with</B></FONT> <FONT COLOR=3D"#408000">i</FONT> <FONT COLOR=3D=
"#0000FF"><B>from</B></FONT> 1 <FONT COLOR=3D"#0000FF"><B>to</B></FONT> (<FONT=
COLOR=3D"#0000FF">count</FONT> <FONT COLOR=3D"#408000">theSelection</FONT>)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>re=
peat</B></FONT> 1 <FONT COLOR=3D"#0000FF"><B>times<BR>
</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;<FONT COLOR=3D"#0000FF"><B>set</B></FONT> <FONT COLOR=3D"#408000">theContact<=
/FONT> <FONT COLOR=3D"#0000FF"><B>to</B></FONT> <FONT COLOR=3D"#0000FF">item</FO=
NT> <FONT COLOR=3D"#408000">i</FONT> <FONT COLOR=3D"#0000FF"><B>of</B></FONT> <F=
ONT COLOR=3D"#408000">theSelection<BR>
</FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<=
FONT COLOR=3D"#0000FF"><B>if</B></FONT> <FONT COLOR=3D"#0000FF">class</FONT> <FO=
NT COLOR=3D"#0000FF"><B>of</B></FONT> <FONT COLOR=3D"#408000">theContact</FONT> =
<FONT COLOR=3D"#0000FF"><B>is</B></FONT> <FONT COLOR=3D"#0000FF"><B>not</B></FON=
T> <FONT COLOR=3D"#0000FF">contact</FONT> <FONT COLOR=3D"#0000FF"><B>then</B></F=
ONT> <FONT COLOR=3D"#0000FF"><B>exit</B></FONT> <FONT COLOR=3D"#0000FF"><B>repea=
t</B></FONT> --<FONT COLOR=3D"#4C4E4E"><I> 1 times<BR>
</I></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;<FONT COLOR=3D"#0000FF"><B>set</B></FONT> <FONT COLOR=3D"#408000">theName</FO=
NT> <FONT COLOR=3D"#0000FF"><B>to</B></FONT> <FONT COLOR=3D"#0000FF">name</FONT>=
<FONT COLOR=3D"#0000FF"><B>of</B></FONT> <FONT COLOR=3D"#408000">theContact<BR>
</FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<=
FONT COLOR=3D"#0000FF"><B>set</B></FONT> <FONT COLOR=3D"#408000">thePhone</FONT>=
<FONT COLOR=3D"#0000FF"><B>to</B></FONT> <FONT COLOR=3D"#0000FF">business phone=
number</FONT> <FONT COLOR=3D"#0000FF"><B>of</B></FONT> <FONT COLOR=3D"#408000">=
theContact<BR>
</FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<=
FONT COLOR=3D"#0000FF"><B>if</B></FONT> <FONT COLOR=3D"#408000">thePhone</FONT> =
=3D &quot;&quot; <FONT COLOR=3D"#0000FF"><B>then</B></FONT> <FONT COLOR=3D"#0000FF=
"><B>set</B></FONT> <FONT COLOR=3D"#408000">thePhone</FONT> <FONT COLOR=3D"#0000=
FF"><B>to</B></FONT> <FONT COLOR=3D"#0000FF">home phone number</FONT> <FONT CO=
LOR=3D"#0000FF"><B>of</B></FONT> <FONT COLOR=3D"#408000">theContact<BR>
</FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<=
FONT COLOR=3D"#0000FF"><B>set</B></FONT> <FONT COLOR=3D"#408000">theText</FONT> =
<FONT COLOR=3D"#0000FF"><B>to</B></FONT> &quot;Call &quot; &amp; <FONT COLOR=3D"=
#408000">theName</FONT> &amp; &quot;, &quot; &amp; <FONT COLOR=3D"#408000">the=
Phone<BR>
</FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<=
FONT COLOR=3D"#0000FF"><B>set</B></FONT> {<FONT COLOR=3D"#408000">theCategories<=
/FONT>, <FONT COLOR=3D"#408000">theProjects</FONT>} <FONT COLOR=3D"#0000FF"><B>t=
o</B></FONT> <FONT COLOR=3D"#408000">theContact</FONT>'s {<FONT COLOR=3D"#0000FF=
">category</FONT>, <FONT COLOR=3D"#0000FF">project list</FONT>}<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FO=
NT COLOR=3D"#0000FF"><B>set</B></FONT> <FONT COLOR=3D"#408000">theNote</FONT> <F=
ONT COLOR=3D"#0000FF"><B>to</B></FONT> <FONT COLOR=3D"#0000FF">make</FONT> <FONT=
COLOR=3D"#0000FF">new</FONT> <FONT COLOR=3D"#0000FF">note</FONT> <FONT COLOR=3D"#=
0000FF">with properties</FONT> {<FONT COLOR=3D"#0000FF">name</FONT>:<FONT COLO=
R=3D"#408000">theName</FONT>, <FONT COLOR=3D"#0000FF">content</FONT>:<FONT COLOR=
=3D"#408000">theText</FONT>, <FONT COLOR=3D"#0000FF">category</FONT>:<FONT COLOR=
=3D"#408000">theCategories</FONT>, <FONT COLOR=3D"#0000FF">project list</FONT>:<=
FONT COLOR=3D"#408000">theProjects</FONT>}<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FO=
NT COLOR=3D"#0000FF">link</FONT> <FONT COLOR=3D"#408000">theNote</FONT> <FONT CO=
LOR=3D"#0000FF">to</FONT> <FONT COLOR=3D"#408000">theContact<BR>
</FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<=
FONT COLOR=3D"#0000FF">open</FONT> <FONT COLOR=3D"#408000">theNote<BR>
</FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>=
end</B></FONT> <FONT COLOR=3D"#0000FF"><B>repeat<BR>
</B></FONT> &nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>end</B></FONT> <FONT=
COLOR=3D"#0000FF"><B>repeat<BR>
end</B></FONT> <FONT COLOR=3D"#0000FF"><B>tell<BR>
</B></FONT><BR>
<BR>
-- <BR>
Paul Berkowitz<BR>
MVP MacOffice<BR>
Entourage FAQ Page: <a href=3D"http://www.entourage.mvps.org/faq/index.html">=
&lt;http://www.entourage.mvps.org/faq/index.html&gt;</a><BR>
AppleScripts for Entourage: <a href=3D"http://macscripter.net/scriptbuilders/=
">&lt;http://macscripter.net/scriptbuilders/&gt;</a> <BR>
<BR>
Please &quot;Reply To Newsgroup&quot; to reply to this message. Emails will=
be ignored.<BR>
<BR>
PLEASE always state which version of Microsoft Office you are using - **200=
4**, X &nbsp;or 2001. It's often impossible to answer your questions otherwi=
se.<BR>
</SPAN></FONT>
</BODY>
</HTML>


--B_3193631383_12497670--


Re: Create task from Contact by jeremy

jeremy
Mon Mar 14 12:22:33 CST 2005

Paul Berkowitz <berkowit@spoof_silcom.com> wrote:


> Here you go. It's designed for Entourage 2004, and will replicate the
> category and project, if any, of the contact to the note. If you're in
> Entourage X or 2001, just remove references to theProjects and project list
> below.
>
> It lets you select more than one contact at a time of you wish, and will
> make notes for all of them. If there's no work phone number, it will use the
> home phone number. You could change that to 'mobile phone number' or just
> remove that line. If you want to open the note after it's made, remove the
> "--" before the last line 'open theNote'.
>
> Finally - you do realize you could make a task, optionally with a reminder,
> instead of a note. But you'd have to know in advance how many days in
> advance to make the reminder and/or due date.
>
>
> tell application "Microsoft Entourage"
> try
> set theSelection to selection
> if class of theSelection is not list then error number -128
> on error
> beep
> display dialog "You can only run this script on selected
> contact(s)." buttons {"Cancel"} default button 1 with icon 0
> return
> end try
>
> repeat with i from 1 to (count theSelection)
> repeat 1 times
> set theContact to item i of theSelection
> if class of theContact is not contact then exit repeat -- 1
> times
> set theName to name of theContact
> set thePhone to business phone number of theContact
> if thePhone = "" then set thePhone to home phone number of
> theContact
> set theText to "Call " & theName & ", " & thePhone
> set {theCategories, theProjects} to theContact's {category,
> project list}
> set theNote to make new note with properties {name:theName,
> content:theText, category:theCategories, project list:theProjects}
> link theNote to theContact
> open theNote
> end repeat
> end repeat
> end tell

Many thanks Paul.
--
Jeremy
jeremyatcommunityhypenrelationsdotcoetc

Re: Create task from Contact by jeremy

jeremy
Mon Mar 14 12:23:07 CST 2005

Paul Berkowitz <berkowit@spoof_silcom.com> wrote:

> Finally - you do realize you could make a task, optionally with a reminder,
> instead of a note. But you'd have to know in advance how many days in
> advance to make the reminder and/or due date.

Which is, of course, a much more sensible route altogether. I've tried -
unsuccessfully - to adapt your applescript. I don;t need the optional
reminder, just a task which reads "call <name>, <phone>.

Many thanks
--
Jeremy
jeremyatcommunityhypenrelationsdotcoetc

Re: Create task from Contact by Paul

Paul
Mon Mar 14 14:00:01 CST 2005

> This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--B_3193646402_13382746
Content-type: text/plain;
charset="ISO-8859-1"
Content-transfer-encoding: 8bit

On 3/14/05 10:23 AM, in article 1gtfeva.gv1aw71f3dmy4N%jeremy@yahoo.com,
"Jeremy Fieldsend" <jeremy@yahoo.com> wrote:

> Paul Berkowitz <berkowit@spoof_silcom.com> wrote:
>
>> Finally - you do realize you could make a task, optionally with a reminder,
>> instead of a note. But you'd have to know in advance how many days in
>> advance to make the reminder and/or due date.
>
> Which is, of course, a much more sensible route altogether. I've tried -
> unsuccessfully - to adapt your applescript. I don;t need the optional
> reminder, just a task which reads "call <name>, <phone>.

Really? All you needed to do as change the word 'note' to 'task'. (I'm also
changing the variable to 'theTask' in all places just so it reads better,
but it would have worked anyway as 'theNote') I actually forgot to comment
out the 'open' part last time, so I'm doing it here. If you want it to open,
remove the "--" characters. This version makes a task with no due date and
no reminder.

P.S. I send scripts in HTML for a good reason: otherwise long lines break in
the email and would create errors when compiling. You'd have to know soe
AppleScript to know where to restore long lines by removing carriage
returns. On the other hand, I've discovered that people reading these
messages in the Google (or other) web browser have problems with scripts
containing non-ASCII (non-basic) characters like ? (is not equal), which
come out as commas, for example, at least in HTML, since the browser is
using Windows character format, and also break the script. So I'm trying to
rememver to always use the more verbose English alternatives like 'is not
equal to'. I may need to be reminded occasionally. Anyway, you're all better
off using Entourage or another newsreader, not Google: your messages and the
replies will appear within a min ute or so of being sent, not 12 hours or
so.


tell application "Microsoft Entourage"
try
set theSelection to selection
if class of theSelection is not list then error number -128
on error
beep
display dialog "You can only run this script on selected
contact(s)." buttons {"Cancel"} default button 1 with icon 0
return
end try

repeat with i from 1 to (count theSelection)
repeat 1 times
set theContact to item i of theSelection
if class of theContact is not contact then exit repeat -- 1
times
set theName to name of theContact
set thePhone to business phone number of theContact
if thePhone = "" then set thePhone to home phone number of
theContact
set theText to "Call " & theName & ", " & thePhone
set {theCategories, theProjects} to theContact's {category,
project list}
set theTask to make new task with properties {name:theName,
content:theText, category:theCategories, project list:theProjects}
link theTask to theContact
--open theTask
end repeat
end repeat
end tell


--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.


--B_3193646402_13382746
Content-type: text/html;
charset="ISO-8859-1"
Content-transfer-encoding: quoted-printable

<HTML>
<HEAD>
<TITLE>Re: Create task from Contact</TITLE>
</HEAD>
<BODY>
<FONT FACE=3D"Verdana, Helvetica, Arial"><SPAN STYLE=3D'font-size:12.0px'>On 3/=
14/05 10:23 AM, in article 1gtfeva.gv1aw71f3dmy4N%jeremy@yahoo.com, &quot;Je=
remy Fieldsend&quot; &lt;jeremy@yahoo.com&gt; wrote:<BR>
<BR>
<FONT COLOR=3D"#0000FF">&gt; Paul Berkowitz &lt;berkowit@spoof_silcom.com&gt;=
wrote:<BR>
&gt; &nbsp;<BR>
</FONT><FONT COLOR=3D"#008000">&gt;&gt; Finally - you do realize you could ma=
ke a task, optionally with a reminder,<BR>
&gt;&gt; instead of a note. But you'd have to know in advance how many days=
in<BR>
&gt;&gt; advance to make the reminder and/or due date.<BR>
</FONT><FONT COLOR=3D"#0000FF">&gt; <BR>
&gt; Which is, of course, a much more sensible route altogether. I've tried=
-<BR>
&gt; unsuccessfully - to adapt your applescript. I don;t need the optional<=
BR>
&gt; reminder, just a task which reads &quot;call &lt;name&gt;, &lt;phone&g=
t;.<BR>
</FONT><BR>
Really? All you needed to do as change the word '<FONT COLOR=3D"#0000FF">note=
</FONT>' to '<FONT COLOR=3D"#0000FF">task</FONT>'. (I'm also changing the vari=
able to 'theTask' in all places just so it reads better, but it would have w=
orked anyway as 'theNote') I actually forgot to comment out the 'open' part =
last time, so I'm doing it here. If you want it to open, remove the &quot;--=
&quot; characters. This version makes a task with no due date and no reminde=
r.<BR>
<BR>
P.S. I send scripts in HTML for a good reason: otherwise long lines break i=
n the email and would create errors when compiling. You'd have to know soe A=
ppleScript to know where to restore long lines by removing carriage returns.=
On the other hand, I've discovered that people reading these messages in th=
e Google (or other) web browser have problems with scripts containing non-AS=
CII (non-basic) characters like &#8800; (is not equal), which come out as co=
mmas, for example, at least in HTML, since the browser is using Windows char=
acter format, and also break the script. So I'm trying to rememver to always=
use the more verbose English alternatives like 'is not equal to'. I may nee=
d to be reminded occasionally. Anyway, you're all better off using Entourage=
or another newsreader, not Google: your messages and the replies will appea=
r within a min ute or so of being sent, not 12 hours or so.<BR>
<BR>
<BR>
<FONT COLOR=3D"#0000FF"><B>tell</B></FONT> <FONT COLOR=3D"#0000FF">application<=
/FONT> &quot;Microsoft Entourage&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>try<BR>
</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"=
><B>set</B></FONT> <FONT COLOR=3D"#408000">theSelection</FONT> <FONT COLOR=3D"#0=
000FF"><B>to</B></FONT> <FONT COLOR=3D"#0000FF">selection<BR>
</FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>=
if</B></FONT> <FONT COLOR=3D"#0000FF">class</FONT> <FONT COLOR=3D"#0000FF"><B>of=
</B></FONT> <FONT COLOR=3D"#408000">theSelection</FONT> <FONT COLOR=3D"#0000FF">=
<B>is</B></FONT> <FONT COLOR=3D"#0000FF"><B>not</B></FONT> <FONT COLOR=3D"#0000F=
F">list</FONT> <FONT COLOR=3D"#0000FF"><B>then</B></FONT> <FONT COLOR=3D"#0000FF=
"><B>error</B></FONT> <FONT COLOR=3D"#0000FF">number</FONT> -128<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>on</B></FONT> <FONT COLOR=3D=
"#0000FF"><B>error<BR>
</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"=
>beep<BR>
</FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF">dis=
play dialog</FONT> &quot;You can only run this script on selected contact(s)=
.&quot; <FONT COLOR=3D"#0000FF">buttons</FONT> {&quot;Cancel&quot;} <FONT COLO=
R=3D"#0000FF">default button</FONT> 1 <FONT COLOR=3D"#0000FF">with icon</FONT> 0=
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>re=
turn<BR>
</B></FONT> &nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>end</B></FONT> <FONT=
COLOR=3D"#0000FF"><B>try<BR>
</B></FONT> &nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>repeat</B></FONT> <FONT CO=
LOR=3D"#0000FF"><B>with</B></FONT> <FONT COLOR=3D"#408000">i</FONT> <FONT COLOR=3D=
"#0000FF"><B>from</B></FONT> 1 <FONT COLOR=3D"#0000FF"><B>to</B></FONT> (<FONT=
COLOR=3D"#0000FF">count</FONT> <FONT COLOR=3D"#408000">theSelection</FONT>)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>re=
peat</B></FONT> 1 <FONT COLOR=3D"#0000FF"><B>times<BR>
</B></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;<FONT COLOR=3D"#0000FF"><B>set</B></FONT> <FONT COLOR=3D"#408000">theContact<=
/FONT> <FONT COLOR=3D"#0000FF"><B>to</B></FONT> <FONT COLOR=3D"#0000FF">item</FO=
NT> <FONT COLOR=3D"#408000">i</FONT> <FONT COLOR=3D"#0000FF"><B>of</B></FONT> <F=
ONT COLOR=3D"#408000">theSelection<BR>
</FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<=
FONT COLOR=3D"#0000FF"><B>if</B></FONT> <FONT COLOR=3D"#0000FF">class</FONT> <FO=
NT COLOR=3D"#0000FF"><B>of</B></FONT> <FONT COLOR=3D"#408000">theContact</FONT> =
<FONT COLOR=3D"#0000FF"><B>is</B></FONT> <FONT COLOR=3D"#0000FF"><B>not</B></FON=
T> <FONT COLOR=3D"#0000FF">contact</FONT> <FONT COLOR=3D"#0000FF"><B>then</B></F=
ONT> <FONT COLOR=3D"#0000FF"><B>exit</B></FONT> <FONT COLOR=3D"#0000FF"><B>repea=
t</B></FONT> --<FONT COLOR=3D"#4C4E4E"><I> 1 times<BR>
</I></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;<FONT COLOR=3D"#0000FF"><B>set</B></FONT> <FONT COLOR=3D"#408000">theName</FO=
NT> <FONT COLOR=3D"#0000FF"><B>to</B></FONT> <FONT COLOR=3D"#0000FF">name</FONT>=
<FONT COLOR=3D"#0000FF"><B>of</B></FONT> <FONT COLOR=3D"#408000">theContact<BR>
</FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<=
FONT COLOR=3D"#0000FF"><B>set</B></FONT> <FONT COLOR=3D"#408000">thePhone</FONT>=
<FONT COLOR=3D"#0000FF"><B>to</B></FONT> <FONT COLOR=3D"#0000FF">business phone=
number</FONT> <FONT COLOR=3D"#0000FF"><B>of</B></FONT> <FONT COLOR=3D"#408000">=
theContact<BR>
</FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<=
FONT COLOR=3D"#0000FF"><B>if</B></FONT> <FONT COLOR=3D"#408000">thePhone</FONT> =
=3D &quot;&quot; <FONT COLOR=3D"#0000FF"><B>then</B></FONT> <FONT COLOR=3D"#0000FF=
"><B>set</B></FONT> <FONT COLOR=3D"#408000">thePhone</FONT> <FONT COLOR=3D"#0000=
FF"><B>to</B></FONT> <FONT COLOR=3D"#0000FF">home phone number</FONT> <FONT CO=
LOR=3D"#0000FF"><B>of</B></FONT> <FONT COLOR=3D"#408000">theContact<BR>
</FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<=
FONT COLOR=3D"#0000FF"><B>set</B></FONT> <FONT COLOR=3D"#408000">theText</FONT> =
<FONT COLOR=3D"#0000FF"><B>to</B></FONT> &quot;Call &quot; &amp; <FONT COLOR=3D"=
#408000">theName</FONT> &amp; &quot;, &quot; &amp; <FONT COLOR=3D"#408000">the=
Phone<BR>
</FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<=
FONT COLOR=3D"#0000FF"><B>set</B></FONT> {<FONT COLOR=3D"#408000">theCategories<=
/FONT>, <FONT COLOR=3D"#408000">theProjects</FONT>} <FONT COLOR=3D"#0000FF"><B>t=
o</B></FONT> <FONT COLOR=3D"#408000">theContact</FONT>'s {<FONT COLOR=3D"#0000FF=
">category</FONT>, <FONT COLOR=3D"#0000FF">project list</FONT>}<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FO=
NT COLOR=3D"#0000FF"><B>set</B></FONT> <FONT COLOR=3D"#408000">theTask</FONT> <F=
ONT COLOR=3D"#0000FF"><B>to</B></FONT> <FONT COLOR=3D"#0000FF">make</FONT> <FONT=
COLOR=3D"#0000FF">new</FONT> <FONT COLOR=3D"#0000FF">task</FONT> <FONT COLOR=3D"#=
0000FF">with properties</FONT> {<FONT COLOR=3D"#0000FF">name</FONT>:<FONT COLO=
R=3D"#408000">theName</FONT>, <FONT COLOR=3D"#0000FF">content</FONT>:<FONT COLOR=
=3D"#408000">theText</FONT>, <FONT COLOR=3D"#0000FF">category</FONT>:<FONT COLOR=
=3D"#408000">theCategories</FONT>, <FONT COLOR=3D"#0000FF">project list</FONT>:<=
FONT COLOR=3D"#408000">theProjects</FONT>}<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FO=
NT COLOR=3D"#0000FF">link</FONT> <FONT COLOR=3D"#408000">theTask</FONT> <FONT CO=
LOR=3D"#0000FF">to</FONT> <FONT COLOR=3D"#408000">theContact<BR>
</FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-=
-<FONT COLOR=3D"#4C4E4E"><I>open theTask<BR>
</I></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"=
><B>end</B></FONT> <FONT COLOR=3D"#0000FF"><B>repeat<BR>
</B></FONT> &nbsp;&nbsp;&nbsp;<FONT COLOR=3D"#0000FF"><B>end</B></FONT> <FONT=
COLOR=3D"#0000FF"><B>repeat<BR>
end</B></FONT> <FONT COLOR=3D"#0000FF"><B>tell<BR>
</B></FONT><BR>
<BR>
-- <BR>
Paul Berkowitz<BR>
MVP MacOffice<BR>
Entourage FAQ Page: <a href=3D"http://www.entourage.mvps.org/faq/index.html">=
&lt;http://www.entourage.mvps.org/faq/index.html&gt;</a><BR>
AppleScripts for Entourage: <a href=3D"http://macscripter.net/scriptbuilders/=
">&lt;http://macscripter.net/scriptbuilders/&gt;</a> <BR>
<BR>
Please &quot;Reply To Newsgroup&quot; to reply to this message. Emails will=
be ignored.<BR>
<BR>
PLEASE always state which version of Microsoft Office you are using - **200=
4**, X &nbsp;or 2001. It's often impossible to answer your questions otherwi=
se.<BR>
</SPAN></FONT>
</BODY>
</HTML>


--B_3193646402_13382746--


Re: Create task from Contact by jeremy

jeremy
Tue Mar 15 05:24:46 CST 2005

Paul Berkowitz <berkowit@spoof_silcom.com> wrote:

> Really? All you needed to do as change the word 'note' to 'task'. (I'm also
> changing the variable to 'theTask' in all places just so it reads better,
> but it would have worked anyway as 'theNote') I actually forgot to comment
> out the 'open' part last time, so I'm doing it here. If you want it to open,
> remove the "--" characters. This version makes a task with no due date and
> no reminder.

(last request, honest)

How do I get the title of the task to read Call <name of contact>,
<phone number of contact>?

I've had several goes at amending your script without - needless to say
- much success although I have managed to get the word 'Call" in there.
(Hoo-ra)

Many thanks
--
Jeremy
jeremyatcommunityhypenrelationsdotcoetc

Re: Create task from Contact by Paul

Paul
Tue Mar 15 10:59:02 CST 2005

On 3/15/05 3:24 AM, in article 1gtgq7t.8upgov9489b2N%jeremy@yahoo.com,
"Jeremy Fieldsend" <jeremy@yahoo.com> wrote:

> Paul Berkowitz <berkowit@spoof_silcom.com> wrote:
>
>> Really? All you needed to do as change the word 'note' to 'task'. (I'm also
>> changing the variable to 'theTask' in all places just so it reads better,
>> but it would have worked anyway as 'theNote') I actually forgot to comment
>> out the 'open' part last time, so I'm doing it here. If you want it to open,
>> remove the "--" characters. This version makes a task with no due date and
>> no reminder.
>
> (last request, honest)
>
> How do I get the title of the task to read Call <name of contact>,
> <phone number of contact>?

Since we've already set the variable theText to be:

set theText to "Call " & theName & ", " & thePhone

you can just set the name of the task to that same variable when making the
task:

set theTask to make new task with properties {name:theText,
content:theText, category:theCategories, project list:theProjects}

(Since you insist on replying in plain text even though I told you my
reasons for sending in HTML, you can deal with the interpolated hard
carriage return yourself when the inevitable error occurs if you paste the
whole line. Or don't paste the line but instead just change the name value
and that's all.)

This will contain the comma you wanted originally in the content. If you
don't want the comma in the task title, I leave it as an exercise to figure
out how to remove it...
>
> I've had several goes at amending your script without - needless to say
> - much success although I have managed to get the word 'Call" in there.
> (Hoo-ra)

That's a start...

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.


Re: Create task from Contact by jeremy

jeremy
Tue Mar 15 11:12:55 CST 2005

Paul Berkowitz <berkowit@spoof_silcom.com> wrote:

> > How do I get the title of the task to read Call <name of contact>,
> > <phone number of contact>?
>
> Since we've already set the variable theText to be:
>
> set theText to "Call " & theName & ", " & thePhone
>
> you can just set the name of the task to that same variable when making the
> task:
>
> set theTask to make new task with properties {name:theText,
> content:theText, category:theCategories, project list:theProjects}

Many thanks.
>
> (Since you insist on replying in plain text even though I told you my
> reasons for sending in HTML, you can deal with the interpolated hard
> carriage return yourself when the inevitable error occurs if you paste the
> whole line. Or don't paste the line but instead just change the name value
> and that's all.)

As far as I know, my newsreader (MacSoup) doesn't do html and - in any
event - one of the things I *can* do is take out the hard carriage
returns.
>
> This will contain the comma you wanted originally in the content. If you
> don't want the comma in the task title, I leave it as an exercise to figure
> out how to remove it...
> >
> > I've had several goes at amending your script without - needless to say
> > - much success although I have managed to get the word 'Call" in there.
> > (Hoo-ra)
>
> That's a start...

Indeed.
Thanks
--
Jeremy
jeremyatcommunityhypenrelationsdotcoetc