Skip to content

Commit a658d84

Browse files
Revert previous change to Office JS URL (#4966)
1 parent 0f70353 commit a658d84

13 files changed

+34
-34
lines changed

docs/develop/create-addin-commands-unified-manifest.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Create add-in commands with the unified manifest for Microsoft 365
33
description: Configure the unified manifest for Microsoft 365 to define add-in commands for Excel, Outlook, PowerPoint, and Word. Use add-in commands to create UI elements, add buttons or lists, and perform actions.
4-
ms.date: 07/18/2024
4+
ms.date: 01/07/2025
55
ms.localizationpriority: medium
66
---
77

@@ -248,7 +248,7 @@ The following subsections explain how to include a [function command](../design/
248248
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
249249

250250
<!-- Office JavaScript Library -->
251-
<script type="text/javascript" src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js"></script>
251+
<script type="text/javascript" src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js"></script>
252252
<!-- Function command file -->
253253
<script src="commands.js" type="text/javascript"></script>
254254
</head>

docs/develop/get-the-whole-document-from-an-add-in-for-powerpoint-or-word.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Get the whole document from an add-in for PowerPoint or Word
33
description: Learn to get the whole document from a PowerPoint or Word add-in.
4-
ms.date: 10/03/2024
4+
ms.date: 01/07/2025
55
ms.topic: how-to
66
ms.localizationpriority: medium
77
---
@@ -88,7 +88,7 @@ Use the following procedure to create a simple user interface for the add-in tha
8888
<title>Publish presentation</title>
8989
<link rel="stylesheet" type="text/css" href="Program.css" />
9090
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.min.js" type="text/javascript"></script>
91-
<script src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js" type="text/javascript"></script>
91+
<script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js" type="text/javascript"></script>
9292
<script src="GetDoc_App.js"></script>
9393
</head>
9494
<body>
@@ -116,7 +116,7 @@ Use the following procedure to create a simple user interface for the add-in tha
116116
<title>Publish document</title>
117117
<link rel="stylesheet" type="text/css" href="Program.css" />
118118
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.min.js" type="text/javascript"></script>
119-
<script src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js" type="text/javascript"></script>
119+
<script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js" type="text/javascript"></script>
120120
<script src="GetDoc_App.js"></script>
121121
</head>
122122
<body>

docs/develop/referencing-the-javascript-api-for-office-library-from-its-cdn.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Referencing the Office JavaScript API library
33
description: Learn how to reference the Office JavaScript API library and type definitions in your add-in.
4-
ms.date: 10/03/2024
4+
ms.date: 01/07/2025
55
ms.localizationpriority: medium
66
---
77

@@ -12,7 +12,7 @@ The [Office JavaScript API](../reference/javascript-api-for-office.md) library p
1212
```html
1313
<head>
1414
...
15-
<script src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js" type="text/javascript"></script>
15+
<script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js" type="text/javascript"></script>
1616
</head>
1717
```
1818

@@ -23,7 +23,7 @@ This will download and cache the Office JavaScript API files the first time your
2323
2424
## API versioning and backward compatibility
2525

26-
In the previous HTML snippet, the `/1.1/` in front of `office.js` in the CDN URL specifies the latest incremental release within version 1 of Office.js. Because the Office JavaScript API maintains backward compatibility, the latest release will continue to support API members that were introduced earlier in version 1.
26+
In the previous HTML snippet, the `/1/` in front of `office.js` in the CDN URL specifies the latest incremental release within version 1 of Office.js. Because the Office JavaScript API maintains backward compatibility, the latest release will continue to support API members that were introduced earlier in version 1.
2727

2828
If you plan to publish your Office Add-in from AppSource, you must use this CDN reference. Local references are only appropriate for internal, development, and debugging scenarios.
2929

docs/develop/specify-office-hosts-and-api-requirements.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Specify Office hosts and API requirements
33
description: Learn how to specify Office applications and API requirements for your add-in to work as expected.
44
ms.topic: best-practice
5-
ms.date: 10/03/2024
5+
ms.date: 01/07/2025
66
ms.localizationpriority: medium
77
---
88

@@ -33,7 +33,7 @@ This article helps you understand which options you should choose to ensure that
3333
Your add-in should load the most current version of the Office JavaScript API library from the content delivery network (CDN). To do this, be sure you have the following `script` tag in the first HTML file your add-in opens. Using `/1/` in the CDN URL ensures that you reference the most recent version of Office.js.
3434

3535
```HTML
36-
<script src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js" type="text/javascript"></script>
36+
<script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js" type="text/javascript"></script>
3737
```
3838

3939
## Specify which Office applications can host your add-in

docs/develop/support-ie-11.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Support older Microsoft webviews and Office versions
33
description: Learn how to support support older Microsoft webviews and Office versions in your add-in.
4-
ms.date: 04/04/2024
4+
ms.date: 01/07/2025
55
ms.localizationpriority: medium
66
---
77

@@ -70,7 +70,7 @@ This JavaScript should be as early in the add-in startup process as possible. Th
7070
<title>Contoso Task Pane Add-in</title>
7171

7272
<!-- Office JavaScript API -->
73-
<script type="text/javascript" src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js"></script>
73+
<script type="text/javascript" src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js"></script>
7474
</head>
7575

7676
<body>

docs/includes/office-js-access-library.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
The Office JavaScript API library can be accessed via the Office JS content delivery network (CDN) at: `https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js`. To use Office JavaScript APIs within any of your add-in's web pages, you must reference the CDN in a `<script>` tag in the `<head>` tag of the page.
1+
The Office JavaScript API library can be accessed via the Office JS content delivery network (CDN) at: `https://appsforoffice.microsoft.com/lib/1/hosted/office.js`. To use Office JavaScript APIs within any of your add-in's web pages, you must reference the CDN in a `<script>` tag in the `<head>` tag of the page.
22

33
```html
44
<head>
55
...
6-
<script src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js" type="text/javascript"></script>
6+
<script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js" type="text/javascript"></script>
77
</head>
88
```
99

docs/outlook/apis.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Outlook add-in APIs
33
description: Learn how to reference the Outlook add-in APIs and declare permissions in your Outlook add-in.
4-
ms.date: 10/03/2024
4+
ms.date: 01/07/2025
55
ms.topic: overview
66
ms.localizationpriority: medium
77
---
@@ -12,12 +12,12 @@ To use APIs in your Outlook add-in, you must specify the location of the Office.
1212

1313
## Office.js library
1414

15-
To interact with the [Outlook add-in API](/javascript/api/outlook), you need to use the JavaScript APIs in Office.js. The content delivery network (CDN) for the library is `https://appsforoffice.microsoft.com/lib/1.1/hosted/Office.js`. Add-ins submitted to AppSource must reference Office.js by this CDN; they can't use a local reference.
15+
To interact with the [Outlook add-in API](/javascript/api/outlook), you need to use the JavaScript APIs in Office.js. The content delivery network (CDN) for the library is `https://appsforoffice.microsoft.com/lib/1/hosted/Office.js`. Add-ins submitted to AppSource must reference Office.js by this CDN; they can't use a local reference.
1616

1717
Reference the CDN in a `<script>` tag in the `<head>` tag of the web page (.html, .aspx, or .php file) that implements the UI of your add-in.
1818

1919
```HTML
20-
<script src="https://appsforoffice.microsoft.com/lib/1.1/hosted/Office.js" type="text/javascript"></script>
20+
<script src="https://appsforoffice.microsoft.com/lib/1/hosted/Office.js" type="text/javascript"></script>
2121
```
2222

2323
As we add new APIs, the URL to Office.js will stay the same. We will change the version in the URL only if we break an existing API behavior.

docs/outlook/item-multi-select.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Activate your Outlook add-in on multiple messages
33
description: Learn how to activate your Outlook add-in when multiple messages are selected.
4-
ms.date: 11/14/2024
4+
ms.date: 01/07/2025
55
ms.topic: how-to
66
ms.localizationpriority: medium
77
---
@@ -198,7 +198,7 @@ Item multi-select relies on the [SelectedItemsChanged](/javascript/api/office/of
198198
```
199199

200200
> [!NOTE]
201-
> The preview version of the Office JavaScript API is used because this walkthrough implements the `loadItemByIdAsync` and `unloadAsync` methods, which are currently in preview. If your multi-select add-in doesn't implement these methods, use `https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js` instead. For more information, see [Referencing the Office JavaScript API library](../develop/referencing-the-javascript-api-for-office-library-from-its-cdn.md).
201+
> The preview version of the Office JavaScript API is used because this walkthrough implements the `loadItemByIdAsync` and `unloadAsync` methods, which are currently in preview. If your multi-select add-in doesn't implement these methods, use `https://appsforoffice.microsoft.com/lib/1/hosted/office.js` instead. For more information, see [Referencing the Office JavaScript API library](../develop/referencing-the-javascript-api-for-office-library-from-its-cdn.md).
202202

203203
1. Save your changes.
204204

docs/outlook/mobile-log-appointments.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Log appointment notes to an external application in Outlook mobile add-ins
33
description: Learn how to set up an Outlook mobile add-in to log appointment notes and other details to an external application.
4-
ms.date: 09/26/2024
4+
ms.date: 01/07/2025
55
ms.topic: how-to
66
ms.localizationpriority: medium
77
---
@@ -620,7 +620,7 @@ In this section, learn how your add-in can extract appointment details when the
620620

621621
1. Open the **./src/commands/commands.html** file of your add-in project.
622622

623-
1. Locate `<script type="text/javascript" src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js"></script>`, then add the following code after it. This adds a reference to the **commands.js** file.
623+
1. Locate `<script type="text/javascript" src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js"></script>`, then add the following code after it. This adds a reference to the **commands.js** file.
624624

625625
```html
626626
<script type="text/javascript" src="commands.js"></script>
@@ -659,7 +659,7 @@ In this section, learn how to display the logged appointment notes and other det
659659

660660
1. Open the **./src/taskpane/taskpane.html** file of your add-in project.
661661

662-
1. Locate `<script type="text/javascript" src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js"></script>`, then add the following code after it. This references the **taskpane.js** file.
662+
1. Locate `<script type="text/javascript" src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js"></script>`, then add the following code after it. This references the **taskpane.js** file.
663663

664664
```html
665665
<script type="text/javascript" src="taskpane.js"></script>

docs/project/create-a-project-add-in-that-uses-rest-with-an-on-premises-odata-service.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Create a Project add-in that uses REST with an on-premises Project Server OData service
33
description: Learn how to build a task pane add-in for Project Professional that compares cost and work data in the active project with the averages for all projects in the current Project Web App instance.
4-
ms.date: 10/03/2024
4+
ms.date: 01/07/2025
55
ms.localizationpriority: medium
66
---
77

@@ -191,7 +191,7 @@ The task pane shows the add-in display name at the top, which is the value of th
191191
<script src="../Scripts/jquery-1.7.1.js"></script>
192192

193193
<!-- Use the CDN reference to office.js when deploying your add-in. -->
194-
<!--<script src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js"></script>-->
194+
<!--<script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js"></script>-->
195195

196196
<!-- Use the local script references for Office.js to enable offline debugging -->
197197
<script src="../Scripts/Office/1.0/MicrosoftAjax.js"></script>
@@ -669,7 +669,7 @@ The following code is in the `Pages\HelloProjectOData.html` file of the **HelloP
669669
<script src="../Scripts/jquery-1.7.1.js"></script>
670670

671671
<!-- Use the CDN reference to Office.js when deploying your add-in -->
672-
<!--<script src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js"></script>-->
672+
<!--<script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js"></script>-->
673673

674674
<!-- Use the local script references for Office.js to enable offline debugging -->
675675
<script src="../Scripts/Office/1.0/MicrosoftAjax.js"></script>
@@ -1203,7 +1203,7 @@ If you modify the **HelloProjectOData** add-in for production use, do the follow
12031203
- In the HelloProjectOData.html file, for better performance, change the office.js reference from the local project to the CDN reference:
12041204

12051205
```HTML
1206-
<script src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js"></script>
1206+
<script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js"></script>
12071207
```
12081208

12091209
- Rewrite the `retrieveOData` function to enable queries of more than 100 projects. For example, you could get the number of projects with a `~/ProjectData/Projects()/$count` query, and use the *$skip* operator and *$top* operator in the REST query for project data. Run multiple queries in a loop, and then average the data from each query. Each query for project data would be of the form:

0 commit comments

Comments
 (0)