A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Using name from address book in lieu of actual email address



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old December 22nd 09, 07:44 AM posted to microsoft.public.outlook.program_vba
OssieMac
external usenet poster
 
Posts: 2
Default Using name from address book in lieu of actual email address

The following is an extract of code that I use to send emails from an Excel
program. How can I modify it to use peoples names as they appear in my
address book in lieu of using their actual email address for .To, .CC and .BCC

strTo = " 'Sample. Not valid email address
strCC = " 'Sample. Not valid email address
strBCC = " 'Sample. Not valid email address
Set objMail = objOutlook.CreateItem(olMailItem)

With objMail
.To = strTo
.CC = strCC
.BCC = strBCC
.Subject = strSubject
.Body = strBody
.DeleteAfterSubmit = True 'Does not save email in Sent mail folder.
.Display
.Send
End With

--
Regards,

OssieMac
 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook 2003 - Extract Actual Email Address from Received Email Michael[_6_] Outlook - General Queries 2 March 3rd 09 04:28 PM
Public Folders - Display Actual Address That Email Was Sent To Art Vandelay Outlook - General Queries 3 October 13th 06 05:49 AM
Outlook should alllow sorting address book by email address. Henry Morgan Outlook - Using Contacts 1 August 1st 06 07:48 PM
Outlook 2002 Uses email address not in Contacts or Address book Pagen Outlook - Using Contacts 1 February 1st 06 06:11 PM
Set which local email account can send mail to contacts in address book. (associating an email address with a contact) Scott Streit Outlook - General Queries 3 January 27th 06 03:57 PM


All times are GMT +1. The time now is 10:20 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.