Inserting sender name and address with vba

Status
Not open for further replies.

Dean Waring

New Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
I am trying to create emails using vba. I get the email created with the To:, Subject:, Body:, and attachments just fine but none of the examples that I've searched and researched seem to show the sender's name, address, phone or anything like that. For instance:

Public Sub sendmeTest()
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim obj As Outlook.MailItem

Set objOutlook = GetObject(, "Outlook.Application")

Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
With objOutlookMsg
Set objOutlookRecip = .Recipients.Add("John.Smith@td.com")

objOutlookRecip.Type = olTo
.Subject = "Monthly Reports"
.Body = "Attached are this month's monthly reports. Let me know if you have any questions."
.CC = "Allison.Jones@td.com"
.Importance = olImportanceNormal
DisplayCurrentUser


' .Send
.Display
End With
Set objOutlookMsg = Nothing
Set objOutlook = Nothing
Set objOutlookRecip = Nothing
Exit Sub
End Sub

This creates the email very nicely, but doesn't have sender details. Any thoughts?
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
W Inserting Additional Email Address Outlook VBA and Custom Forms 4
G Message template / custom forms and VBA Help needed - inserting info into table Outlook VBA and Custom Forms 3
D Using Libraries when inserting a file in Outlook 2013 Using Outlook 1
L Inserting a PPT/PDF into the message body Using Outlook 1
B Outlook 2007 - Slow opening folders when inserting attachments Using Outlook 2
S Inserting Dates With Quick Parts (or Macros) Using Outlook 4
L Block others from inserting appointments in your calendar Using Outlook 3
D Inserting check boxes in task requests Outlook 2007 Using Outlook 2
J Inserting a symbol in the signature Outlook 2010 Using Outlook 2
W Inserting HTML in Outlook 2011:Mac Using Outlook 1
J Outlook 2010 inserting a strange character in new emails Using Outlook 2
B Inserting picture of my business card into my email signature in Outlook Using Outlook 2
M Outlook 2010 deletes my email when inserting signatures Using Outlook 2
O Inserting Picture into Email Signature on Outlook Version 9 Using Outlook 3
K Outlook 2003: inserting web link without the prefix www into a new e-mail Using Outlook 2
V Why does inserting picture with a small file size cause my Task file size to blow up? Using Outlook 3
S Inserting a text file into Outlook's address book Using Outlook 2
K Inserting a hyperlink into an email will crash Outlook. Using Outlook 1
J Inserting signature includes 2 blank lines below signature Using Outlook 1
J Inserting tables in emails using Outlook 2010 (over prior Office 2007) Using Outlook 1
M Shortcut Key Needed Working with Dialog Box while Inserting Hyperlink in a Contact Using Outlook 1
Y Outlook 2007 crashes while inserting network shared path hyperlink into mail body Using Outlook 8
A Inserting a Table in email Using Outlook 2
F Inserting Screen Clipping - Outlook 2010 Using Outlook 4
D Inserting illustrations such as clip art Using Outlook 1
B Outlook: Inserting illustrations (e.g., picture) in an e-mail Using Outlook 2
R inserting picture >>>> not dislaying Using Outlook 1
A Inserting an unsubsribe link a Mail merge (Microsoft word 2003) Using Outlook 1
W inserting activeX/user control into form Outlook VBA and Custom Forms 1
H C# inserting word document with formatting into outlook message Outlook VBA and Custom Forms 1
R Inserting a hyperlink in the bod of an outlook appt. Outlook VBA and Custom Forms 13
K Inserting text from a macro Outlook VBA and Custom Forms 1
Terry Sullivan Sender Field Displays My E-Mail Address, Not My Name Using Outlook 0
J Autoreply email recieved from specific sender after deleting some text from body. Using Outlook 0
D Reply with a template loose the sender's embedded image Outlook VBA and Custom Forms 0
J Outlook 2016 How tell Outlook not to trust sender? Using Outlook 1
M Screen Scrape Sender IP Address Outlook VBA and Custom Forms 6
S Meeting Invite arrives from Wrong ("send-as") Sender Using Outlook 1
icacream Rule based on sender / wrong sender sent to folder Using Outlook 7
D Moving Emails Based on Recipient/Sender Outlook VBA and Custom Forms 4
B Looking to filter (or just find/search) for only messages that the sender has sent more than 1 messa Using Outlook 2
I How to display sender's name instead of email address in outlook 2013 message Using Outlook 5
A Sort emails into subfolders based on sender and deleting emails automatically Outlook VBA and Custom Forms 3
C Display Sender As Contact Outlook VBA and Custom Forms 4
Ed Sheehan Unusual behaviour in setting Sender (Outlook 2016) Outlook VBA and Custom Forms 4
J Auto Forward - Include Attachment and change Subject depending on original sender Outlook VBA and Custom Forms 3
Q Undisclosed recipients does not include sender Using Outlook 1
M Move new mail to folder based on sender address Outlook VBA and Custom Forms 2
M Blocked Sender List @Domain Not Working Using Outlook 0
P MS OUTLOOK 2013 - Adding Sender on the CC line Using Outlook 5
Similar threads


















































Top