Have a look at Roland Smith's Outlook sample. There's a "New" button on the window that should solve your doubts.
https://topwizprogramming.com/freecode_outlook.html
Looking at Roland's example, the way you add the TO address is incorrect: I think you should do something like this:
OLEObject oleMailItem
OLEObject oleRecipient, oleRecipientCC
oleMailItem = oleApplication.CreateItem(olMailItem)
oleMailItem.Subject = "Test Email"
oleMailItem.BodyFormat = olFormatHTML
oleMailItem.HTMLBody = "<HTML><BODY>Please enter the message text here.</BODY></HTML>"
oleRecipient = oleMailItem.Recipients.Add( trim( "someone@nothing.net" ) )
oleRecipient.Type = olTo // = 1
oleRecipient.Resolve
oleRecipientCC = oleMailItem.Recipients.Add( trim( "someone_in_CC@nothing.net" ) )
oleRecipientCC.Type = olCC // = 2
oleRecipientCC.Resolve
//oleMailItem.Display
oleMailItem.Send
// Avoid email being stuck in the Outbox:
// right now, with my outlook365, both sync versions below work for me, just try to see which one does the trick for you:
// Sync that works for us for Outlook 2013 and later:
oleNameSpace.SendAndReceive(true)
//// Sync that works for us for earlier versions of outlook, but should still work for newer versions?
//// Not too sure, because in our code we do this ONLY for earlier versions of Outlook:
//try
// lole_SyncObjects = oleNameSpace.SyncObjects
//
// For li_i = 1 To lole_syncObjects.Count
// lole_sync = lole_syncObjects.Item[li_i]
// lole_sync.Start()
// Next
//
//catch (oleRuntimeError RTErr2)
// Messagebox("Error", "SyncObjects has failed: " + RTErr2.GetMessage(), exclamation!)
//end try
Thanks, that did the trick. I added one more bit, which may not for every organisation (a permission thing), but this is what account to use when sending the email.
ole_item.SentOnBehalfOfName = SupportEmailAddress
Kari