Outlook 2007 Mobile Service - VBA programming question

P

Paul Smith

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
 
P

Paul Smith

I thought I would update this with what I have foudn so far. It seems that
the OMS API is not fully controllable from VBA. I dont know why this would be
the case but demonstrably this is the situation.

Once you enable OMS for sending Text messaging you get a nice new 'Text
Message form' that emulates a phone text screen so you can judge what is
going out. plus a couple of other bits and pieces. However you can only
access this is from the "New Drop Down" in the Main Outlook task.

Programatically when you examine a Text Message received it can be seen that
this now has the MessageClass = "IPM.Note.Mobile.SMS", [Ordinary emails have
the MessageClass = "IPM.Note"

Unfortunately the 'Text/SMS/MMS Messaging API' does not get triggered if you
try to change the message class by setting it in VBA. What you get is a
normal email form. This suffers from the problem that even if you change the
sending Account DD to utilise your newly installed OMS facility it seems not
to pick up the correct Security information and so gets bounced by the
Outlook Mobile Service provider.

Ok its not the end of the world, but I have created my Access CTM
application with lots of wizzy features, using buttons that will generate
emails picking up contact information from the SQL Database and filling lots
of detail for you, this also allows me to dynamically customise the
Autosignature in an email and so on. So it would have been nice if I could do
the same for SMS Text Messaging.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top