You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs-ref-autogen/preview-apis.md
+2-18Lines changed: 2 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Office Scripts preview APIs
3
3
description: Details about upcoming Office Scripts APIs.
4
4
ms.topic: whats-new
5
-
ms.date: 08/26/2025
5
+
ms.date: 09/08/2025
6
6
---
7
7
8
8
# Office Scripts preview APIs
@@ -22,23 +22,7 @@ The following table provides a concise summary of the APIs, while the subsequent
22
22
23
23
The following table lists the Office Scripts APIs currently in preview.
24
24
25
-
| Namespace | Class | Fields | Description |
26
-
|:---|:---|:---|:---|
27
-
|[OfficeScript](/javascript/api/office-scripts/officescript)||[convertToPdf()](/javascript/api/office-scripts/officescript#officescript-officescript-converttopdf-function(1))| Return the text encoding of the document as a PDF. If the document is empty, then the following error is shown: "We didn't find anything to print". Some actions made prior to using this API may not be captured in the PDF in Excel on the web. |
28
-
|||[downloadFile({ name, content, })](/javascript/api/office-scripts/officescript#officescript-officescript-downloadfile-function(1))| Downloads a specified file to the default download location specified by the local machine. |
29
-
|||[Metadata.getScriptName()](/javascript/api/office-scripts/officescript#officescript-officescript-metadata-getscriptname-function(1))| Get the name of the currently running script. |
30
-
|||[saveCopyAs(filename)](/javascript/api/office-scripts/officescript#officescript-officescript-savecopyas-function(1))| Saves a copy of the current workbook in OneDrive, in the same directory as the original file, with the specified file name. The API has a timeout limit of 30 seconds. This limit is rarely exceeded. |
31
-
|||[sendMail(mailProperties)](/javascript/api/office-scripts/officescript#officescript-officescript-sendmail-function(1))| Send an email with an Office Script. Use MailProperties to specify the content and recipients of the email. If the request body includes content, this method returns 400 Bad request. |
32
-
|[OfficeScript](/javascript/api/office-scripts/officescript)|[EmailAttachment](/javascript/api/office-scripts/officescript/officescript.emailattachment)|[content](/javascript/api/office-scripts/officescript/officescript.emailattachment#officescript-officescript-emailattachment-content-member)| The contents of the file. |
33
-
|||[name](/javascript/api/office-scripts/officescript/officescript.emailattachment#officescript-officescript-emailattachment-name-member)| The text that is displayed below the icon representing the attachment. This string doesn't need to match the file name. |
34
-
|[OfficeScript](/javascript/api/office-scripts/officescript)|[MailProperties](/javascript/api/office-scripts/officescript/officescript.mailproperties)|[attachments](/javascript/api/office-scripts/officescript/officescript.mailproperties#officescript-officescript-mailproperties-attachments-member)| A file (such as a text file or Excel workbook) attached to a message. Optional. |
35
-
|||[bcc](/javascript/api/office-scripts/officescript/officescript.mailproperties#officescript-officescript-mailproperties-bcc-member)| The blind carbon copy (BCC) recipient or recipients of the email. Optional. |
36
-
|||[cc](/javascript/api/office-scripts/officescript/officescript.mailproperties#officescript-officescript-mailproperties-cc-member)| The carbon copy (CC) recipient or recipients of the email. Optional. |
37
-
|||[content](/javascript/api/office-scripts/officescript/officescript.mailproperties#officescript-officescript-mailproperties-content-member)| The content of the email. Optional. |
38
-
|||[contentType](/javascript/api/office-scripts/officescript/officescript.mailproperties#officescript-officescript-mailproperties-contentType-member)| The type of the content in the email. Possible values are text or HTML. Optional. |
39
-
|||[importance](/javascript/api/office-scripts/officescript/officescript.mailproperties#officescript-officescript-mailproperties-importance-member)| The importance of the email. The possible values are `low`, `normal`, and `high`. Default value is `normal`. Optional. |
40
-
|||[subject](/javascript/api/office-scripts/officescript/officescript.mailproperties#officescript-officescript-mailproperties-subject-member)| The subject of the email. Optional. |
41
-
|||[to](/javascript/api/office-scripts/officescript/officescript.mailproperties#officescript-officescript-mailproperties-to-member)| The direct recipient or recipients of the email. Optional. |
|*global*|[convertToPdf()](/javascript/api/office-scripts/officescript#officescript-officescript-converttopdf-function(1))|Return the text encoding of the document as a PDF.|
4
+
||[downloadFile({ name, content, }: { name: string content: string })](/javascript/api/office-scripts/officescript#officescript-officescript-downloadfile-function(1))|Downloads a specified file to the default download location specified by the local machine.|
5
+
||[getScriptName()](/javascript/api/office-scripts/officescript#officescript-officescript-getscriptname-function(1))|Get the name of the currently running script.|
6
+
||[saveCopyAs(filename: string)](/javascript/api/office-scripts/officescript#officescript-officescript-savecopyas-function(1))|Saves a copy of the current workbook in OneDrive, in the same directory as the original file, with the specified file name.|
7
+
||[sendMail(mailProperties: MailProperties)](/javascript/api/office-scripts/officescript#officescript-officescript-sendmail-function(1))|Send an email with an Office Script.|
8
+
|[EmailAttachment](/javascript/api/office-scripts/officescript/officescript.emailattachment)|[content](/javascript/api/office-scripts/officescript/officescript.emailattachment#officescript-officescript-emailattachment-content-member)|The contents of the file.|
9
+
||[name](/javascript/api/office-scripts/officescript/officescript.emailattachment#officescript-officescript-emailattachment-name-member)|The text that is displayed below the icon representing the attachment.|
10
+
|[MailProperties](/javascript/api/office-scripts/officescript/officescript.mailproperties)|[attachments](/javascript/api/office-scripts/officescript/officescript.mailproperties#officescript-officescript-mailproperties-attachments-member)|A file (such as a text file or Excel workbook) attached to a message.|
11
+
||[bcc](/javascript/api/office-scripts/officescript/officescript.mailproperties#officescript-officescript-mailproperties-bcc-member)|The blind carbon copy (BCC) recipient or recipients of the email.|
12
+
||[cc](/javascript/api/office-scripts/officescript/officescript.mailproperties#officescript-officescript-mailproperties-cc-member)|The carbon copy (CC) recipient or recipients of the email.|
13
+
||[content](/javascript/api/office-scripts/officescript/officescript.mailproperties#officescript-officescript-mailproperties-content-member)|The content of the email.|
14
+
||[contentType](/javascript/api/office-scripts/officescript/officescript.mailproperties#officescript-officescript-mailproperties-contenttype-member)|The type of the content in the email.|
15
+
||[importance](/javascript/api/office-scripts/officescript/officescript.mailproperties#officescript-officescript-mailproperties-importance-member)|The importance of the email.|
16
+
||[subject](/javascript/api/office-scripts/officescript/officescript.mailproperties#officescript-officescript-mailproperties-subject-member)|The subject of the email.|
17
+
||[to](/javascript/api/office-scripts/officescript/officescript.mailproperties#officescript-officescript-mailproperties-to-member)|The direct recipient or recipients of the email.|
0 commit comments