Split recipients script: character set problem

C

coffeegreek

I have downloaded Paul's "split recipients" script for sending mail to
a large list. It does an excellent job, but there is a problem with the
character encoding. If I set a specific setting, i.e. Greek ISO in the
original message, it reverts to "automatic" in the newly created split
messages. This creates a problem, as reported before
(http://tinyurl.com/dzgws). Is there a simple command I can add to the
script to force the new messages to keep the character set I want?
Many thanks
George
 
P

Paul Berkowitz

I have downloaded Paul's "split recipients" script for sending mail to
a large list. It does an excellent job, but there is a problem with the
character encoding. If I set a specific setting, i.e. Greek ISO in the
original message, it reverts to "automatic" in the newly created split
messages. This creates a problem, as reported before
(http://tinyurl.com/dzgws). Is there a simple command I can add to the
script to force the new messages to keep the character set I want?

Yes. Untested so far (I'll test it tomorrow, but you can right now), but it
should just work.

Near the top of the script, in Script Editor, you'll see a section:

set theSubject to the subject of theMsg as Unicode text
set theBody to the content of theMsg as Unicode text
set theAccount to the account of theMsg
set thePriority to the priority of theMsg

In Script Editor, add a line at the bottom of that:

set theCharacterSet to character set of theMsg



Then about half way the way down (, inside the 'repeat while
newRecipientList != {}' block, just before 'end repeat') you'll see this
section:

if theFiles != {} then -- if there is any attachment

make new outgoing message at the outbox folder with properties
{account:theAccount, subject:theSubject, content:theNewBody,
priority:thePriority, attachment:newAttachments,
recipient:groupRecipientList}

else

make new outgoing message at the outbox folder with properties
{account:theAccount, subject:theSubject, content:theNewBody,
priority:thePriority, recipient:groupRecipientList}


end if

To the end of each of those lines, add a

, character set:theCharacterSet


just inside the } bracket, so it now reads like this:



if theFiles != {} then -- if there is any attachment

make new outgoing message at the outbox folder with properties
{account:theAccount, subject:theSubject, content:theNewBody,
priority:thePriority, attachment:newAttachments,
recipient:groupRecipientList, character set:theCharacterSet}

else

make new outgoing message at the outbox folder with properties
{account:theAccount, subject:theSubject, content:theNewBody,
priority:thePriority, recipient:groupRecipientList, character
set:theCharacterSet}

end if



Then again, inside the 'repeat while newBCCRecipients != {}' block, just
before 'end repeat', you'll see the identical lines. Make the same change
there.

Click the Com pile button, then Save.

Now it should do what you want.

--
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.
 
C

coffeegreek

Paul, many thanks for the reply. I have made the modifications but the
messages still revert to
"automatic". I would be grateful if you checked it too. By the way, I
have also found that the script will not work when I send to an address
book Group. A message comes up "you have included an invalid recipient
-name- with no e-mail address and which is not a group either".
Cheers
George
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top