This is the first time I've asked a question on here, so apologies if anything is unclear.
I'm using a .net application to read and send email with Outlook. This is the done with the Outlook object library with the code below:
Private Sub SendEmail(ByVal Message As String, ByVal EmailAddress As String)
Dim objOutlook As Object
Dim objOutlookMsg As Object
objOutlook = CreateObject("Outlook.Application")
objOutlookMsg = objOutlook.CreateItem(0)
With objOutlookMsg
.To = EmailAddress
.Subject = "Subject"
.Body = Message
.Send()
End With
objOutlookMsg = Nothing
objOutlook = Nothing
End Sub
Outlook 2010 supports sending text messages. I've set this up and I can send a text message manually from the Outlook application. My question is how do I adapt the code above to send a text message instead of an email? The Createitem array doesn't have a "text message" object and I couldn't find any examples elsewhere.