Dial Number from any Outlook Message Part II

Dial Number from any Outlook Message Part II


Last week I began by showing you how to created the XML manifest for an Outlook add-in to gather phones numbers from the message text.  This week well focus on the code in our website our manifest sends the message data to, and how to parse that data.  To begin in our java script file we need to start out with something like this.

// Global variables
var _Item;
var _MyEntities;

// The initialize function is required for all add-ins.
Office.initialize = function () {
var _mailbox = Office.context.mailbox;
// Obtains the current item.
Item = _mailbox.item;
// Reads all instances of supported entities from the subject
// and body of the current item.
MyEntities = _Item.getEntities();

// Checks for the DOM to load using the jQuery ready function.
$
(document).ready(function () {
// After the DOM is loaded, app-specific code can run.
});
}

We will use _MyEntities to store our found phone numbers.  Microsoft has build in the power to find a number of different things, addresses, emails, phone numbers, business names, contact names, and a whole bunch of meeting related stuff.  For this example we are going to focus on phone numbers.  It is important to note at this point, it works well with North American phones, but does not yet support the rest.

function myGetPhoneNumbers()
{
var htmlText = "";

// Gets an array of phone numbers.
// Each phone number is a PhoneNumber object.
var phoneNumbersArray = _MyEntities.phoneNumbers;
for (var i = 0; i < phoneNumbersArray.length; i++)
{
htmlText
+= "Phone Number : ( ";link download

Comments

Popular posts from this blog

Download Samsung Music versi 16 1 63 24 Android M Full Apk

Download Mobile Legends 1 1 22 108 1 APK for Android