-
Notifications
You must be signed in to change notification settings - Fork 64
/
office.phonenumber.yml
123 lines (101 loc) · 4.93 KB
/
office.phonenumber.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
### YamlMime:TSType
name: Office.PhoneNumber
uid: 'outlook!Office.PhoneNumber:interface'
package: outlook!
fullName: Office.PhoneNumber
summary: >-
Represents a phone number identified in an item. Read mode only.
An array of `PhoneNumber` objects containing the phone numbers found in an email message is returned in the
`phoneNumbers` property of the `Entities` object that's returned when you call the `getEntities` method on the
selected item.
**Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still
supported. We recommend updating your contextual add-in to use regular expression rules as an alternative solution.
For guidance on how to implement these rules, see [Contextual Outlook
add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins)<!-- -->.
remarks: >-
**[Minimum permission
level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)<!-- -->**:
**read item**
**[Applicable Outlook
mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)<!-- -->**:
Read
#### Examples
```TypeScript
const item = Office.context.mailbox.item;
// Get an array of strings that represent phone numbers in the current item's body.
const phoneNumbers = item.getEntitiesByType(Office.MailboxEnums.EntityType.PhoneNumber);
console.log("There are " + phoneNumbers.length + " phone numbers.")
phoneNumbers.forEach(function (phoneNumber) {
console.log("Phone number: " + JSON.stringify(phoneNumber.phoneString));
console.log("Type: " + JSON.stringify(phoneNumber.type));
console.log("Source text: " + JSON.stringify(phoneNumber.originalPhoneString));
});
```
isPreview: false
isDeprecated: true
customDeprecatedMessage: >-
Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins)
instead.
type: interface
properties:
- name: originalPhoneString
uid: 'outlook!Office.PhoneNumber#originalPhoneString:member'
package: outlook!
fullName: originalPhoneString
summary: >-
Gets the text that was identified in an item as a phone number.
**Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are
still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative
solution. For guidance on how to implement these rules, see [Contextual Outlook
add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins)<!-- -->.
remarks: ''
isPreview: false
isDeprecated: true
customDeprecatedMessage: >-
Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins)
instead.
syntax:
content: 'originalPhoneString: string;'
return:
type: string
- name: phoneString
uid: 'outlook!Office.PhoneNumber#phoneString:member'
package: outlook!
fullName: phoneString
summary: >-
Gets a string containing a phone number. This string contains only the digits of the telephone number and excludes
characters like parentheses and hyphens, if they exist in the original item.
**Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are
still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative
solution. For guidance on how to implement these rules, see [Contextual Outlook
add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins)<!-- -->.
remarks: ''
isPreview: false
isDeprecated: true
customDeprecatedMessage: >-
Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins)
instead.
syntax:
content: 'phoneString: string;'
return:
type: string
- name: type
uid: 'outlook!Office.PhoneNumber#type:member'
package: outlook!
fullName: type
summary: >-
Gets a string that identifies the type of phone number: Home, Work, Mobile, Unspecified.
**Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are
still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative
solution. For guidance on how to implement these rules, see [Contextual Outlook
add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins)<!-- -->.
remarks: ''
isPreview: false
isDeprecated: true
customDeprecatedMessage: >-
Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins)
instead.
syntax:
content: 'type: string;'
return:
type: string