How do I insert both a To: and a Cc: address with MAPI

I have a VB5 program that sends emails to customers.  I want to automatically 
insert the Recipitients Email address in the To:  and another Email address 
in the Cc: field.  How can I automatically insert both fields?

I can insert either field by using RecipAddress and ReciType but I can't get 
both addresses into my Email.

Help!

Dennis Rose
0
Utf
1/21/2010 10:59:02 PM
vb.general.discussion 1016 articles. 0 followers. Follow

4 Replies
891 Views

Similar Articles

[PageSpeed] 38

Dennis Rose used his keyboard to write :
> I have a VB5 program that sends emails to customers.  I want to automatically 
> insert the Recipitients Email address in the To:  and another Email address 
> in the Cc: field.  How can I automatically insert both fields?
>
> I can insert either field by using RecipAddress and ReciType but I can't get 
> both addresses into my Email.

http://www.lmgtfy.com?q=RecipAddress

-- 
..NET: It's About Trust!
http://vfred.mvps.org


0
Karl
1/21/2010 11:20:42 PM
Karl,
Thanks for the help.  This is the code I used:

'**** insert To: Email addr
MAPIMessages1.RecipAddress = "To address"

'**** insert Cc: Email addr
MAPIMessages1.RecipIndex = 1   ' this is needed to indicate another recipient
MAPIMessages1.RecipType = 2    ' this designates Cc addr
MAPIMessages1.RecipAddress = "Cc address"
'****


"Karl E. Peterson" wrote:

> Dennis Rose used his keyboard to write :
> > I have a VB5 program that sends emails to customers.  I want to automatically 
> > insert the Recipitients Email address in the To:  and another Email address 
> > in the Cc: field.  How can I automatically insert both fields?
> >
> > I can insert either field by using RecipAddress and ReciType but I can't get 
> > both addresses into my Email.
> 
> http://www.lmgtfy.com?q=RecipAddress
> 
> -- 
> ..NET: It's About Trust!
> http://vfred.mvps.org
> 
> 
> .
> 
0
Utf
1/22/2010 5:05:01 PM
Karl,
Good news and bad news.

The code I used worked fine with Outlook Express, but when I used it on a 
computer with Outlook 2002, I got the following error message:

32002 Unspecified failure has occurred (in the MAPIMessages.Send True) 
instruction.

Help Again!



"Karl E. Peterson" wrote:

> Dennis Rose used his keyboard to write :
> > I have a VB5 program that sends emails to customers.  I want to automatically 
> > insert the Recipitients Email address in the To:  and another Email address 
> > in the Cc: field.  How can I automatically insert both fields?
> >
> > I can insert either field by using RecipAddress and ReciType but I can't get 
> > both addresses into my Email.
> 
> http://www.lmgtfy.com?q=RecipAddress
> 
> -- 
> ..NET: It's About Trust!
> http://vfred.mvps.org
> 
> 
> .
> 
0
Utf
1/22/2010 9:00:02 PM
After serious thinking Dennis Rose wrote :
> Karl,
> Good news and bad news.
>
> The code I used worked fine with Outlook Express, but when I used it on a 
> computer with Outlook 2002, I got the following error message:
>
> 32002 Unspecified failure has occurred (in the MAPIMessages.Send True) 
> instruction.
>
> Help Again!

Okay, look, I've never knowingly used MAPI, so the best I can do is 
Google it.  Plonking that error message into Google:

http://www.google.com/search?q=32002+Unspecified+failure+has+occurred

And clicking on the second link (the first appeared to relate to 
timers, not MAPI), I wonder if you could've saved some time here?

-- 
..NET: It's About Trust!
http://vfred.mvps.org


0
Karl
1/22/2010 11:07:18 PM
Reply:

Similar Artilces:

Importing Addresses/Msgs/Newsgroups
Just purchased a new Laptop and would like to import all addresses, and all groups. Please help. Thanks Ernie wrote: > Just purchased a new Laptop and would like to import all addresses, > and all groups. Please help. Thanks Why bother with the Newsgroups? just re-subscribe on your new machine. Ernie <1racebli@maine.rr.com> wrote: > Just purchased a new Laptop and would like to import all addresses, > and all groups. Please help. Thanks See http://www.howto-outlook.com/Howto/backupandrestore.htm -- Brian Tillman ...

how can i export all active email address on particular server
This is a multi-part message in MIME format. ------=_NextPart_000_005C_01C6FCD5.344DB7E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable how can i export all active email address on particular server? ie. username email address abbc1 john.smith@abbco.com I have tried exporting the default address book, but there is no way to = export it. thanks ------=_NextPart_000_005C_01C6FCD5.344DB7E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC &quo...

Change Filter Rules of Default Global Address List
Is there any way to change the Filter Rules of the Default Global Address List in Exchange 2003. The Modify button is greyed out. I want to hide External Contacts from the GAL (by only displaying Exchange mailboxes or mail enabled users), but still have those contacts appear under All Contacts. Any help would be greatly appreciated. Greg Greg: You could do this by editing the Default Global Address List object in ADSEdit. I think (if memory serves me correctly), the attribute that holds the query is the purportedSearch attribute. However, messing with attributes of default ...

changing email addresses
i keep a large database of member information in excel. when changing an email address, the text is changed, but when selecting to prepare an email, the old email addresses appears on the email. how do i eliminate the old address? Insert|Hyperlink and fix it on that dialog. Knowna wrote: > > i keep a large database of member information in excel. when changing an > email address, the text is changed, but when selecting to prepare an email, > the old email addresses appears on the email. how do i eliminate the old > address? -- Dave Peterson ...

Contact List in Address List for multiple user's
I created a Contact List in the Public FOlders. I want the list to appear in everyones Address List. How can I configure the Contact List to appear in everyones Address List without visiting each user's PC like through the Exchange System Manager, AD, GPO, etc? Thanks in advance. Greg In news:8AB85031-AE20-4CC9-B5D4-89556B7C5DC5@microsoft.com, Greg <gregkh@hotmail.com> typed: > I created a Contact List in the Public FOlders. I want the list to > appear in everyones > Address List. > > How can I configure the Contact List to appear in everyones Address > Lis...

Un-Hide Public Folders from Address Lists
I have over 900 Public Folders that I want to uncheck the "Hide from Exchange Address Lists". Does anyone know of a quick way to do this. I have tried using the PFDAVAdmin utility to change the "PR_ATTR_HIDDEN" Property (assuming this is the correct property) but it comes back with a "401 Unauthorized" error. Any ideas! Jim Use Exchange System Manager, select each root folder, right click All Tasks -> Manage Settings -> Next -> Overwrite Settings -> and click the Show In Address Book checkbox. That should enable it for all mail-enabled public...

is a template available for Franklin Covey telephone address list.
I use Monarch paper size ...

Insert Page Break Question
Earlier today, I was given code to insert an automatic page break. I am using Office 2003. The code was: Sub Macropagebreak() For Each CELL In Range("A:A") If CELL = "1" Then CELL.Rows.Select ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell Else End If Next End Sub My question is this. This worked fine on Excel 2003. When I tried to use it on Excel 2000, the code would not work. Is there a different way to do this in earlier versions of Excel? Thanks... -- Don Rountree I am using XL2000 and your code is working for me....

CC Acct Not Detected for SDCCU
I added SDCCU to Money 2005 and all account with the instituion showed up under SDCCU except for my credit card with them. I did set up Passport (reluctantly) just so I could get online updates with this instituition. I have since setup the CC acct manually but now I'm not sure that it is updating online. Can anybody help me? cym ...

Urgent
I am planning to turn on journaling very soon and wanted to test out our 3rd party software by simulating journaling by just enabling my mailbox to send to a forwarding address and deliver mail to both my mailbox and the forwarding mailbox. The forwarding mailbox in this case is what will be our journal mailbox. Everything works fine when an internal user sends me an email. It is delivered to both my mailbox and the journal mailbox. When an external user sends me an email it is only delivered to my mailbox, then the sender receives a deferred delivery message saying to cannot send...

Address space sharing.....reply to non-authoritive server??
Hi I have been following the KB321721 and have completed it and mail does flow in through the new org, and pass it on to the old org which is the authoritive one for the domain. My question is....How do you send mail to or reply to mail from the old org to the new? As it is authoritive....it will NDR straight away saying doesn't exist???? Help would be appreciated!! David I don't believe you can send mail from the old org to the new. You could create a sub-domain and populate the GAL with contacts from the new org of course this won't take care of the reply issue. Can you ...

Inserting Pics in Outlook XP
Hi, How do you insert a picture right in the Outlook XP message rather than as an attachment. When I try to paste a picture in a message, Outlook automatically makes it an attachment. I'm using HTML format and am not using Word within Outlook. Thanks In Advance -- Abb N try insert, picture menu. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Outlook Tips: http://www.outlook-tips.net/ http://www.poremsky.com - http://www.cdolive.com Expert Zone http://www.microsoft.com/windowsxp/expertzone Search for answers: http://groups.google.com Most recent...

lost old e mail addresses when loaded 07 how do i recover them
loaded 07 and lost all addresses and contacts can anybody help Only if you state how you migrated your data to a new installation. Suggest following the procedures posted here daily. Could you be any more cryptic? What does "loaded 07" mean? -- Russ Valentine "nbrophy" <nbrophy@discussions.microsoft.com> wrote in message news:5CF8316E-835A-48A6-80AB-264126DD6C0C@microsoft.com... > loaded 07 and lost all addresses and contacts can anybody help ...

OWA- Characters are inserted into Forward and Reply
Recently, When messages are forwarded or replied to characters get inserted into the original message. Non Blanking Spaces for example: &nbsp; ,&nbsp; I am not sure if this is a result of a security update or not, and if so is it browser or OWA. Then the real question- how do I correct it. ...

How to print "Address Correction Requested" on envelopes?
Using MS Word, how can you print the words "Address Correction Requested" on an envelope? On Fri, 27 Nov 2009 19:27:01 -0800, NC Fred <NC Fred@discussions.microsoft.com> wrote: >Using MS Word, how can you print the words "Address Correction Requested" on >an envelope? The method for putting any kind of extra text on envelopes is described at http://www.gmayor.com/Alternative_Return_Addresses.htm. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgr...

Outlook asks for Disk to continue then doesn't when inserted
When I go online to mail from my work's email I have a problem with replying to messages. The system wants me to insert the disk and won't let me continue. When I insert the disk and click on OK it says I don't need the disk . What do I do with this problem???????? Thanks. Stewart Bruce 780 415 2597 ...

Address Book Errors
We have Exchange 2003 and Outlook 2003 clients running in cached mode. I have two issues that I am desperate for help on. These issues may be related or not - I just don't know. Please help! 1) The Outlook clients are NOT able to download the Offline Address Book. I migrated from Exchange 2000 and this has been an issue since we migrated. On Send and Receive the users see the error message that there was a failure and the Offline Address Book was unable to be synchronized. When I take the unit offline I do not have an Address Book. 2) I recently added and delted some users...

Make Outlook open a reply-to e-mail address
Hi I have a reply-to e-mail address in my inbox and when I click on it my other e-mail program Agent opens How do I configure Outlook to open instead? -- Martin ���� Is Outlook set as your default mail program? Check on the Programs tab of the Control Panel's Internet applet "Martin ���� @nohere.net" wrote in message news:p9gkc457bstk6g6u4f3qqhnt3fdt6mdeee@4ax.com... > > Hi > I have a reply-to e-mail address in my inbox and when I click on it my > other e-mail program Agent opens > How do I configure Outlook to open instead? On Fri, 12 Sep 2008 08:38:43 ...

Finding Outlook Address Book to restore?
I did a full backup of a laptop and then reformatted the hard drive and reinstalled Win98 and my Office 2000 software. I am not sure where to look on the backup files in order to pull the address book and email folders back in. Can anyone give me a guick pointer on where to look? Thanks Look here for all the information you need on backup and restoration of Outlook data: http://www.slipstick.com/config/backup.htm -- Jocelyn Fiorello MVP - Outlook *** Replies sent to my e-mail address will probably not be answered -- please reply only to the newsgroup to preserve the message thread....

Exchange 2007 Global Address List
Dear Sirs, How to update Exchange 2007 Global Address List in EMC? Hugo Hi All I would like to mention something for yours. I am not able to update Global Address List when outlook client in cache mode. Would you please hrlp mne? Hugo "tknl" <tknl@yahoo.com> ���g��l��s�D:%23X0dtj89KHA.5476@TK2MSFTNGP06.phx.gbl... > Dear Sirs, > > How to update Exchange 2007 Global Address List in EMC? > > Hugo > On Thu, 20 May 2010 13:59:38 +0800, "tknl" <tknl@yahoo.com> wrote: >Hi All > > > ...

Outgoing mail to show display name and not email address.
When users send mail, the recipents see the email address and not the display name. Is there a change I can make to show the users display name in the From field rather than the email address? We are using exchange 5.5 and outlook 2000 in corporate/workgroup mode. Regards, Dave On the properties of your IMS, go to the Internet Mail tab, and click the Advanced Options button and you'll see an option to enable or disable the sending of Display Names to the Internet. -- Neil Hobson Exchange MVP For Exchange news, links and tips, check: http://www.msexchangeblog.com "David Uns...

my outlook address book can't find my contacts
I am using XP professional with Outlook 2002 1/ I have loads of email addresses stored in the email address field of my contacts database. I have for example 4 entries for 'Joe' Joe Soap, Joe Smith, Joe Belushi, Joe Cohen. When I click new mail and type the word Joe in the to: field and click send, my address book cannot automatically find my store of email addresses. Is there a setting that I have to change. Any help appreciated. Hi, Please make sure that you have automatic name checking enabled by the following. 1. Open Outlook. 2. Select Tools, then Options. 3....

Redirection email to a specific mailbox from an extrenal address at Exchange server
Hello, I have and exchange 2007 single box setup. I am trying to figure out how to route all mail that arrives from a specific external address to a specific internal address as it touches the exchange server. Need to have all messages sent to a mailbox for review and then routing to the appropriate department. Is there a way to do it from the exchange server. Thank you for any help. Daryl I think what your looking for is a Transport Rule on the Org level under HUB Transport. There you can set conditions for inbound messages. "baron1211" wrote: > He...

Email all addresses returned in a sub-form
I have a form that is linked to a sub form. These are connected via a class name so when they user filters the main form to a specific class the sub form returns only the students in that class. The data returned contains email addresses. I would like to have the ability to send an email to everyone in the specified class so I don't have to type each name in order to update the students on scheduling or locations. I can currently send an email to every student in the data base using the following code in a function: strSQL = "SELECT tblEmailList.Email FROM tblEmailList WHERE...

new email address #2
Hello everyone, I'm trying to find out if there is an automated way to add a new email address to every AD user? Here is my situation. Each user has a primary email address which is there username (jsmith). I would like to add a first.last name email to everyone and make it primary. Besides manually editing every AD account, is there a way to automatically do it? thanks! Sean Email addresses are generated by Recipient Policies. If all the users need a new email address, you can add it to the default Recipient Policy. Modify default Recipient Policy email address (or can add it as ...