Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 26th, 2009, 04:26 AM
Registered User
Join Date: Apr 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Openning the OutLook mobile text message window in access


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 :).
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
      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.

Similar Threads
Thread Thread Starter Forum Replies Last Post
save outlook mail message Mohammad VB How-To 2 January 27th, 2011 04:55 AM
Link in Outlook Message forkhead HTML Code Clinic 0 March 6th, 2008 02:56 PM
Javascript in Outlook (2003) message POTSJ Javascript How-To 2 October 10th, 2007 07:38 AM
Reading outlook message files RR General .NET 1 April 21st, 2006 05:42 AM
invoke Outlook New Message Window Monica General .NET 2 September 16th, 2004 04:48 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.