send email without sender info

hajiali

Well-known Member
Joined
Sep 8, 2018
Messages
623
Office Version
  1. 2016
Platform
  1. Windows
VBA Code:
Unload Me
End Sub
Private Sub CommandButton3_Click()
Dim EmpID$, Pin$, Rg As Range, Pg As Range, x&
EmpID = TextBox1.Value

If Not IsNumeric(EmpID) Then MsgBox "ENTER VALID EMPLOYEE NUMBER TO HAVE YOUR PIN SENT TO YOUR EMAIL", vbExclamation: Exit Sub

   With Sheets("BID RESULTS")
   Set Rg = .Columns(1).Find(EmpID, lookat:=xlWhole)
   If Rg Is Nothing Then
            MsgBox "EMPLOYEE NUMBER DOES NOT EXIST PLEASE TRY AGAIN", vbExclamation: Exit Sub
            Else

            Set Rg = .Cells(Rg.Row, "D")
            Set Pg = .Cells(Rg.Row, "KW")
        On Error GoTo ErrHandler
    
    Dim objOutlook As Object
    Set objOutlook = CreateObject("Outlook.Application")
    
    Dim objEmail As Object
    Set objEmail = objOutlook.CreateItem(olMailItem)

    With objEmail
        .To = Rg
        .Subject = "BIDDING TOOL BIN"
        .Body = "YOUR PASSWORD FOR THE BIDDING TOOL IS: " & Pg. & "DO NOT REPLY TO THIS EMAIL"
        .Display        '
    End With
    

    Set objEmail = Nothing:    Set objOutlook = Nothing
        
ErrHandler:
End If
End With
End Sub

I want to be able to use the above code to sent the email without sender email info. instead of sender information have "Password Team"
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Hello Logit. Not referring to Signature. Im needing to send the above via email without the senders info ex the person receiving it does not see From: sample@work.com insead of that to have From: "Password department" not an actual email. so that the receiver end does not reply.
 
Upvote 0
VBA Code:
With OutMail
                            .To = ""
                            .From = """your email account user name here"",<your email address here>"
                            .CC = ""
                            .BCC = ""
                            .Subject = "This is the Subject line"
                            .Body = "Test 549"
                            .Display
                            '.Send   'or use .Display
                        End With
 
Upvote 0
Outlook requires a From email address, but it doesn't have to be your primary address. If you want to conceal your address when composing a new email or replying to a message, you have two options.
Changing the default email address on your account hides the address on all messages.
Alternatively, you can change the From address on individual emails so your main address remains the default for other messages.
 
Upvote 0

Forum statistics

Threads
1,213,494
Messages
6,113,981
Members
448,538
Latest member
alex78

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top