#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default email help


Hey y'all, I have the below code I'm using to generate an email to
someone whenever we receive negative feedback from our clients. Is
there a way to "mask" the from address to say something else instead of
the person that is sending it, or a way to not make it appear at all?
I'm looking for something kind of like the bcc command but for the
from. Is this possible? Any one have any ideas?

TIA!

Code:
Sub EmailMGR()

Dim iname As Variant
Dim ClaimNumber As Variant
Dim ShopID As Variant
Dim comments As Variant
Dim attach1 As Variant
Dim subj As Variant
Dim StAg As Variant
Dim SoAg As Variant
Dim SoDi As Variant
Dim StDi As Variant
Dim NoAp As Variant

[iname] = ThisWorkbook.Sheets("Raw_Data").Range("A2").Value
[ClaimNumber] = ThisWorkbook.Sheets("Raw_Data").Range("D2").Value
[ShopID] = ThisWorkbook.Sheets("Raw_Data").Range("B2").Value
[comments] = ThisWorkbook.Sheets("Raw_Data").Range("M8").Value
[attach1] = ThisWorkbook.Sheets("Raw_Data").Range("D11").Value
[subj] = "Negative Survey recorded on "
[StAg] = ThisWorkbook.Sheets("Raw_Data").Range("E12").Value
[SoAg] = ThisWorkbook.Sheets("Raw_Data").Range("E13").Value
[SoDi] = ThisWorkbook.Sheets("Raw_Data").Range("E14").Value
[StDi] = ThisWorkbook.Sheets("Raw_Data").Range("E15").Value
[NoAp] = ThisWorkbook.Sheets("Raw_Data").Range("E16").Value

Application.DisplayAlerts = False
Application.ScreenUpdating = False
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
'.To = "test1"
..bcc = "test2"
..Subject = "" & [subj] & "" & [ShopID] & ""
..body = "The below survey has been recorded and flagged for review:" &
Chr(10) & "" & Chr(10) & "Name: " & [iname] & "" & Chr(10) & "Claim: "
& [ClaimNumber] & "" & Chr(10) & "Shop: " & [ShopID] & "" & Chr(10) &
"Comments: " & [comments] & "" & Chr(10) & "" & Chr(10) & "Total
responses received for each answer catagory:" & Chr(10) & "Strongly
Agree: " & [StAg] & "" & Chr(10) & "Somewhat Agree: " & [SoAg] & "" &
Chr(10) & "Somewhat Disagree: " & [SoDi] & "" & Chr(10) & "Strongly
Disagree: " & [StDi] & "" & Chr(10) & "Not Applicable: " & [NoAp] & ""
& Chr(10) & "" & Chr(10) & "A copy of the survey has been attached for
your review." & Chr(10) & "" & Chr(10) & ""
..Attachments.Add "" & [attach1] & ""
..Send
End With

Set OutMail = Nothing
Set OutApp = Nothing
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub


--
dok112
------------------------------------------------------------------------
dok112's Profile: http://www.excelforum.com/member.php...o&userid=10581
View this thread: http://www.excelforum.com/showthread...hreadid=531980

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default email help

Hi dok112

You can use CDO
http://www.rondebruin.nl/cdo.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl


"dok112" wrote in message
...

Hey y'all, I have the below code I'm using to generate an email to
someone whenever we receive negative feedback from our clients. Is
there a way to "mask" the from address to say something else instead of
the person that is sending it, or a way to not make it appear at all?
I'm looking for something kind of like the bcc command but for the
from. Is this possible? Any one have any ideas?

TIA!

Code:
Sub EmailMGR()

Dim iname As Variant
Dim ClaimNumber As Variant
Dim ShopID As Variant
Dim comments As Variant
Dim attach1 As Variant
Dim subj As Variant
Dim StAg As Variant
Dim SoAg As Variant
Dim SoDi As Variant
Dim StDi As Variant
Dim NoAp As Variant

[iname] = ThisWorkbook.Sheets("Raw_Data").Range("A2").Value
[ClaimNumber] = ThisWorkbook.Sheets("Raw_Data").Range("D2").Value
[ShopID] = ThisWorkbook.Sheets("Raw_Data").Range("B2").Value
[comments] = ThisWorkbook.Sheets("Raw_Data").Range("M8").Value
[attach1] = ThisWorkbook.Sheets("Raw_Data").Range("D11").Value
[subj] = "Negative Survey recorded on "
[StAg] = ThisWorkbook.Sheets("Raw_Data").Range("E12").Value
[SoAg] = ThisWorkbook.Sheets("Raw_Data").Range("E13").Value
[SoDi] = ThisWorkbook.Sheets("Raw_Data").Range("E14").Value
[StDi] = ThisWorkbook.Sheets("Raw_Data").Range("E15").Value
[NoAp] = ThisWorkbook.Sheets("Raw_Data").Range("E16").Value

Application.DisplayAlerts = False
Application.ScreenUpdating = False
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
'.To = "test1"
bcc = "test2"
Subject = "" & [subj] & "" & [ShopID] & ""
body = "The below survey has been recorded and flagged for review:" &
Chr(10) & "" & Chr(10) & "Name: " & [iname] & "" & Chr(10) & "Claim: "
& [ClaimNumber] & "" & Chr(10) & "Shop: " & [ShopID] & "" & Chr(10) &
"Comments: " & [comments] & "" & Chr(10) & "" & Chr(10) & "Total
responses received for each answer catagory:" & Chr(10) & "Strongly
Agree: " & [StAg] & "" & Chr(10) & "Somewhat Agree: " & [SoAg] & "" &
Chr(10) & "Somewhat Disagree: " & [SoDi] & "" & Chr(10) & "Strongly
Disagree: " & [StDi] & "" & Chr(10) & "Not Applicable: " & [NoAp] & ""
& Chr(10) & "" & Chr(10) & "A copy of the survey has been attached for
your review." & Chr(10) & "" & Chr(10) & ""
Attachments.Add "" & [attach1] & ""
Send
End With

Set OutMail = Nothing
Set OutApp = Nothing
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub


--
dok112
------------------------------------------------------------------------
dok112's Profile: http://www.excelforum.com/member.php...o&userid=10581
View this thread: http://www.excelforum.com/showthread...hreadid=531980



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Macro how to create email link for the email addresses in aRange or Selection Satish[_2_] Excel Worksheet Functions 8 December 28th 09 03:30 PM
send wkbk as an email attachment with an email address copied from SueInAtl Excel Discussion (Misc queries) 0 May 21st 07 10:53 PM
can I copy a column of email addresses, paste into email address? Lizizfree New Users to Excel 4 July 20th 06 10:03 PM
Transfer Email addresses from spreadsheet to email address book Beana Excel Discussion (Misc queries) 2 May 30th 06 06:07 PM
Email editor closes when forwarding Excel-embedded email Bambina Setting up and Configuration of Excel 0 March 16th 06 10:45 PM


All times are GMT +1. The time now is 11:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"