Send Outlook email via Invoke Code

I have the following code

Dim oApp As Interop.Outlook._Application

oApp = New Interop.Outlook.Application
Dim oMsg As Interop.Outlook._MailItem 
oMsg = oApp.CreateItem(Interop.Outlook.OlItemType.olMailItem)
oMsg.Subject = "Test"
oMsg.Body = "Body"
oMsg.To = ""

I get an error: Interop is not accessible because it is friend. I have imported.
Any ideas on how to fix?

1 Like

@mkkajtez - I hope the below post helps!

1 Like