![]() |
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 |
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 |
All times are GMT +1. The time now is 03:47 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com