Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

outlook automation

Status
Not open for further replies.

Nifrabar

Programmer
Mar 16, 2003
1,343
NL
Hi!

I can make a list of email-adresses and put them programmaticly in outlook 'to' field.
Within outlook you can create group and put that group in the 'to' field. (once you click on it, it expands into all email-adresses).

Is it possible to have same effect while putting a string with mail-adresses programmaticly in 'to' field of outlook using automation?

-Bart
 
That's just an effect of the GUI, not of the TO propertiy of a mail item. It also only expands the group account to the single mail addresses via tooltip text. So in short:no - or we talk about different things here.
Using such a mail "group" account will work, anyway.

Bye, Olaf.
 
Hi Olaf,
Thanks for reply. Yes we do talk about same thing.
So, would it be possible via automation to create a group and use it so getting the desired effect?
-Bart
 
What you're calling a group used to be called a "distribution list." Yes, you can create such things programmatically. They're item type 7 for CreateItem. Use the AddMember or AddMembers methods to populate the list.

Tamar
 
Tamar answered that already. I was thinking you already had szch groups or distribution lists and wanted to find out who's in the list.

There is a big disadvantage I see in such distribution lists, but it's a matter of taste and the case, if it is a disadvantage or rather an advantge: If people answer such a mail, there is no way to only address some people, the answer goes to the whole distribution list. In my experience it was always better to handle such lists in data of an application and adding the recipients one by one, instead of using outlooks distribution list accounts. I would only do so, if that the job definition and such lists are predefined and in use already, manually. But of course that's just oppinion. You's or your customers mileage may vary.

Bye, Olaf.
 
Tamar, Olaf,
It's a bit diferent. This exe is mainly to manage personal details.
Every person can get certain properties.
One of the properties might be: include in emailchain [using sql select].
If the user wants to do a mailing he simply select the persons by filtering on the emailchain-property.
Programmaticly I create from that selection a string , holding all emailadresse of these persons.
That string I put on clipboard and the user can paste it in the 'to' or better 'bcc' outlook-input.
That works fine but I expect it's some more elegant to display it as a group which I should mention 'distribution list'.
As far as I expect now, using a distribution list might be limited by the eemailadresses stored within outlook?
-Bart
 
>a distribution list might be limited by the eemailadresses stored within outlook?
Yes, the Addmember expects the name of a recipient known in the adressbook, eg by it's full name (not the mailaddress), but you can of course also add to that address book. If users won't like automatic added address book entries, that's another reason to rather use BCC/To, but you can also set these programmatically, instead of doing that via clipboard. You simply set a mail items To or BCC properties to that list of mail addresses, instead of setting _cliptext.

Bye, Olaf.
 
Ho Oalf,
Thanks for reply. I will stick with the paste to option. I just got informd that some users don't use oulook but the standaard mail apps supplied with Vista and outlook expres. So, for them, no full automation possible.
-Bart
 
There is a big disadvantage I see in such distribution lists, but it's a matter of taste and the case, if it is a disadvantage or rather an advantge: If people answer such a mail, there is no way to only address some people, the answer goes to the whole distribution list.

When you send email to a distribution list, it's no different than any other email with multiple recipients. Distribution lists are only a shorthand in Outlook; they don't get carried along with the email itself.

FWIW, I use them for things like my extended family, the board of an organization I run, etc. So that I can easily send mail to the whole group.

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top