HI,
I need to send an email and a mobile text message to a mobile phone during a call recieve workflow (while reciving a customer phone order :).
for the email part i use Docmd.ObjectSend
What i have so far for the sms is : i use ObjectSend and change the account manualy to the MAPI account that was set up during the new mobile text message account setup.This does acctualy send the sms and it gets where it needs to go, but on the recieving end one gets only a partial message body badly formatted.
Now, i can open the mobile text window from the file>new>text message, which means that there is an object ready for my use somewhere but i cant seem to find its name or any refference to it.
So, I wrote some code to try and do it procedurally send an email and got it to work now i only need to change mailItem object to the text message one :).
Code:
Option Compare Database
Function SendMessage()
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim DisplayMsg As Boolean
Dim objOutlookAttach As Outlook.Attachment
' Create the Outlook session.
Set objOutlook = CreateObject("Outlook.Application")
' Create the message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
DisplayMsg = True
With objOutlookMsg
' Add the To recipient(s) to the message.
.To = "[email protected]"
' Set the Subject, Body, and Importance of the message.
.Subject = "This is an Automation test with Microsoft Outlook"
.Body = "This is the body of the message." & vbCrLf & vbCrLf
.Importance = olImportanceHigh 'High importance
' Add attachments to the message.
'If Not IsMissing(AttachmentPath) Then
' Set objOutlookAttach = .Attachments.Add(AttachmentPath)
'End If
' Resolve each Recipient's name.
' For Each objOutlookRecip In .Recipients
' objOutlookRecip.Resolve
' Next
' Should we display the message before sending?
If DisplayMsg Then
.Display
Else
.Save
.Send
End If
End With
Set objOutlook = Nothing
Set objOutlookMsg = Nothing
Set objOutlookAcc = Nothing
End Function
So what i need is for sombody to help me find the text message object.
thanks a lot.