Question : Outlook.Application. Trying to specify 'To' recipient by using the 'From' field.

Sorry for the confusing title.

I am automating emails. I build a string of email addresses that I am sending templates to (not spam =P ). I am sending them via BCC. So I want to make myself the person I am sending the email to.  Is there an attribute in Outlook.Application that uses that?

code snipit below.

Thanks!
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
Dim objOutlook As Outlook.Application
Dim objEmail As Outlook.MailItem
 
'query database to get rs3 result set
 
'correctly builds my recipient string
Do Until rs3.EOF
 strTo = rs3.Fields(7).Value & "; " & strTo
 rs3.MoveNext
Loop
 
With objEmail
    '.To = i want this to be the person who is composing the email
    .subject = subject
    .Body = letterBody
    '.ReadReceiptRequested = True
    .BCC = strTo
    .Send
End With

Answer : Outlook.Application. Trying to specify 'To' recipient by using the 'From' field.

About the best you'll get is using the Resolve action to attempt to make use of a user's login as gemost has mentioned. Here's a full reference if you want to look into the resolve option
http://msdn2.microsoft.com/en-us/library/aa159619(office.11).aspx#odc_ac_olauto_sendanoutlookmessageusingaccess

J
Random Solutions  
 
programming4us programming4us