Jump to content

Recommended Posts

How do you manually open a new SMS in Outlook 2010?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites

its built into Outlook you just add the details to configure it.  Unless configured it wont show.  You add it like an email account but select SMS during set up.  I have a separate provider for the account side of things but the SMS is built in native to Outlook - it just requires configuring for it to show.

Link to post
Share on other sites

It should be possible to do with Outlook COM.
An example in VBS can be found here: https://code.msdn.microsoft.com/office/Outlook-2010-Create-SMS-86f7b716

Edit:
Unfortunately this only works with Oultook 2010.  With Outlook 2013 and later this feature is no longer available.

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites

Should be something like:

#include <OutlookEX.au3>
Global $olMobileItemSMS = 8
Global $oOL = _OL_Open()
; Create an SMS message and provide a body text value.
Global $oItem = _OL_ItemCreate($oOL, $oOL, $olMobileItemSMS, "*", "", "Subject=Test SMS", "Body=Short Message Service (SMS) message from Outlook 2010.")
If @error Then Exit MsgBox(0, "Error", " Error creating item. @error = " & @error & ", @extended = " & @extended)
; Add a recipient
_OL_ItemRecipientAdd($oOL, $oItem, Default, $olOptional, "Contact of the recipient")
If @error Then Exit MsgBox(0, "Error", " Error adding recipient. @error = " & @error & ", @extended = " & @extended)
; Display the Inspector non-modally. 
$oItem.Display()

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites

Hi Water - this is very kind - thank you.

 

I have had a try with this and done some reading but no joy yet.  I see why you have used 

$olMobileItemSMS = 8

in the hope that integer 8 is the next Outlook OlLitem enumeration however since your UDF does not support SMS is this not the root as to why it wont work for me? As such would you perhaps suggest I review the UDF code and amend it specifically for the: 

app.CreateItem(olMobileItemMMS)

Thus then perhaps allowing for integer 8 to relate to 'olMobileItemMMS' specifically - or am i 'barking up the wrong tree'?

Link to post
Share on other sites

Do you get any error messages from the script I provided?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites

My bad. Theres was a typo in my script. Should be:

#include <OutlookEX.au3>
Global $olMobileItemSMS = 8
Global $oOL = _OL_Open()
; Create an SMS message and provide a body text value.
Global $oItem = _OL_ItemCreate($oOL, $olMobileItemSMS, "*", "", "Subject=Test SMS", "Body=Short Message Service (SMS) message from Outlook 2010.")
If @error Then Exit MsgBox(0, "Error", " Error creating item. @error = " & @error & ", @extended = " & @extended)
; Add a recipient
_OL_ItemRecipientAdd($oOL, $oItem, Default, $olOptional, "Contact of the recipient")
If @error Then Exit MsgBox(0, "Error", " Error adding recipient. @error = " & @error & ", @extended = " & @extended)
; Display the Inspector non-modally. 
$oItem.Display()

But I'm not sure this works. The UDF tries to determine the folder where to store the item based on the item type. But - up to now - the UDF does not know the SMS item type and still might return an error.

If you manually send a SMS where does the item get saved? In the sent items Folder like an email?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites

Another try:

#include <OutlookEX.au3>
Global $olMobileItemSMS = 8
Global $oOL = _OL_Open()
; Create an SMS message and provide a body text value.
Global $oItem = _OL_ItemCreate($oOL, $olMobileItemSMS, "", "", "Subject=Test SMS", "Body=Short Message Service (SMS) message from Outlook 2010.")
If @error Then Exit MsgBox(0, "Error", " Error creating item. @error = " & @error & ", @extended = " & @extended)
; Add a recipient
_OL_ItemRecipientAdd($oOL, $oItem, Default, $olOptional, "Contact of the recipient")
If @error Then Exit MsgBox(0, "Error", " Error adding recipient. @error = " & @error & ", @extended = " & @extended)
; Display the Inspector non-modally. 
$oItem.Display()

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites

The UDF is not able to find a default folder. So we need to specify the folder.

#include <OutlookEX.au3>
Global $olMobileItemSMS = 8
Global $oOL = _OL_Open()
; Create an SMS message and provide a body text value.
Global $oItem = _OL_ItemCreate($oOL, $olMobileItemSMS, "*\Drafts", "", "Subject=Test SMS", "Body=Short Message Service (SMS) message from Outlook 2010.")
If @error Then Exit MsgBox(0, "Error", " Error creating item. @error = " & @error & ", @extended = " & @extended)
; Add a recipient
_OL_ItemRecipientAdd($oOL, $oItem, Default, $olOptional, "Contact of the recipient")
If @error Then Exit MsgBox(0, "Error", " Error adding recipient. @error = " & @error & ", @extended = " & @extended)
; Display the Inspector non-modally. 
$oItem.Display()

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...