![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
I am working on an Access 2003 database to manage Engineering Change Notices.
A form is filled out and upon completion a folder is created and a .SNP file is placed in the folder. When that is complete I am using a button to run an Outlook event that sends an e-mail to the ECN Coordinator. The ECN Coordinator's e-mail address never changes so it is coded. What I need is the Originator's e-mail address to send them a copy. In my database the Originator's address is entered in the ORIGINATOR_EMAIL field. The section that generates the .SNP file sets the varible strOriginator equal to ORIGINATOR_EMAIL with strOriginator being a Public String varible. My Outlook code is as follows. Dim objOutlook As Outlook.Application Dim objEmail As Outlook.MailItem Dim strCopy As String strCopy = strOriginator Set objOutlook = CreateObject("Outlook.application") Set objEmail = objOutlook.CreateItem(olMailItem) With objEmail .To = "ECN " .CC = strCopy .Subject = "A New ECN has been created" .Body = "A new ECN has been created and is ready to be entered" .Attachments.Add strRetrieve .Send End With I'm not getting any errors, but, the .CC e-mail isn't being sent. |
#2
|
|||
|
|||
![]()
Is that address in the correct format? Does strCopy have the value you want
when you are setting the Cc value? Step the code and see what's happening. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "JIMC5499" wrote in message ... I am working on an Access 2003 database to manage Engineering Change Notices. A form is filled out and upon completion a folder is created and a .SNP file is placed in the folder. When that is complete I am using a button to run an Outlook event that sends an e-mail to the ECN Coordinator. The ECN Coordinator's e-mail address never changes so it is coded. What I need is the Originator's e-mail address to send them a copy. In my database the Originator's address is entered in the ORIGINATOR_EMAIL field. The section that generates the .SNP file sets the varible strOriginator equal to ORIGINATOR_EMAIL with strOriginator being a Public String varible. My Outlook code is as follows. Dim objOutlook As Outlook.Application Dim objEmail As Outlook.MailItem Dim strCopy As String strCopy = strOriginator Set objOutlook = CreateObject("Outlook.application") Set objEmail = objOutlook.CreateItem(olMailItem) With objEmail .To = "ECN " .CC = strCopy .Subject = "A New ECN has been created" .Body = "A new ECN has been created and is ready to be entered" .Attachments.Add strRetrieve .Send End With I'm not getting any errors, but, the .CC e-mail isn't being sent. |
#3
|
|||
|
|||
![]()
I keep getting "" as a value. My ORIGINATOR_EMAIL value comes up ,Out of
context "Ken Slovak - [MVP - Outlook]" wrote: Is that address in the correct format? Does strCopy have the value you want when you are setting the Cc value? Step the code and see what's happening. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "JIMC5499" wrote in message ... I am working on an Access 2003 database to manage Engineering Change Notices. A form is filled out and upon completion a folder is created and a .SNP file is placed in the folder. When that is complete I am using a button to run an Outlook event that sends an e-mail to the ECN Coordinator. The ECN Coordinator's e-mail address never changes so it is coded. What I need is the Originator's e-mail address to send them a copy. In my database the Originator's address is entered in the ORIGINATOR_EMAIL field. The section that generates the .SNP file sets the varible strOriginator equal to ORIGINATOR_EMAIL with strOriginator being a Public String varible. My Outlook code is as follows. Dim objOutlook As Outlook.Application Dim objEmail As Outlook.MailItem Dim strCopy As String strCopy = strOriginator Set objOutlook = CreateObject("Outlook.application") Set objEmail = objOutlook.CreateItem(olMailItem) With objEmail .To = "ECN " .CC = strCopy .Subject = "A New ECN has been created" .Body = "A new ECN has been created and is ready to be entered" .Attachments.Add strRetrieve .Send End With I'm not getting any errors, but, the .CC e-mail isn't being sent. . |
#4
|
|||
|
|||
![]()
Well, only you know the setup of your Access database and tables, so you
need to populate that value so it gets applied to the Cc address of the email. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "JIMC5499" wrote in message ... I keep getting "" as a value. My ORIGINATOR_EMAIL value comes up ,Out of context |
#5
|
|||
|
|||
![]()
That's the problem I'm having. I'm using the ORIGINATOR_EMAIL field in the
record to provide the value for strOriginator, then I'm using strOriginator to provide the value for strCopy. I have ORIGINATOR_EMAIL 's field set to text. Is that correct for an e-mail address? "Ken Slovak - [MVP - Outlook]" wrote: Well, only you know the setup of your Access database and tables, so you need to populate that value so it gets applied to the Cc address of the email. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "JIMC5499" wrote in message ... I keep getting "" as a value. My ORIGINATOR_EMAIL value comes up ,Out of context . |
#6
|
|||
|
|||
![]()
Yes, an email address is a string (text), but you indicated that you were
seeing a null string. Obviously that won't work. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "JIMC5499" wrote in message ... That's the problem I'm having. I'm using the ORIGINATOR_EMAIL field in the record to provide the value for strOriginator, then I'm using strOriginator to provide the value for strCopy. I have ORIGINATOR_EMAIL 's field set to text. Is that correct for an e-mail address? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
unable to obtain list of tables from data source when mail mergin | Pam | Outlook - Using Contacts | 1 | November 9th 08 04:00 AM |
Access Mail Folders and Address book from 2 computers | u6yriyi | Outlook Express | 1 | February 14th 07 01:29 PM |
obtain last selected mail | Steffen Heinzl | Add-ins for Outlook | 2 | November 17th 06 02:20 PM |
a program is trying to access e-mail address - how do I avoid this | marie | Outlook and VBA | 1 | August 4th 06 04:00 AM |
how to access mail from different address | The Gordons | Outlook Express | 1 | May 1st 06 05:52 PM |