Paul
Sat Feb 14 10:38:37 CST 2004
> 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_3159592718_19246754
Content-type: text/plain;
charset="ISO-8859-1"
Content-transfer-encoding: 8bit
On 2/13/04 10:24 PM, in article
5ad91914.0402132224.79277ad8@posting.google.com, "Steve J"
<stevej@webone.com.au> wrote:
> Have just come back to Entourage after 6 months in Mail.app. I
> imported my mail first using the Import Mail script, then used Paul
> Berkowitz's Sync Entourage-AB script to import all the Apple Address
> Book contact info.
>
> I now need to link the email in my different folders to contacts in
> Entourage's Address Book. It may be glaringly obvious but I just
> cannot see how to link them.
Do you mean real Entourage links (as in the preferences "Automatically link
contacts with the messages I receive from them" and "Automatically link
contacts with the messages I send to them") or applying categories (as in
the preference "Automatically match message categories to senders'
categories"), or both?
It could be done by script, per folder, and would be very slow. I don't of
any other way. Dragging the messages or folders out and in doesn't do it.
And any other type of individual links (not to senders) would have to be
done manually by you.
You could run this from Script Editor, but it will be quicker if you save it
as a Script (compiled script) to the Entourage Script Menu Items in the
Microsoft User Data folder i your user's Documents folder and run it from
the script menu.
Select a folder before running it. Repeat for every folder except Drafts and
Deleted Items.
-------------------------
tell application "Microsoft Entourage"
try
set theFolder to displayed feature of main window
if class of theFolder ? folder then error number -128
on error
beep 2
display dialog "You first have to select a folder in tehb main
window." buttons {"Cancel"} default button 1 with icon 0
end try
repeat with theMsg in (every message of theFolder)
try -- if anything is wrong, just skip
if class of theMsg is incoming message then
set eAddress to address of sender of theMsg
-- will error and skip if no contact
set theContact to item 1 of (find eAddress)
link theMsg to theContact
set category of theMsg to (get category of theContact)
else if class of theMsg is outgoing message then
repeat with theRecipient in (every recipient of theMsg)
set eAddress to address of address of theRecipient
-- will error and skip if no contact
set theContact to item 1 of (find eAddress)
link theMsg to theContact
end repeat
end if
end try
end repeat
activate
beep
display dialog "All done!" buttons {"OK"} default button "OK" with icon
1
end tell
------------------------------------------
--
Paul Berkowitz
MVP Entourage
Entourage FAQ Page: <
http://www.entourage.mvps.org/toc.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 Entourage you are using - 2001 or X.
It's often impossible to answer your questions otherwise.
--B_3159592718_19246754
Content-type: text/html;
charset="ISO-8859-1"
Content-transfer-encoding: quoted-printable
<HTML>
<HEAD>
<TITLE>Re: How do I relink freshly imported email to addresses in Address B=
ook?</TITLE>
</HEAD>
<BODY>
<FONT FACE=3D"Verdana, Helvetica, Arial"><SPAN STYLE=3D'font-size:12.0px'>On 2/=
13/04 10:24 PM, in article 5ad91914.0402132224.79277ad8@posting.google.com, =
"Steve J" <stevej@webone.com.au> wrote:<BR>
<BR>
<FONT COLOR=3D"#0000FF">> Have just come back to Entourage after 6 months =
in Mail.app. I<BR>
> imported my mail first using the Import Mail script, then used Paul<BR=
>
> Berkowitz's Sync Entourage-AB script to import all the Apple Address<B=
R>
> Book contact info.<BR>
> <BR>
> I now need to link the email in my different folders to contacts in<BR=
>
> Entourage's Address Book. It may be glaringly obvious but I just<BR>
> cannot see how to link them.<BR>
</FONT><BR>
Do you mean real Entourage links (as in the preferences "Automatically=
link contacts with the messages I receive from them" and "Automat=
ically link contacts with the messages I send to them") or applying cat=
egories (as in the preference "Automatically match message categories t=
o senders' categories"), or both?<BR>
<BR>
It could be done by script, per folder, and would be very slow. I don't of =
any other way. Dragging the messages or folders out and in doesn't do it.<BR=
>
<BR>
And any other type of individual links (not to senders) would have to be do=
ne manually by you.<BR>
<BR>
You could run this from Script Editor, but it will be quicker if you save i=
t as a Script (compiled script) to the Entourage Script Menu Items in the Mi=
crosoft User Data folder i your user's Documents folder and run it from the =
script menu. <BR>
<BR>
Select a folder before running it. Repeat for every folder except Drafts an=
d Deleted Items. <BR>
<BR>
-------------------------<BR>
<BR>
<FONT COLOR=3D"#0000FF"><B>tell</B></FONT> <FONT COLOR=3D"#0000FF">application<=
/FONT> "Microsoft Entourage"<BR>
<FONT COLOR=3D"#0000FF"><B>try<BR>
</B></FONT> <FONT COLOR=3D"#0000FF"=
><B>set</B></FONT> <FONT COLOR=3D"#408000">theFolder</FONT> <FONT COLOR=3D"#0000=
FF"><B>to</B></FONT> <FONT COLOR=3D"#0000FF">displayed feature</FONT> <FONT CO=
LOR=3D"#0000FF"><B>of</B></FONT> <FONT COLOR=3D"#0000FF">main window<BR>
</FONT> <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">theFolder</FONT> ≠ <FONT COLOR=3D"#000=
0FF">folder</FONT> <FONT COLOR=3D"#0000FF"><B>then</B></FONT> <FONT COLOR=3D"#00=
00FF"><B>error</B></FONT> <FONT COLOR=3D"#0000FF">number</FONT> -128<BR>
<FONT COLOR=3D"#0000FF"><B>on</B></FONT> <FONT COLOR=3D=
"#0000FF"><B>error<BR>
</B></FONT> <FONT COLOR=3D"#0000FF"=
>beep</FONT> 2<BR>
<FONT COLOR=3D"#0000FF">displ=
ay dialog</FONT> "You first have to select a folder in tehb main window=
." <FONT COLOR=3D"#0000FF">buttons</FONT> {"Cancel"} <FONT COLO=
R=3D"#0000FF">default button</FONT> 1 <FONT COLOR=3D"#0000FF">with icon</FONT> 0=
<BR>
<FONT COLOR=3D"#0000FF"><B>end</B></FONT> <FONT COLOR=
=3D"#0000FF"><B>try<BR>
</B></FONT> <BR>
<FONT COLOR=3D"#0000FF"><B>repeat</B></FONT> <FONT CO=
LOR=3D"#0000FF"><B>with</B></FONT> <FONT COLOR=3D"#408000">theMsg</FONT> <FONT C=
OLOR=3D"#0000FF"><B>in</B></FONT> (<FONT COLOR=3D"#0000FF"><B>every</B></FONT> <=
FONT COLOR=3D"#0000FF">message</FONT> <FONT COLOR=3D"#0000FF"><B>of</B></FONT> <=
FONT COLOR=3D"#408000">theFolder</FONT>)<BR>
<FONT COLOR=3D"#0000FF"><B>tr=
y</B></FONT> --<FONT COLOR=3D"#4C4D4D"><I> if anything is wrong, just skip<BR>
</I></FONT> &nb=
sp;<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">theMsg</FONT> =
<FONT COLOR=3D"#0000FF"><B>is</B></FONT> <FONT COLOR=3D"#0000FF">incoming messag=
e</FONT> <FONT COLOR=3D"#0000FF"><B>then<BR>
</B></FONT> &nb=
sp; <FONT COLOR=3D"#0000FF"><B>set</B></FONT> <FONT COL=
OR=3D"#408000">eAddress</FONT> <FONT COLOR=3D"#0000FF"><B>to</B></FONT> <FONT CO=
LOR=3D"#0000FF">address</FONT> <FONT COLOR=3D"#0000FF"><B>of</B></FONT> <FONT CO=
LOR=3D"#0000FF">sender</FONT> <FONT COLOR=3D"#0000FF"><B>of</B></FONT> <FONT COL=
OR=3D"#408000">theMsg<BR>
</FONT> &=
nbsp; --<FONT COLOR=3D"#4C4D4D"><I> will error and skip if no=
contact<BR>
</I></FONT> &nb=
sp; <FONT COLOR=3D"#0000FF"><B>set</B></FONT> <FONT COL=
OR=3D"#408000">theContact</FONT> <FONT COLOR=3D"#0000FF"><B>to</B></FONT> <FONT =
COLOR=3D"#0000FF">item</FONT> 1 <FONT COLOR=3D"#0000FF"><B>of</B></FONT> (<FONT =
COLOR=3D"#0000FF">find</FONT> <FONT COLOR=3D"#408000">eAddress</FONT>)<BR>
&nb=
sp; <FONT COLOR=3D"#0000FF">link</FONT> <FONT COLOR=3D"#408000"=
>theMsg</FONT> <FONT COLOR=3D"#0000FF">to</FONT> <FONT COLOR=3D"#408000">theCont=
act<BR>
</FONT> &=
nbsp; <FONT COLOR=3D"#0000FF"><B>set</B></FONT> <FONT COLOR=3D"=
#0000FF">category</FONT> <FONT COLOR=3D"#0000FF"><B>of</B></FONT> <FONT COLOR=3D=
"#408000">theMsg</FONT> <FONT COLOR=3D"#0000FF"><B>to</B></FONT> (<FONT COLOR=3D=
"#0000FF"><B>get</B></FONT> <FONT COLOR=3D"#0000FF">category</FONT> <FONT COLO=
R=3D"#0000FF"><B>of</B></FONT> <FONT COLOR=3D"#408000">theContact</FONT>)<BR>
&nb=
sp; <BR>
<FO=
NT COLOR=3D"#0000FF"><B>else</B></FONT> <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">theMsg</FONT> <FONT COLOR=3D"#0000FF"><B>is</B></FONT> <F=
ONT COLOR=3D"#0000FF">outgoing message</FONT> <FONT COLOR=3D"#0000FF"><B>then<BR=
>
</B></FONT> &nb=
sp; <FONT COLOR=3D"#0000FF"><B>repeat</B></FONT> <FONT =
COLOR=3D"#0000FF"><B>with</B></FONT> <FONT COLOR=3D"#408000">theRecipient</FONT>=
<FONT COLOR=3D"#0000FF"><B>in</B></FONT> (<FONT COLOR=3D"#0000FF"><B>every</B><=
/FONT> <FONT COLOR=3D"#0000FF">recipient</FONT> <FONT COLOR=3D"#0000FF"><B>of</B=
></FONT> <FONT COLOR=3D"#408000">theMsg</FONT>)<BR>
&nb=
sp; <FONT COLOR=3D"#0000FF"><B>set</B=
></FONT> <FONT COLOR=3D"#408000">eAddress</FONT> <FONT COLOR=3D"#0000FF"><B>to</=
B></FONT> <FONT COLOR=3D"#0000FF">address</FONT> <FONT COLOR=3D"#0000FF"><B>of</=
B></FONT> <FONT COLOR=3D"#0000FF">address</FONT> <FONT COLOR=3D"#0000FF"><B>of</=
B></FONT> <FONT COLOR=3D"#408000">theRecipient<BR>
</FONT> &=
nbsp; --<FONT COLOR=3D"#4C4D4D"><I> w=
ill error and skip if no contact<BR>
</I></FONT> &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</FONT> 1 <FONT COLOR=3D"#0000FF">=
<B>of</B></FONT> (<FONT COLOR=3D"#0000FF">find</FONT> <FONT COLOR=3D"#408000">eA=
ddress</FONT>)<BR>
&nb=
sp; <FONT COLOR=3D"#0000FF">link</FON=
T> <FONT COLOR=3D"#408000">theMsg</FONT> <FONT COLOR=3D"#0000FF">to</FONT> <FONT=
COLOR=3D"#408000">theContact<BR>
</FONT> &=
nbsp; <FONT COLOR=3D"#0000FF"><B>end</B></FONT> <FONT COLOR=3D"=
#0000FF"><B>repeat<BR>
</B></FONT> &nb=
sp;<FONT COLOR=3D"#0000FF"><B>end</B></FONT> <FONT COLOR=3D"#0000FF"><B>if<BR>
</B></FONT> <FONT COLOR=3D"#0000FF"=
><B>end</B></FONT> <FONT COLOR=3D"#0000FF"><B>try<BR>
</B></FONT> <FONT COLOR=3D"#0000FF"><B>end</B></FONT> <FONT=
COLOR=3D"#0000FF"><B>repeat<BR>
</B></FONT> <FONT COLOR=3D"#0000FF">activate<BR>
</FONT> <FONT COLOR=3D"#0000FF">beep<BR>
</FONT> <FONT COLOR=3D"#0000FF">display dialog</FONT> "=
;All done!" <FONT COLOR=3D"#0000FF">buttons</FONT> {"OK"} <FONT=
COLOR=3D"#0000FF">default button</FONT> "OK" <FONT COLOR=3D"#0000FF">=
with icon</FONT> 1<BR>
<FONT COLOR=3D"#0000FF"><B>end</B></FONT> <FONT COLOR=3D"#0000FF"><B>tell<BR>
</B></FONT><BR>
------------------------------------------<BR>
<BR>
-- <BR>
Paul Berkowitz<BR>
MVP Entourage<BR>
Entourage FAQ Page: <a href=3D"
http://www.entourage.mvps.org/toc.html"><ht=
tp://www.entourage.mvps.org/toc.html></a><BR>
AppleScripts for Entourage: <a href=3D"
http://macscripter.net/scriptbuilders/=
"><
http://macscripter.net/scriptbuilders/></a> <BR>
<BR>
Please "Reply To Newsgroup" to reply to this message. Emails will=
be ignored.<BR>
<BR>
PLEASE always state which version of Entourage you are using - 2001 or X. I=
t's often impossible to answer your questions otherwise.<BR>
</SPAN></FONT>
</BODY>
</HTML>
--B_3159592718_19246754--