send email without sender info

hajiali

Active Member
Joined
Sep 8, 2018
Messages
304
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"
 

Some videos you may like

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

hajiali

Active Member
Joined
Sep 8, 2018
Messages
304
Office Version
  1. 2016
Platform
  1. Windows
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.
 

Logit

Well-known Member
Joined
Aug 31, 2016
Messages
3,722
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
 

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
19,409
Office Version
  1. 2013
Platform
  1. Windows
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,114,664
Messages
5,549,296
Members
410,908
Latest member
Allen P
Top