View Single Post
  #1  
Old January 27th 09, 01:28 PM posted to microsoft.public.outlook.program_vba
Paul Smith[_2_]
external usenet poster
 
Posts: 2
Default Outlook 2007 Mobile Service - VBA programming question

I have enabled Outlook 2007 Mobile services to enable sending text messages
direct from Outlook. This works fine.

What I would like to do is using access generate a textmessage in Outlook
using VBA. I already do this from Access/Outlook for creating Emails from our
Database. The code I use is this:
Set olApp = CreateObject("Outlook.Application")
Set olMail = olApp.CreateItem(olMailItem)
olMail.To = email
olmail.Body = "A bunch of text....."
olMail.Display

It all works well. Having enabled the Mobile Services interface in OL2007, I
feel that I shoudl be able to do something like this:
Set olApp = CreateObject("Outlook.Application")
Set olText = olApp.CreateItem(olSMSItem)
olText.To = "070000000" ' Mobile Number
olText.Body = "A bunch of SMS Text....."
olText.Display

I cant get this to work I have tried guessing Hex codes but cant get it to
work. I have tried looking at docmd.sendobject but this requires me to access
and re-enter the userid and password from the Mobile Services funciton, as
each user has a different uid/psw I would rather not (for security if nothing
else) have to maintaina seperate table duplicating the information already
helpd by Outlook.

Can anyone help me out here?

Thank you
Paul
Ads