How to get both a name and email address in a DL

I'm using the following code to create a distribution list.  Once the
list is created, I go to Contacts, click on the DL, and see that the DL
member has the email address for both the name and email addr fields. 
How do I create a DL recipient that has the desired name field
(different from the email address)?

Thanks,
Scott


Code:
--------------------
    
  oDL = oApp.CreateItem(Outlook.OlItemType.olDistributionListItem)
  as Outlook.DistListItem;
  
  tempItem = oApp.CreateItem(Outlook.OlItemType.olMailItem) as Outlook.MailItem;
  oRecipients = tempItem.Recipients;
  oDL.DLName = "Associate Email Distribution List";
  foreach (Outlook.ContactItem oContact in contactList)
  {
  oRecipients.Add(oContact.Email1Address);
  }
  resolveRet = oRecipients.ResolveAll();
  oDL.AddMembers(oRecipients);
  oDL.Save();
--------------------


-- 
scottb2
http://forums.slipstick.com

0
scottb2
3/4/2010 4:45:25 PM
outlook 87535 articles. 11 followers. Follow

0 Replies
813 Views

Similar Articles

[PageSpeed] 57

Reply:

Similar Artilces:

Have Outlook 2000. How do I get rid of spam?
I need step by step directions because I don't know the termenology. When we open Outlook it comes up under my husband's e-mail. Then I Open mine. He is not spamed. I get hundreds each day. HELP! winnieB <winnieB@discussions.microsoft.com> wrote: > I need step by step directions because I don't know the termenology. > When we open Outlook it comes up under my husband's e-mail. Then I > Open mine. He is not spamed. I get hundreds each day. HELP! Step by step: 1) Open Internet Explorer. 2) Browse to http://spambayes.sourceforge.net/ 3) Downoad SpamBaye...

Naming charts on own sheet
Hi. I have a series of charts (which are all contained on their own sheets). I need to name each of the charts (as they will be used by someone else in a macro). I have tried clicking on them and also pressing shift before clicking on them, and I am not able to change the name in the name combo box. Can anyone advise me of how I can change the names. Thanks for your help. Hi, If you have chart sheets you can change the name by simply changing the sheet tab name. What you described is the method used on chartobjects, which are usually on a worksheet. Cheers Andy -- Andy Pope, Mi...

Sending email messages without clicking the Send & Receive bu...
Is there a simple way to tell Outlook to send outgoing messages automatically when you click the "send" button? Sometimes I have to click the "Send and Receive" button after I click "send." On Sun, 13 Mar 2005 19:03:01 -0800, "NewUser" <NewUser@discussions.microsoft.com> wrote: >Is there a simple way to tell Outlook to send outgoing messages automatically >when you click the "send" button? Sometimes I have to click the "Send and >Receive" button after I click "send." Since you don't say what vers...

Hiding sheet tab names
I created an automated workbook where I need to keep the sheet tab name hidden from the user. I went into Tools-Options-View and unchecke Sheet Tabs. Then I protected the workbook and the sheet yet the use can still go into Tools-Options-View and re-check the Sheet Tabs t view them again. How do I lock the user out of viewing the sheet tabs? :confused -- Message posted from http://www.ExcelForum.com You could use the "very hidden" property that prevents users from viewing hidden worksheets without using VBA: Dim ws2 As Worksheet For Each ws2 In ThisWorkbook.Worksheets If w...

how to config Server for one user which has 2 mail address.
we have one NT4.0 + Exchange 5.5 Server "A" Email abc@xxx.com.cn ��and another windows2003 + exchange 2003 Server "B" abc@cn.xxx.com user name is same in A B��Mx record was be set ,question is how to config Exchange 2003 to receive down the mail to Server A , because of we need to replace A with B. thanks a lot. E2K3 setup guides you through common scenarios (like yours) pretty much holding your hand - on welcome screen tell it that you have existing E55 org and want to join it, then follow on-screen instructions. Having usable backup of Exchange databases and AD i...

Getting contents of adjacent cells
I want to divide the y1-axis column and save it to radius (y1/2) column. How do I do that? x-axis y1-axis radius(y1/2) 0 0.00 8.0000 1 0.25 8.0242 2 0.50 8.0691 3 0.75 8.1281 4 1.00 8.1989 5 1.25 8.2803 6 1.50 8.3716 7 1.75 8.4729 8 2.00 8.5832 hi divide the y1-axis by what? 2 as an guess with y1-axis in column c in the y1/2 column(d?), enter =C2/2 copy down. regards FSt1 "Rocky" wrote: > I want to divide the y1-axis column and save it to radius (y1/2) column. How > do I do that? > > x-axis y1-axis radius(y1/2) > 0 ...

Catch all outgoing email on Exchange and send copy to specified account
Hi all. I have been asked to find out if there is anyway to configure our mail server to catch all outgoing email from certain email accounts on our Exchange 2003 Enterprise server and forward a copy of this email to a specified account, also on the Exchange server. If anyone could point me in the right direction I'd be grateful. On 25 Oct 2006 04:10:54 -0700, googlegroups@tlbsolutions.com wrote: >Hi all. > >I have been asked to find out if there is anyway to configure our mail >server to catch all outgoing email from certain email accounts on our >Exchange 2003 Enterpr...

Prioritize Internal Email
Is there a way in Exchange 2003 for me to set delivery of internal email to a higher priority than internet mail? -Patrick What specific issue are you trying to address? -- Bharat Suneja MVP - Exchange www.zenprise.com NEW blog location: www.exchangepedia.com/blog ---------------------------------------------- "Patrick" <Patrick@discussions.microsoft.com> wrote in message news:2FD55EB5-475C-46B6-AB3A-1C697E62DF72@microsoft.com... > Is there a way in Exchange 2003 for me to set delivery of internal email > to a > higher priority than internet mail? > -Patrick ...

Set default address book automatically (registry)
I know I have done this before a few years back in another site - but I cant remember how. We need to set the default lookup address book for all our 2000+ OL2k3 users and to use a specific lookup order. I know they could each do this manually but we have 2000+ users and the support overhead would be huge. We dont want to users to use the GAL as their default lookup (which it is out of the box) because it contains lost of confusing system addresses and duplicate names for the same person in different security level networks; which the users find VERY confusing to distinguish between). We wan...

recieving emails
I get an error message while recieving my emails (send and recieve) and when I hit the button again it starts recieving from the begining again resulting in duplicate messages then it ends in an error like the beginning again. My email is Yahoo mail plus Dorisall wrote: || I get an error message Which is? -- Interim Systems and Management Accounting Gordon Burgess-Parker Director www.gbpcomputing.co.uk Dorisall <Dorisall@discussions.microsoft.com> wrote: > I get an error message while recieving my emails (send and recieve) > and when I hit the button again it starts reci...

Program Trying to Access Email Addresses #3
Outlook 2002. When I try to create new mail, forward, or reply I get a dialog box telling me: A program is trying to access e-mail addresses you have stored in Outlook. Do you want to allow this? If this is unexpected, it may be a virus and you should choose "No". How do I determine what program is trying to access the Outlook addresses? I have up to date Norton Anti-virus definitions and have done a system scan, with nothing detected. Thanks for the help. ...

Can't receive EMail #5
Keep getting this pop up along with 'server did not connect within 60 seconfs, do I want to wait A time-out occurred while communicating with the server. Account: 'Richard', Server: 'pop.east.cox.net', Protocol: POP3, Port: 110, Secure(SSL): No, Error Number: 0x800CCC19 Please reply using lmmurray@cox.net Thanks! Hi RASZ, please read this information from Microsoft http://support.microsoft.com/default.aspx?scid=kb;EN-US;813518 -- Ich habe nichts gemacht, gestern gings noch! Bitte in den Newsgroup antworten damit jeder etwas davon hat. Bravestar@Datenschutzminis...

Getting font properties
I have a LOGFONT - complete with all desired properties including face name. I use CFont::CreateFontIndirect() to create a font. If the font I have specified is not available on my machine then it uses the nearest available in some appropriate sense. So far so good. But CFont::GetLogfont() just returns me the LOGFONT which I used to create the font, and not the one it actually adopted - in particular as regards face name. Is there an easy way to get the face name of the font it actually used? Dave -- David Webber Author MOZART the music processor for Windows - http://www.mozart.co.uk...

email icon
I have an email in my inbox in windows live mail and the envelope icon has a red or purple arrow pointing to the left. What does this mean? -- xgdude It indicates that you replied to that message. A green arrow pointing right indicates that you forwarded the message. Dave N. MS-MVP (Mail) Windows 7 Ultimate 64 http://download.live.com/wlmail "xgdude" wrote in message news:04BCD8E8-B64A-4385-B601-55095BC34F42@microsoft.com... I have an email in my inbox in windows live mail and the envelope icon has a red or purple arrow pointing to the left. What does this...

emails not showing up in deleted items until i do a find?
This just started happening a last week. A message comes in the Inbox and I click the delete key so delete it.. so far ok. then i go into the deleted items folder it's not visible. but if i do a find then they show up in the find box but still not in the folder. any ideas? this program makes me crazy sometimes *s* thanks starindy <anonymous@discussions.microsoft.com> wrote: > This just started happening a last week. A message comes > in the Inbox and I click the delete key so delete it.. so > far ok. then i go into the deleted items folder it's not > visible. b...

some emails not coming through internally
Hello, I have a 3COM NBX phone system. It has the capability of sending an e-mail to a user with the voice message attached. That system is on my 10.1.x.x network. My exchange server is on my 10.3.x.x. network. There's a place in the NBX system to put the name of the SMTP server. I've tried both the email.mydomain.com and the IP address of the server. The messages do not come through. If I change the e-mail address for delivery to an account such as yahoo.com, it comes through no problem. I have a test exchange server at home. If I set it to go to that, goes no where. I ...

Only new email window?
Is there a way that I could have a shortcut on my desktop that does not open the whole application, but rather ONLY open my new email window? I send out a lot of email, and I also have a lot of other apps running. Please let me know if that is possible. Thank you, Steve Steve F. <sf@flintind.com> wrote: > Is there a way that I could have a shortcut on my desktop that does > not open the whole application, but rather ONLY open my new email > window? I send out a lot of email, and I also have a lot of other > apps running. Create a shortcut whose target is: "%Pr...

email
How can I change the time that it takes for message to shift from BOLD (unread) to PLAIN TEXT (as read) in my inbox. If I open MS OUTLOOK it will change within 30 seconds to PLAIN TEXT from BOLD appearing as read, even if I don't want to read them at that time. Therefore, later, I don't know if I read that one or not. I have seen the time limit change on the setup somewhere, but can't find it now! joe@dixiesteamway.com Outlook does not have this option to mark an email as read when viewing in the Preview pane. Only Outlook Express does. "Joe Dobbins" <joe...

Launching URLs from email
URLs in my emails suddenly will no longer launch when clicked. I am using Office/Outlook 2000. Only recent change is the installation of Norton Internet Security, but I think I had ok launches since then. Any help would be appreciated. ...

Send Quote via Email
I have created a quote and would like to send it via email Is this possible without getting too technical! Hi Andrew, (1) In Outlook client using Mail Merge * Open the quote * File-->Format for Customer * Walk through the mail merge steps using "quote.dot" template This template could potentially be modified for more/less data. (2) Download the sample quote report by EdMar from CRM Sandbox The rdl file is at http://codegallery.gotdotnet.com/crm under the Downloads section with title "Quote Sample Report". Download this file and import it to your reports s...

Inbound email being processed as folder under Inbox
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel Email Client: Exchange I got a database daemon error, and Entourage forced me to rebuild the database. <br><br>Once the database was rebuilt, I relaunched Entourage and my new messages were processed as folders with a .EML extension under the Inbox. If you click on them, there is no content in the folder. Entourage has also stopped receiving new mail messages entirely. <br><br>While my database was being rebuilt, I accessed my Exchange account via both Webmail and an Outlook client on Window...

Re: Outlook wont send to emails hypered to from the net
No. I installed the Google Bar recently which does have one, but it isnt in use. I was having this problem beforehand anyway. (Google bar = 1 day old, Problem = since I got the PC). Amb "Diane Poremsky [MVP]" <dianenws@poremsky.com> wrote in message news:OPXxDqeuDHA.2448@TK2MSFTNGP12.phx.gbl... > are you using a popup stopper? > > -- > Diane Poremsky [MVP - Outlook] > Author, Teach Yourself Outlook 2003 in 24 Hours > Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) > > Outlook Tips: http://www.outlook-tips.net/ > > Search for ans...

Transfer address bk and messages
How do I transfer fromm outlook 2003 my info to 2003 on anew computer. Can it really be that hard? Nope. This is your second post. One is enough: http://office.microsoft.com/assistance/preview.aspx?AssetID=HA010771141033&CTT=98 -- Russ Valentine [MVP-Outlook] "diggy" <anonymous@discussions.microsoft.com> wrote in message news:37da01c469f6$b6172d20$3a01280a@phx.gbl... > How do I transfer fromm outlook 2003 my info to 2003 on > anew computer. Can it really be that hard? ...

incoming email not being automatically tracked
Hello, I have the following: Email router used for both incoming and outgoing email in both the web client and Outlook I've configured the router (correctly as far as I know) per the MS documentation. I've selected to track emails from leads and contacts (the last option) please do not confuse this with the middle option to track emails that are responses from leads and contacts. This last option implies it will track incoming original emails, not just replies an important distinction. With this configuration, I would expect an unsolicited email from a contact to be tracke...

Frame window does not get displayed properly
Hi All, I have a Dialog based applciation. I want to create a Frame window when clicked on the button on Dialog. The problem is I handled the Painting of the dialog (I draw a picture on so WM_PAINT message I handle.) but doing this I am not able to draw the frame window properly. It appears to be transparent to me . I am setting the CFrameWnd to be the child of CDialog Please Can you let me know how to draw the farme window of how can I have a floting window on a dialog. Thanks Anup I don't know if what you are doing is a good idea. But if you want to have a floating window ins...