Skip to content

Commit 02623f1

Browse files
authored
Add duplicate mapping for a FileProperties sample (#2296)
1 parent bced03f commit 02623f1

File tree

60 files changed

+647
-250
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+647
-250
lines changed

docs/code-snippets/office-snippets.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4033,6 +4033,26 @@ Office.File#getSliceAsync:member(1):
40334033
});
40344034
}
40354035
}
4036+
Office.FileProperties:interface:
4037+
- |-
4038+
// To read the URL of the current file, you need to write a callback function that returns the URL.
4039+
// The following example shows how to:
4040+
// 1. Pass an anonymous callback function that returns the value of the file's URL
4041+
// to the callback parameter of the getFilePropertiesAsync method.
4042+
// 2. Display the value on the add-in's page.
4043+
function getFileUrl() {
4044+
// Get the URL of the current file.
4045+
Office.context.document.getFilePropertiesAsync(function (asyncResult) {
4046+
const fileProperties: Office.FileProperties = asyncResult.value;
4047+
const fileUrl = fileProperties.url;
4048+
if (fileUrl == "") {
4049+
showMessage("The file hasn't been saved yet. Save the file and try again");
4050+
}
4051+
else {
4052+
showMessage(fileUrl);
4053+
}
4054+
});
4055+
}
40364056
Office.HostType:enum:
40374057
- |-
40384058
const contextInfo = Office.context.diagnostics;

docs/docs-ref-autogen/office/office/office.addincommands.event.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -338,16 +338,29 @@ methods:
338338
-->**: Compose or Read
339339
340340
341-
**Important**: The `options` parameter only applies to Outlook
342-
add-ins. It was introduced in Mailbox 1.8. Although Outlook on Android and
343-
on iOS support up to Mailbox 1.5, the `options` parameter is supported in
344-
online-meeting provider and note-logging mobile add-ins. For more
345-
information on API support in Outlook on mobile devices, see [Outlook
346-
JavaScript APIs supported in Outlook on mobile
341+
**Important**:
342+
343+
344+
- The `options` parameter only applies to Outlook add-ins. It was
345+
introduced in Mailbox 1.8. Although Outlook on Android and on iOS support
346+
up to Mailbox 1.5, the `options` parameter is supported in online-meeting
347+
provider and note-logging mobile add-ins. For more information on API
348+
support in Outlook on mobile devices, see [Outlook JavaScript APIs
349+
supported in Outlook on mobile
347350
devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis)<!--
348351
-->.
349352
350353
354+
- [Event-based
355+
activation](https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch)
356+
and [integrated
357+
spam-reporting](https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting)
358+
add-ins use a different event object to signal when they've completed
359+
processing an event. For more information, see
360+
[Office.MailboxEvent](https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent)<!--
361+
-->.
362+
363+
351364
#### Examples
352365
353366

docs/docs-ref-autogen/office/office/office.addincommands.eventcompletedoptions.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,26 @@ remarks: >-
2626
-->**: Compose
2727
2828
29-
**Important**: Although Outlook on Android and on iOS support up to
30-
Mailbox 1.5, the `EventCompletedOptions` object is supported in online-meeting
31-
provider and note-logging mobile add-ins. For more information on API support
32-
in Outlook on mobile devices, see [Outlook JavaScript APIs supported in
33-
Outlook on mobile
29+
**Important**:
30+
31+
32+
- Although Outlook on Android and on iOS support up to Mailbox 1.5, the
33+
`EventCompletedOptions` object is supported in online-meeting provider and
34+
note-logging mobile add-ins. For more information on API support in Outlook on
35+
mobile devices, see [Outlook JavaScript APIs supported in Outlook on mobile
3436
devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis)<!--
3537
-->.
3638
39+
40+
- [Event-based
41+
activation](https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch)
42+
and [integrated
43+
spam-reporting](https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting)
44+
add-ins use a different event object to signal when they've completed
45+
processing an event. For more information, see
46+
[Office.MailboxEvent](https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent)<!--
47+
-->.
48+
3749
isPreview: false
3850
isDeprecated: false
3951
type: interface

docs/docs-ref-autogen/office/office/office.fileproperties.yml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,41 @@ uid: office!Office.FileProperties:interface
44
package: office!
55
fullName: Office.FileProperties
66
summary: ''
7-
remarks: ''
7+
remarks: >-
8+
9+
10+
#### Examples
11+
12+
13+
```TypeScript
14+
15+
// To read the URL of the current file, you need to write a callback function
16+
that returns the URL.
17+
18+
// The following example shows how to:
19+
20+
// 1. Pass an anonymous callback function that returns the value of the file's
21+
URL
22+
23+
// to the callback parameter of the getFilePropertiesAsync method.
24+
25+
// 2. Display the value on the add-in's page.
26+
27+
function getFileUrl() {
28+
// Get the URL of the current file.
29+
Office.context.document.getFilePropertiesAsync(function (asyncResult) {
30+
const fileProperties: Office.FileProperties = asyncResult.value;
31+
const fileUrl = fileProperties.url;
32+
if (fileUrl == "") {
33+
showMessage("The file hasn't been saved yet. Save the file and try again");
34+
}
35+
else {
36+
showMessage(fileUrl);
37+
}
38+
});
39+
}
40+
41+
```
842
943
isPreview: false
1044
isDeprecated: false

docs/docs-ref-autogen/office_release/office/office.addincommands.event.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -333,16 +333,29 @@ methods:
333333
-->**: Compose or Read
334334
335335
336-
**Important**: The `options` parameter only applies to Outlook
337-
add-ins. It was introduced in Mailbox 1.8. Although Outlook on Android and
338-
on iOS support up to Mailbox 1.5, the `options` parameter is supported in
339-
online-meeting provider and note-logging mobile add-ins. For more
340-
information on API support in Outlook on mobile devices, see [Outlook
341-
JavaScript APIs supported in Outlook on mobile
336+
**Important**:
337+
338+
339+
- The `options` parameter only applies to Outlook add-ins. It was
340+
introduced in Mailbox 1.8. Although Outlook on Android and on iOS support
341+
up to Mailbox 1.5, the `options` parameter is supported in online-meeting
342+
provider and note-logging mobile add-ins. For more information on API
343+
support in Outlook on mobile devices, see [Outlook JavaScript APIs
344+
supported in Outlook on mobile
342345
devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis)<!--
343346
-->.
344347
345348
349+
- [Event-based
350+
activation](https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch)
351+
and [integrated
352+
spam-reporting](https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting)
353+
add-ins use a different event object to signal when they've completed
354+
processing an event. For more information, see
355+
[Office.MailboxEvent](https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent)<!--
356+
-->.
357+
358+
346359
#### Examples
347360
348361

docs/docs-ref-autogen/office_release/office/office.addincommands.eventcompletedoptions.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,26 @@ remarks: >-
2626
-->**: Compose
2727
2828
29-
**Important**: Although Outlook on Android and on iOS support up to
30-
Mailbox 1.5, the `EventCompletedOptions` object is supported in online-meeting
31-
provider and note-logging mobile add-ins. For more information on API support
32-
in Outlook on mobile devices, see [Outlook JavaScript APIs supported in
33-
Outlook on mobile
29+
**Important**:
30+
31+
32+
- Although Outlook on Android and on iOS support up to Mailbox 1.5, the
33+
`EventCompletedOptions` object is supported in online-meeting provider and
34+
note-logging mobile add-ins. For more information on API support in Outlook on
35+
mobile devices, see [Outlook JavaScript APIs supported in Outlook on mobile
3436
devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis)<!--
3537
-->.
3638
39+
40+
- [Event-based
41+
activation](https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch)
42+
and [integrated
43+
spam-reporting](https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting)
44+
add-ins use a different event object to signal when they've completed
45+
processing an event. For more information, see
46+
[Office.MailboxEvent](https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent)<!--
47+
-->.
48+
3749
isPreview: false
3850
isDeprecated: false
3951
type: interface

docs/docs-ref-autogen/office_release/office/office.fileproperties.yml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,41 @@ uid: office!Office.FileProperties:interface
44
package: office!
55
fullName: Office.FileProperties
66
summary: ''
7-
remarks: ''
7+
remarks: >-
8+
9+
10+
#### Examples
11+
12+
13+
```TypeScript
14+
15+
// To read the URL of the current file, you need to write a callback function
16+
that returns the URL.
17+
18+
// The following example shows how to:
19+
20+
// 1. Pass an anonymous callback function that returns the value of the file's
21+
URL
22+
23+
// to the callback parameter of the getFilePropertiesAsync method.
24+
25+
// 2. Display the value on the add-in's page.
26+
27+
function getFileUrl() {
28+
// Get the URL of the current file.
29+
Office.context.document.getFilePropertiesAsync(function (asyncResult) {
30+
const fileProperties: Office.FileProperties = asyncResult.value;
31+
const fileUrl = fileProperties.url;
32+
if (fileUrl == "") {
33+
showMessage("The file hasn't been saved yet. Save the file and try again");
34+
}
35+
else {
36+
showMessage(fileUrl);
37+
}
38+
});
39+
}
40+
41+
```
842
943
isPreview: false
1044
isDeprecated: false

docs/docs-ref-autogen/outlook/outlook/office.mailboxevent.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,24 @@ remarks: >-
2929
-->**: Compose or Read
3030
3131
32-
**Important**: Support for the integrated spam-reporting feature was
33-
introduced in Mailbox 1.14.
32+
**Important**:
33+
34+
35+
- Support for the integrated spam-reporting feature was introduced in Mailbox
36+
1.14.
37+
38+
39+
- For information about the Event object used by the [function command
40+
button](https://learn.microsoft.com/office/dev/add-ins/design/add-in-commands)<!--
41+
-->, [on-send
42+
add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-on-send-addins)<!--
43+
-->, [online-meeting provider
44+
add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/online-meeting)<!--
45+
-->, and [note-logging mobile
46+
add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-log-appointments)<!--
47+
-->, see
48+
[Office.AddinCommands.Event](https://learn.microsoft.com/javascript/api/office/office.addincommands.event)<!--
49+
-->.
3450
3551
isPreview: false
3652
isDeprecated: false

docs/docs-ref-autogen/outlook_1_10/outlook/office.mailboxevent.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,24 @@ remarks: >-
2929
-->**: Compose or Read
3030
3131
32-
**Important**: Support for the integrated spam-reporting feature was
33-
introduced in Mailbox 1.14.
32+
**Important**:
33+
34+
35+
- Support for the integrated spam-reporting feature was introduced in Mailbox
36+
1.14.
37+
38+
39+
- For information about the Event object used by the [function command
40+
button](https://learn.microsoft.com/office/dev/add-ins/design/add-in-commands)<!--
41+
-->, [on-send
42+
add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-on-send-addins)<!--
43+
-->, [online-meeting provider
44+
add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/online-meeting)<!--
45+
-->, and [note-logging mobile
46+
add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-log-appointments)<!--
47+
-->, see
48+
[Office.AddinCommands.Event](https://learn.microsoft.com/javascript/api/office/office.addincommands.event)<!--
49+
-->.
3450
3551
isPreview: false
3652
isDeprecated: false

docs/docs-ref-autogen/outlook_1_11/outlook/office.mailboxevent.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,24 @@ remarks: >-
2929
-->**: Compose or Read
3030
3131
32-
**Important**: Support for the integrated spam-reporting feature was
33-
introduced in Mailbox 1.14.
32+
**Important**:
33+
34+
35+
- Support for the integrated spam-reporting feature was introduced in Mailbox
36+
1.14.
37+
38+
39+
- For information about the Event object used by the [function command
40+
button](https://learn.microsoft.com/office/dev/add-ins/design/add-in-commands)<!--
41+
-->, [on-send
42+
add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-on-send-addins)<!--
43+
-->, [online-meeting provider
44+
add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/online-meeting)<!--
45+
-->, and [note-logging mobile
46+
add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-log-appointments)<!--
47+
-->, see
48+
[Office.AddinCommands.Event](https://learn.microsoft.com/javascript/api/office/office.addincommands.event)<!--
49+
-->.
3450
3551
isPreview: false
3652
isDeprecated: false

0 commit comments

Comments
 (0)