SendMail From specified user

tstevens

New Member
Joined
Sep 1, 2006
Messages
29
Is there a function in "SendMail" that allows me to change the sender? Here is my code that I'm using. This will use the account of whoever is logged on and I want it sent from one default account. I'm not familiar with iMail and would perfer to use SendMail unless it's not possible.
Code:
Dim name As String
    Dim borrower As String
    name = Range("A87")
    borrower = Range("B13")
    ActiveWorkbook.SendMail _
    Recipients:=name, _
    Subject:="Loan Reconciliation for " + borrower
    ActiveWorkbook.Save
    ActiveWorkbook.Close
 

Some videos you may like

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
75,946
Office Version
  1. 365
Platform
  1. Windows
As far as I'm aware SendMail wouldn't allow you to do anything like that.

It's pretty much restricted to specifying Subject and Recipients.

If you want more control over emailing you'll probably need code that's specific to your email client.
 

Watch MrExcel Video

Forum statistics

Threads
1,114,671
Messages
5,549,346
Members
410,910
Latest member
DessertDiva
Top