I am using windows 10 and Excel 2016
I am using windows 10 and Excel 2016
Welcome to the forum!
Sounds like you have an error in code? In the VBE toolbar, select Reset. I normally put Debug menu Compile on toolbar and compile before a run. If not error, Tools > References will show installed library objects.
Please problem is Microsoft outlook is not showing in reference library, I want to add it.
You don't need to add it. You can use late binding to Outlook. e.g. If Outlook is installed and working then the following will work.
Better still use the code from 'http://www.rondebruin.nl/win/s1/outlook/openclose.htm to start Outlook
Code:Option Explicit
Global EMAILTARGET As String
Sub SENDEMAILO()
Dim O As Object
Dim OMAIL As Object
EMAILTARGET = "someone@somewhere.com"
Set O = CreateObject("Outlook.Application")
Set OMAIL = O.createitem(0)
OMAIL.To = EMAILTARGET
OMAIL.Subject = "Reminder Save DT"
OMAIL.Send
MsgBox "email sent"
End Sub
Hi,
I have tried this code and outlook is also installed but it is saying that cant create object
That code should send a simple message. It sounds like Outlook is not properly installed - try repairing Office.