Outlook 2016 from Excel 2016 VBA

Status
Not open for further replies.
I have recently upgraded from Office 2010 to Office 2016.

This code in Excel 2016 VBA yields a partial Outlook 2010 screenshot but nothing else. How do I access Outlook 2016 from Excel 2016 VBA:


Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = someemail
.Subject = "subject1"
.Attachments.Add "C:\Users\Users\Documents\picture1.jpg"
.HTMLBody = "<html><center><head></head><body><h1>Some text</h1></center></body></html>"
.Display
.Send
End With
Set OutMail = Nothing
Set OutApp = Nothing
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
What exactly do you mean by "a partial Outlook 2010 screenshot" ? Any error messages?

The same code (different attachment) works here -
test-.png
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
P How to copy and append data from Outlook 2016 message into Excel 2016 workbook Using Outlook 0
T Outlook Calendar 2016 import Excel Using Outlook 1
R Exporting Excel data to Outlook 2016 Calendar Outlook VBA and Custom Forms 20
B Outlook 2016 Retail C2R keeps logging since update? Using Outlook 0
V Outlook 2016 Does Outlook-2016 (64 bit) work with iCloud for Windows ? Using Outlook 4
R Microsoft Outlook 2016 - Gmail not sending, asks for password for SMTP, tried different ports Using Outlook 23
V Outlook 2016 Outlook-2016 and iCloud for Windows - Problems Using Outlook 2
U Outlook 2016 Outlook 2016 sender name Using Outlook 1
S Outlook (2016 32bit; Gmail IMAP) - Save sent message to Outllook Folder Outlook VBA and Custom Forms 0
A Backup Email Accounts On OutLook For Mac 2016 (Microsoft 365 subscription version) Using Outlook 0
M Office 2016 Outlook is forgetting passwords Using Outlook 15
E Can one still buy Outlook (or Office) 2016? Using Outlook 6
I Error saving screenshots in a custom form in outlook 2016, outlook 365 - ok in outlook 2013, outlook 2010 Outlook VBA and Custom Forms 5
R seperate read layout to design in outlook 2016..Help!! Outlook VBA and Custom Forms 3
GregS Why is Outlook 2016 mail in Outlook.com? Using Outlook 1
G Recurring tasks break links Outlook 2016 Using Outlook 5
A How to get body of all emails in outlook 2016 to view in blue color Using Outlook 1
J Edit auto-complete list in Outlook 2016+/365? Using Outlook 0
D iCloud Add-in not working in Outlook 2013 and Outlook 2016 After Windows Upgrade & iCloud Upgrade Using Outlook 2
GregS Outlook 2016 iPhone won't download Outlook 2016 Mail. Using Outlook 0
E How to display "Change Folder" in Change Default Email Delivery Location in Exchange Outlook 2016 Using Outlook 1
A How to open a specific link automatically with outlook 2016 Outlook VBA and Custom Forms 6
V Outlook 2016 will not move emails in search results Using Outlook 4
K Using Outlook 2016 to draw Using Outlook 1
M Outlook 2016 Free/Busy settings ignored Using Outlook 0
K Outlook 2016 - controlling IMAP OST size with Group Policy not working Using Outlook 1
C Outlook 2016/2019 hangs after being open for an extended period Using Outlook 4
GregS 2016 Contact List being managed by Outlook.com? Using Outlook 1
A Outlook 2016 in Cached Mode Using Outlook 1
G Outlook 2016 sync contacts directly between phone and computer using outlook 2016 Using Outlook 0
N Outlook 2016 Folder Icons Look Using Outlook 0
Marc2019 Outlook 2016 Font Problem Using Outlook 5
B Outlook 2016 Does not Shutdown Correctly Using Outlook 3
GregS Outlook 2016 Outlook 2016 stalls Using Outlook 3
H Outlook 2016 sent over 30 copies of an e-mail with attachments Using Outlook 1
Q Problems with Autodiscover Outlook 2016 Using Outlook 0
D Importing Outlook Categories from another domain (Exchange 2016/Outlook 2016) Using Outlook 4
Q Unable to Sync Quicken reminder with Outlook 2016 64Bit Using Outlook 1
J How to open OST file in Outlook 2019 & 2016 Using Outlook 1
X I have met my waterloo trying to resolve embedded graphics problem with outlook 2007 and now 2016 Using Outlook 1
K Outlook 2016 Using Outlook 0
L What are the risks of opening an Outlook 2016 .pst file in Outlook 2010? Using Outlook 4
David Langer Outlook 2016 (365) How to restore the ability to Re-Map iCloud IMAP Folders Using Outlook 5
W Search Incomplete Outlook 2016 Using Outlook 5
A Outlook 2016 not synching Using Outlook 4
B The Outlook 2016 Profile that isn't always there Using Outlook 2
D Outlook 2016 customization of incoming messages Using Outlook 1
J Command Button to stamp a date and time in a textbox in Outlook 2016 Outlook VBA and Custom Forms 3
J Checkboxes when selected will appear in a textbox in Outlook 2016 Outlook VBA and Custom Forms 1
N Outlook 2016 Address Book lookup Using Outlook 9

Similar threads

Top