Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using Macro how to create email link for the email addresses in aRange or Selection | Excel Worksheet Functions | |||
send wkbk as an email attachment with an email address copied from | Excel Discussion (Misc queries) | |||
can I copy a column of email addresses, paste into email address? | New Users to Excel | |||
Transfer Email addresses from spreadsheet to email address book | Excel Discussion (Misc queries) | |||
Email editor closes when forwarding Excel-embedded email | Setting up and Configuration of Excel |