Presentation
This topic covers APIs for presentations.
Presentation
ActivePresentation
Gets a Presentation object.
-
Syntax
expression.ActivePresentationexpression: A variable representing the application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the presentation object. const presentation = await app.ActivePresentation; }
Methods
ActivePresentation.ExportAsFixedFormat()
Use the ExportAsFixedFormat() method to export the current presentation as a PDF or an image and get the file's URL.
-
Syntax
expression.ActivePresentation.ExportAsFixedFormat({ RangeType, FrameSlides, FixedFormatType, ImgFormat, Dpi, Combine2LongPic, From, To, WaterMark })expression: A variable representing the Application object.
-
Parameters
Parameter
Type
Required
Description
RangeType
Enum
No
Specifies the range of the presentation to export. For more information, see PpPrintRangeType.
FrameSlides
Enum
No
Specifies whether to add a frame around the exported slides. For more information, see MsoTriState.
FixedFormatType
Enum
No
The file format for the exported presentation. Supported formats are PDF and image. The default value is 2, which specifies the PDF format. For more information, see PpFixedFormatType.
ImgFormat
Enum
No
The file format of the exported image. This parameter applies only when exporting images. The default value is 2, which specifies the BMP format. For more information, see PpExportImgFormatType.
Dpi
Number
No
The resolution of the exported image in pixels per inch (ppi). This parameter applies only when exporting images. The value must be an integer from 96 to 2048. The default is 96.
Combine2LongPic
Boolean
No
Specifies whether to combine multiple slides into a single long image. This parameter applies only when exporting images. The possible values are:
-
false(default): Exports each slide as a separate image. -
true: Exports the specified slides as a single long image.
From
Number
No
The start slide of the export range. This parameter applies only when exporting images. A value of 0 indicates the current slide.
To
Number
No
The end slide of the export range. This parameter applies only when exporting images.
WaterMark
Boolean
No
Specifies whether to add a watermark to the exported file. The possible values are:
-
false(default): Does not add a watermark. -
true: Adds a watermark.
-
-
Return value
Property
Type
Description
url
String
The URL of the exported file.
-
Examples
-
Exporting as a PDF
async function example() { await instance.ready(); const app = instance.Application; // Export the presentation as a PDF file. const pdfUrl = await app.ActivePresentation.ExportAsFixedFormat(); console.log(pdfUrl); } -
Exporting as an image
async function example() { await instance.ready(); const app = instance.Application; // Export the presentation as an image. const imgUrl = await app.ActivePresentation.ExportAsFixedFormat({ FixedFormatType: app.Enum.PpFixedFormatType.ppFixedFormatTypeIMG, From: 0, To: 1, }); console.log(imgUrl); }
-
ActivePresentation.GetOperatorsInfo()
Use the GetOperatorsInfo() method to get information about signed-in operators.
-
Syntax
expression.ActivePresentation.GetOperatorsInfo()expression: A variable representing the Application object.
-
Return value
Object
Parameter
Type
Description
type
String
The type of request.
response
Object
An array of operator information.
Response structure
Parameter
Type
Description
id
String
The ID of the operator.
avatar_url
String
The operator's avatar URL.
logined
String
The operator's login status.
name
String
The operator's name.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Retrieves information about logged-in operators. const operatorsInfo = await app.ActivePresentation.GetOperatorsInfo(); console.log(operatorsInfo); }
ActivePresentation.GetRemarkList()
Call GetRemarkList() to retrieve the remarks for all slides.
-
Syntax
expression.ActivePresentation.GetRemarkList()expression: A variable representing the Application object.
-
Return value
Property
Type
Description
remarkList
Array
A list of remarks.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the remarks for all slides. const operatorsInfo = await app.ActivePresentation.GetRemarkList(); console.log(operatorsInfo); }
ActivePresentation.GetSlideRemark()
Use the GetSlideRemark() method to get the notes for a specified slide.
-
Syntax
expression.ActivePresentation.GetSlideRemark()expression: A variable that represents the Application object.
-
Parameters
Parameter
Type
Required
Description
SlideIndex
Number
Optional
The index of the slide. Must be an integer greater than or equal to 1 and less than the total number of slides. Defaults to the index of the current slide.
-
Return value
Property
Type
Description
remarkList
Array
An array containing the remarks for the specified slide.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Obtain the remarks of the specified slide. const operatorsInfo = await app.ActivePresentation.GetSlideRemark(); console.log(operatorsInfo); }
ActivePresentation.ExitVideoFullscreen()
Use the ExitVideoFullscreen() method to exit fullscreen playback for a demo video.
-
Syntax
expression.ActivePresentation.ExitVideoFullscreen()expression: A variable representing the application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Exit full-screen video playback. const operatorsInfo = await app.ActivePresentation.ExitVideoFullscreen(); console.log(operatorsInfo); }
ActivePresentation.MiniThumbnailVisibleInfo()
Use the MiniThumbnailVisibleInfo() method to detect when the thumbnail panel opens or closes.
-
Syntax
expression.ActivePresentation.MiniThumbnailVisibleInfo()Expression: A variable representing an application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the visibility status of the mini thumbnail. const operatorsInfo = await app.ActivePresentation.MiniThumbnailVisibleInfo(); console.log(operatorsInfo); }
ActivePresentation.Save()
Call the Save() method to save changes to the presentation.
Requires JavaScript SDK v1.1.9 or later.
-
Syntax
expression.ActivePresentation.Save()expression: A variable that represents the Application object.
-
Return value
Parameter
Type
Description
result
String
The save status.
size
Number
The file size in bytes.
version
Number
The version of the document.
-
Save status
Save status
Description
ok
The version is saved successfully and can be viewed in the version history.
nochange
The document has no changes, and a new version is not saved.
SavedEmptyFile
Saving an empty document is not supported.
This occurs when the document is empty after the kernel completes the save operation.
SpaceFull
The storage space is full.
QueneFull
The save operation is pending. Avoid frequent operations.
This occurs when the server-side save queue is full.
fail
The save operation failed.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Save the presentation. const saveResult = await app.ActivePresentation.Save(); console.log(saveResult); }
ActivePresentation.PlayTriggerAnim()
Use PlayTriggerAnim() to play a trigger animation.
-
Syntax
expression.ActivePresentation.PlayTriggerAnim()expression: A variable representing the Application object.
-
Parameters
Parameter
Type
Required
Description
TargetShapeId
Number
Yes
Specifies the ID of the trigger shape.
SlideCategory
String
Yes
Specifies the trigger type.
Steps
Number
No
Specifies the number of steps.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Plays the trigger animation. await app.ActivePresentation.PlayTriggerAnim(TargetShapeId, SlideCategory); }
ActivePresentation.GetDiagramContainer()
Use the GetDiagramContainer() method to get the container DOM of a selected diagram group.
-
Procedure
-
Select a diagram group.
-
Call
ActivePresentation.GetDiagramContainer(). -
Get the container's DOM node.
-
-
Syntax
expression.ActivePresentation.GetDiagramContainer()expression: A variable representing the Application object.
-
Return value
Returns the ID of the selected DOM node as a string, or returns
nullif no diagram group is selected. -
Example
//@file=base.pptx async function example() { await instance.ready(); const app = instance.Application; // Get the container DOM for the selected diagram group. const d = await app.ActivePresentation.GetDiagramContainer(); console.log('Retrieved content:', d); }
ActivePresentation.GetDiagramInfo()
Use GetDiagramInfo() to get information about the selected diagram group.
-
Procedure
-
Select a diagram group.
-
Call the
ActivePresentation.GetDiagramInfo()API. -
The API returns information about the selected diagram group.
-
-
Syntax
expression.ActivePresentation.GetDiagramInfo()expression: A variable representing an
Applicationobject. -
Return value
nullor the selected DOM node -
Example
//@file=base.pptx async function example() { await instance.ready(); const app = instance.Application; // Get information about the selected diagram group. const info = await app.ActivePresentation.GetDiagramInfo(); console.log('Retrieved content:', info); }
ActivePresentation.SetOpenMarkerInkEdit()
Use SetOpenMarkerInkEdit() to enable the ink tool, or to save and disable it.
-
Syntax
expression.ActivePresentation.SetOpenMarkerInkEdit({ Open })expression: A variable that represents the Application object.
-
Parameters
Parameter
Type
Required
Description
Open
Boolean
No
Specifies whether to enable or disable the ink tool. Disabling the tool also saves any current ink.
-
true(default): Enables the ink tool. -
false: Saves the ink and disables the ink tool.
-
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Enable the ink tool. await app.ActivePresentation.SetOpenMarkerInkEdit(true); setTimeout(async () => { // Save the ink and disable the ink tool after 5,000 milliseconds. await app.ActivePresentation.SetOpenMarkerInkEdit(false); }, 5000); }
ActivePresentation.GetDiagramPPTInfo()
The GetDiagramPPTInfo() method retrieves the download URL for a single-page slide of the current diagram group.
This feature requires JavaScript SDK v1.1.10 or later.
-
Syntax
expression.ActivePresentation.GetDiagramPPTInfo({ Type })expression: A variable that represents the Application object.
-
Parameters
Parameter
Type
Required
Description
Type
Number
No
Specifies the intended use of the URL. valid values:
-
1 (default): Retrieves preview information.
-
2: Retrieves information for styling.
-
-
Return value
Property
Type
Description
id
String
The file ID.
connid
String
The connection ID.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the URL of the single slide generated from the current diagram group. await app.ActivePresentation.GetDiagramPPTInfo({ Type: 2 }); }
ActivePresentation.BeautifyDiagram()
Use the BeautifyDiagram() method to replace the diagram on the current slide.
This feature requires JavaScript SDK V1.1.10 or later.
-
Procedure
-
Select the diagram.
-
Click Style in the button group.
-
Select a style to beautify the current slide and get its UploadId.
-
Use
ActivePresentation.BeautifyDiagramto replace the diagram on the current slide.
-
-
Syntax
expression.ActivePresentation.BeautifyDiagram({ UploadId })expression: A variable representing the Application object.
-
Parameters
Parameter
Type
Required
Description
UploadId
String
No
The ID of the style to apply.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Replace the diagram on the current slide. await app.ActivePresentation.BeautifyDiagram('xxx'); }
ActivePresentation.InsertDiagram()
Use InsertDiagram() to insert a diagram.
This feature is available in JavaScript SDK v1.1.11 and later.
-
Syntax
expression.ActivePresentation.InsertDiagram({ Url })expression: A variable representing the Application object.
-
Parameters
Parameter
Type
Required
Description
Url
String
Yes
The URL of the diagram.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Insert a diagram. await app.ActivePresentation.InsertDiagram('xxx'); }
ActivePresentation.GetActiveShapeImg()
Use GetActiveShapeImg() to retrieve the source image or its URL.
This feature is supported in JavaScript SDK v1.1.11 and later.
-
Syntax
expression.ActivePresentation.GetActiveShapeImg({ IsOrigin })expression: A variable representing the Application object.
-
Parameters
Parameter
Type
Required
Description
IsOrigin
Boolean
No
Specifies whether to retrieve the URL of the source image. Valid values:
-
false(default): Retrieves the URL of the currently rendered image. -
true: Retrieves the URL of the source image.
-
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the URL of the source image for the selected shape. await app.ActivePresentation.GetActiveShapeImg(true); }
ActivePresentation.FetchDownloadUrl()
Use the FetchDownloadUrl() method to get the URL of the presentation's source file.
This feature requires JavaScript SDK v1.1.14 or later.
-
Syntax
expression.ActivePresentation.FetchDownloadUrl()expression: A variable representing the application object.
-
Return value
Returns a
Stringcontaining the URL of the presentation's source file. -
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the URL of the presentation's source file. const url = await app.ActivePresentation.FetchDownloadUrl(); }
ActivePresentation.ReplaceActiveSlide()
The ReplaceActiveSlide() method replaces the current slide.
-
Syntax
expression.ActivePresentation.ReplaceActiveSlide({ UploadId, FileKey })expression: Specifies the Application object.
-
Parameters
Parameter
Type
Required
Description
UploadId
String
No
The server response after a successful file upload.
FileKey
String
No
Used by the kernel to decrypt the encrypted document.
-
Return value
On success:
{ type: 'success' }On error:
{ type: 'error' } -
Example
//@file=base.ppt async function example() { await instance.ready() const app = instance.Application await app.ActivePresentation.ReplaceActiveSlide({ UploadId: 'xxx', FileKey: 'xxx', }) }
Properties
ActivePresentation.ReadOnly
The ReadOnly property indicates whether the current presentation is read-only.
This feature requires JavaScript SDK version 1.1.14 or later.
-
Syntax
expression.ActivePresentation.ReadOnlyexpression: A variable representing an Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the presentation's read-only status. const ReadOnly = await app.ActivePresentation.ReadOnly; }
ActivePresentation.ReadOnlyComment
The ReadOnlyComment property indicates whether the current presentation is read-only but allows comments.
Available in JavaScript SDK v1.1.15 and later.
-
Syntax
expression.ActivePresentation.ReadOnlyCommentexpression: A variable representing an
Applicationobject. -
Example
async function example() { await instance.ready(); const app = instance.Application; // Checks if the current presentation is read-only with commenting enabled. const ReadOnlyComment = await app.ActivePresentation.ReadOnlyComment; }
ActivePresentation.SupportReadOnlyComment
The SupportReadOnlyComment property indicates whether the current presentation supports commenting in read-only mode.
This feature requires JavaScript SDK v1.1.15 or later.
-
Syntax
expression.ActivePresentation.SupportReadOnlyCommentexpression: A variable representing the Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Checks if the current presentation supports commenting in read-only mode. const SupportReadOnlyComment = await app.ActivePresentation.SupportReadOnlyComment; }
Slides
ActivePresentation.Slides
Gets the Slides object, a collection of all slides in the presentation.
-
Syntax
expression.ActivePresentation.Slidesexpression: An expression that returns an
Applicationobject. -
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the presentation object const presentation = await app.ActivePresentation; // Get the Slides object const slides = await presentation.Slides; }
Methods
ActivePresentation.Slides.AddSlide()
AddSlide() inserts a new slide into the presentation.
This feature is available in JavaScript SDK v1.1.10 and later.
-
Syntax
expression.ActivePresentation.Slides.AddSlide()expression: An expression that returns an
Applicationobject. -
Parameters
Parameter
Type
Required
Description
Index
Number
No
The position at which to insert the new slide.
If this parameter is omitted or its value is less than 0, the new slide is inserted after the current slide.
CustomLayout
Object
No
The local layout to use for the new slide.
If this parameter is omitted, a blank slide is inserted by default.
LayoutUrl
String
No
The URL of an online slide file.
If this parameter is specified, the
CustomLayoutparameter is ignored. The layout from the online slide file is used, and aPromiseis returned to indicate the result.LayoutIndex
Number
No
The index of the layout in the online slide file to use for the new slide.
This parameter applies only when the
LayoutUrlparameter is specified. -
Example
async function example() { await instance.ready(); const app = instance.Application; // Insert a new blank slide const Index = app.ActivePresentation.SlideShowWindow.View.Slide.SlideIndex; await app.ActivePresentation.Slides.AddSlide(Index); }
ActivePresentation.Slides.FindBySlideID2()
FindBySlideID2() gets a slide's information by its ID.
This feature is available in JavaScript SDK v1.1.10 and later.
-
Syntax
expression.ActivePresentation.Slides.FindBySlideID2()expression: An expression that returns an
Applicationobject. -
Parameters
Parameter
Type
Required
Description
SlideID
Number
Yes
The ID of the slide. You can get this ID from the
ActivePresentation.SlideShowWindow.View.Slide.SlideIDproperty of the Slide object. -
Return Value
Returns an object containing information about the specified slide.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the SlideID of the current slide const slideId = await app.ActivePresentation.SlideShowWindow.View.Slide.SlideID; console.log(slideId); // Get slide information by SlideID const info = await app.ActivePresentation.Slides.FindBySlideID2(slideId); console.log(info); }
ActivePresentation.Slides.Item()
Item() returns a single slide object from the collection.
This feature is available in JavaScript SDK v1.1.14 and later.
-
Syntax
expression.ActivePresentation.Slides.Item()expression: An expression that returns an
Applicationobject. -
Parameters
Parameter
Type
Required
Description
Index
Number
Yes
The slide index.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get a single slide object await app.ActivePresentation.Slides.Item(1); }
Properties
ActivePresentation.Slides.Count
The Count property returns the total number of slides in the presentation.
-
Syntax
expression.ActivePresentation.Slides.Countexpression: An expression that returns an
Applicationobject. -
Return Value
Returns the total number of slides.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the presentation object const presentation = await app.ActivePresentation; // Get the Slides object const slides = await presentation.Slides; // Get the total number of slides const count = await slides.Count; console.log(count); }
ActivePresentation.Slides.Comments
The Comments property returns the Comments object.
This feature is available in JavaScript SDK v1.1.14 and later.
-
Syntax
expression.ActivePresentation.Slides.Commentsexpression: An expression that returns an
Applicationobject. -
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the presentation object const presentation = await app.ActivePresentation; // Get the Slides object const slides = await presentation.Slides; // Get the Comments object await slides.Comments; }
Slide
Properties
ActivePresentation.SlideShowWindow.View.Slide.SlideID
The SlideID property returns the ID of the current slide.
This feature requires JS-SDK v1.1.10 or later.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.Slide.SlideIDexpression: A variable that represents an Application object.
-
Return value
Returns the slide ID as a
Number. -
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the ID of the current slide. const slideId = await app.ActivePresentation.SlideShowWindow.View.Slide.SlideID; console.log(slideId); }
ActivePresentation.SlideShowWindow.View.Slide.SlideIndex
The SlideIndex property returns the index number of the current slide.
This feature requires JS-SDK v1.1.10 or later.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.Slide.SlideIndexexpression: A variable that represents an Application object.
-
Return value
Returns the index number of the current slide as a
Number. -
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the index number of the current slide. const slideIndex = await app.ActivePresentation.SlideShowWindow.View.Slide.SlideIndex; console.log(slideIndex); }
ActivePresentation.SlideShowWindow.View.Slide.Tags
The Tags property returns a collection of tags for the current slide.
This feature requires JS-SDK v1.1.14 or later.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.Slide.Tagsexpression: A variable that represents an Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the tags for the current slide. const Tags = app.ActivePresentation.SlideShowWindow.View.Slide.Tags; }
ActivePresentation.SlideShowWindow.View.Slide.Shapes
The Shapes property returns a collection of all objects placed on or inserted into the drawing layer of the current slide.
This feature requires JS-SDK v1.1.14 or later.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.Slide.Shapesexpression: A variable that represents an Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the collection of shapes on the slide. const Shapes = app.ActivePresentation.SlideShowWindow.View.Slide.Shapes; }
ActivePresentation.SlideShowWindow.View.Slide.Hyperlinks
The Hyperlinks property returns a collection of all hyperlinks on the current slide.
This feature requires JS-SDK v1.1.14 or later.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.Slide.Hyperlinksexpression: A variable that represents an Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get all hyperlinks on the current slide. const Hyperlinks = app.ActivePresentation.SlideShowWindow.View.Slide.Hyperlinks; }
SlideShowSettings
ActivePresentation.SlideShowSettings
Returns the SlideShowSettings object.
-
Syntax
expression.ActivePresentation.SlideShowSettingsexpression: A variable that represents an Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the Presentation object. const presentation = await app.ActivePresentation; // Get the SlideShowSettings object. const slideShowSettings = await presentation.SlideShowSettings; }
Methods
ActivePresentation.SlideShowSettings.Run()
Starts the presentation in slide show mode.
-
Syntax
expression.ActivePresentation.SlideShowSettings.Run()expression: A variable that represents an Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the SlideShowSettings object. const slideShowSettings = await app.ActivePresentation.SlideShowSettings; // Start the presentation in slide show mode. await slideShowSettings.Run(); }
ActivePresentation.SlideShowSettings.SetMiniThumbnailVisible()
Shows or hides the mini thumbnails.
-
This feature is supported in JavaScript SDK v1.1.10 and later.
-
This feature is available on PC only.
-
Syntax
expression.ActivePresentation.SlideShowSettings.SetMiniThumbnailVisible()expression: A variable that represents an Application object.
-
Parameters
Property
Type
Required
Description
Visible
Boolean
Yes
Specifies whether to show the mini thumbnails. Valid values:
-
false(default): Hides the mini thumbnails. -
true: Shows the mini thumbnails.
-
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Show the mini thumbnails. await app.ActivePresentation.SlideShowSettings.SetMiniThumbnailVisible(true); }
ActivePresentation.SlideShowSettings.SetPlayToolbarPosition()
Modifies the style of the toolbar in slide show mode.
-
This feature is supported in JavaScript SDK v1.1.14 and later.
-
This feature is available on PC only.
-
This API provides a high degree of flexibility. To prevent style changes from affecting functionality, we recommend using only the
top,left,right,bottom, andtranslateCSS properties to modify the style.
-
Syntax
expression.ActivePresentation.SlideShowSettings.SetPlayToolbarPosition({ Style })expression: A variable that represents an Application object.
-
Parameters
Property
Type
Required
Description
Style
Object
Yes
A style object for the toolbar.
-
Show: The style to apply when the toolbar is visible. Example:{ left: '100px' }. -
Hidden: The style to apply when the toolbar is hidden.
-
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the SlideShowSettings object. const slideShowSettings = await app.ActivePresentation.SlideShowSettings; // Start the presentation in slide show mode. await slideShowSettings.Run(); // Modify the toolbar style. await slideShowSettings.SetPlayToolbarPosition({ Style: { Show: { top: '10px' }, // The position of the toolbar when it is visible. Hidden: { top: '-100px' }, // The position of the toolbar when it is hidden. }, }); }
ActivePresentation.SlideShowSettings.SetPlayInkPosition()
Modifies the style of the ink tool in slide show mode.
-
This feature is supported in JavaScript SDK v1.1.14 and later.
-
This feature is available on PC only.
-
Syntax
expression.ActivePresentation.SlideShowSettings.SetPlayInkPosition({ Style })expression: A variable that represents an Application object.
-
Parameters
Property
Type
Required
Description
Style
Object
Yes
A style object for the ink tool. Example:
{ background: 'deepskyblue' }. -
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the SlideShowSettings object. const slideShowSettings = await app.ActivePresentation.SlideShowSettings; // Start the presentation in slide show mode. await slideShowSettings.Run(); // Modify the ink tool style. await slideShowSettings.SetPlayInkPosition({ Style: { background: 'deepskyblue' }, }); }
ActivePresentation.SlideShowSettings.OpenRemarkSpeaker()
Opens the remark view in slide show mode.
This feature is supported in JavaScript SDK v1.1.14 and later.
-
Syntax
expression.ActivePresentation.SlideShowSettings.OpenRemarkSpeaker()expression: A variable that represents an Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the SlideShowSettings object. const slideShowSettings = await app.ActivePresentation.SlideShowSettings; // Start the presentation in slide show mode. await slideShowSettings.Run(); // Open the remark view. await slideShowSettings.OpenRemarkSpeaker(); }
ActivePresentation.SlideShowSettings.SetCountDown()
Starts the countdown in slide show mode.
-
This feature is supported in JavaScript SDK v1.1.14 and later.
-
This feature is available on PC only.
-
Syntax
expression.ActivePresentation.SlideShowSettings.SetCountDown()expression: A variable that represents an Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the SlideShowSettings object. const slideShowSettings = await app.ActivePresentation.SlideShowSettings; // Start the presentation in slide show mode. await slideShowSettings.Run(); // Start the countdown. await slideShowSettings.SetCountDown(); }
ActivePresentation.SlideShowSettings.StartAutoPlay()
Enables autoplay in slide show mode.
-
This feature is supported in JavaScript SDK v1.1.14 and later.
-
This feature is available on PC only.
-
Syntax
expression.ActivePresentation.SlideShowSettings.StartAutoPlay()expression: A variable that represents an Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the SlideShowSettings object. const slideShowSettings = await app.ActivePresentation.SlideShowSettings; // Start the presentation in slide show mode. await slideShowSettings.Run(); // Enable autoplay. await slideShowSettings.StartAutoPlay(); }
ActivePresentation.SlideShowSettings.StopAutoPlay()
Stops autoplay.
-
This feature is supported in JavaScript SDK v1.1.10 and later.
-
This feature is available on PC only.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.StopAutoPlay()expression: A variable that represents an Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the SlideShowSettings object. const slideShowSettings = await app.ActivePresentation.SlideShowSettings; // Start the presentation in slide show mode. await slideShowSettings.Run(); // Stop autoplay. await slideShowSettings.StopAutoPlay(); }
Properties
ActivePresentation.SlideShowSettings.ShowPlayToolbar
Specifies whether to show or hide the toolbar in slide show mode.
-
This feature is supported in JavaScript SDK v1.1.14 and later.
-
This feature is available on PC only.
-
Syntax
expression.ActivePresentation.SlideShowSettings.ShowPlayToolbar = Booleanexpression: A variable that represents an Application object.
A value of
trueshows the toolbar, and a value offalsehides it. -
Example
async function example() { await instance.ready(); const app = instance.Application; // Hide the toolbar. app.ActivePresentation.SlideShowSettings.ShowPlayToolbar = false; }
Ink
ActivePresentation.SlideShowSettings.Ink
Gets the ink object.
This feature is supported in JavaScript SDK v1.1.14 and later.
-
Syntax
expression.ActivePresentation.SlideShowSettings.InkExpression: The application object of the document type.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the ink object. await app.ActivePresentation.SlideShowSettings.Ink; }
Methods
ActivePresentation.SlideShowSettings.Ink.Delete
Use the Delete method to erase ink.
-
Syntax
expression.ActivePresentation.SlideShowSettings.Ink.DeleteExpression: The application object of the document type.
-
Parameters
Parameter
Type
Required
Description
Type
Number
No
The type of erasure. Valid values are:
-
0: Erases a single ink stroke.
-
1 (default): Erases all ink from the current slide.
-
2: Erases all ink from the presentation.
Position
Object
No
The position of the erasure, in the format
{clientX: number, clientY: number}.NoteThis parameter only applies when the
Typeparameter is 0. The position is relative to the window. -
-
Example
//@file=base.pptx async function example() { await instance.ready(); const app = instance.Application; // Use the eraser. await app.ActivePresentation.SlideShowSettings.Ink.Delete; }
Properties
ActivePresentation.SlideShowSettings.Ink.Color
The Color property gets or sets the ink color.
This feature is supported in JavaScript SDK v1.1.14 and later.
-
Syntax
expression.ActivePresentation.SlideShowSettings.Ink.ColorExpression: The application object of the document type.
-
Parameters
Parameter
Type
Required
Description
Color
String
Yes
A hexadecimal color code. For example,
#FFFFFFrepresents white. -
Example
async function example() { await instance.ready(); const app = instance.Application; // Set the ink color. await app.ActivePresentation.SlideShowSettings.Ink.Color = '#8bc34a'; }
ActivePresentation.SlideShowSettings.Ink.Width
The Width property gets or sets the ink width.
This feature is supported in JavaScript SDK v1.1.14 and later.
-
Syntax
expression.ActivePresentation.SlideShowSettings.Ink.WidthExpression: The application object of the document type.
-
Parameters
Parameter
Type
Required
Description
Width
Number
Yes
The ink width. The valid range depends on the client type:
-
For a PC client, the value must be an integer from 1 to 16.
-
For a mobile client, the value must be an integer from 1 to 30.
-
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Set the ink width to 10. await app.ActivePresentation.SlideShowSettings.Ink.Width = 10; }
ActivePresentation.SlideShowSettings.Ink.Type
The Type property gets or sets the ink type.
This feature is supported in JavaScript SDK v1.1.14 and later.
-
Syntax
expression.ActivePresentation.SlideShowSettings.Ink.TypeExpression: The application object of the document type.
-
Parameters
|
Parameter |
Type |
Required |
Description |
|
Type |
|
Yes |
Specifies the ink type. Valid values are 0 (color pen), 1 (highlighter), and 2 (smart pen). |
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Set the ink type to highlighter. await app.ActivePresentation.SlideShowSettings.Ink.Type = 1; }
SlideShowWindow
ActivePresentation.SlideShowWindow
Gets the slide show window for the presentation.
-
Syntax
expression.ActivePresentation.SlideShowWindowexpression: A variable that represents an Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the presentation object. const presentation = await app.ActivePresentation; // Get the slide show window. const slideShowWindow = await presentation.SlideShowWindow; }
Properties
ActivePresentation.SlideShowWindow.IsFullScreen
The IsFullScreen property gets or sets whether the window is in full-screen mode.
This feature is supported in JavaScript SDK v1.1.10 and later.
-
Syntax
expression.ActivePresentation.SlideShowWindow.IsFullScreenexpression: A variable that represents an Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the presentation object. const presentation = await app.ActivePresentation; // Get the slide show window. const slideShowWindow = await presentation.SlideShowWindow; // Enter full-screen mode. slideShowWindow.IsFullScreen = true; setTimeout(() => { // Exit full-screen mode after 3,000 ms. slideShowWindow.IsFullScreen = false; }, 3000) }
SlideShowView
ActivePresentation.SlideShowWindow.View
Gets the view in the slide show window.
-
Syntax
expression.ActivePresentation.SlideShowWindow.Viewexpression: Represents the Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the presentation object const presentation = await app.ActivePresentation; // Get the slide show window const slideShowWindow = await presentation.SlideShowWindow; // Get the view within the slide show window const slideShowView = await slideShowWindow.View; }
Methods
ActivePresentation.SlideShowWindow.View.Exit()
The Exit() method exits the slide show.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.Exit()expression: Represents the Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the SlideShowSettings object const SlideShowSettings = await app.ActivePresentation.SlideShowSettings; // Run the slide show await SlideShowSettings.Run(); // Exit the slide show after 5000 ms setTimeout(async () => { await app.ActivePresentation.SlideShowWindow.View.Exit(); }, 5000); }
ActivePresentation.SlideShowWindow.View.GetClickCount()
The GetClickCount() method gets the number of animations on the current slide.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.GetClickCount()expression: Represents the Application object.
-
Return value
Returns a
Numberrepresenting the total count of animations on the current slide. -
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the SlideShowSettings object const SlideShowSettings = await app.ActivePresentation.SlideShowSettings; // Run the slide show await SlideShowSettings.Run(); // Get the number of animations on the current slide const clickCount = await app.ActivePresentation.SlideShowWindow.View.GetClickCount(); console.log(clickCount); }
ActivePresentation.SlideShowWindow.View.GetClickIndex()
The GetClickIndex() method gets the index number of the current or most recently played on-click animation.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.GetClickIndex()expression: Represents the Application object.
-
Return value
Returns a
Numberthat represents the index number of the current on-click animation. -
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the SlideShowSettings object const SlideShowSettings = await app.ActivePresentation.SlideShowSettings; // Run the slide show await SlideShowSettings.Run(); // Get the index number of the current on-click animation const index = await app.ActivePresentation.SlideShowWindow.View.GetClickIndex(); console.log(index); }
ActivePresentation.SlideShowWindow.View.GotoNextClick()
With the GotoNextClick() method, you can switch to the next animation.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.GotoNextClick()expression: Represents the Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the SlideShowSettings object const SlideShowSettings = await app.ActivePresentation.SlideShowSettings; // Run the slide show await SlideShowSettings.Run(); // Advance to the next animation after 2000 ms setTimeout(async () => { await app.ActivePresentation.SlideShowWindow.View.GotoNextClick(); }, 2000); }
ActivePresentation.SlideShowWindow.View.GotoPreClick()
The GotoPreClick() method returns to the previous animation.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.GotoPreClick()expression: Represents the Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the SlideShowSettings object const SlideShowSettings = await app.ActivePresentation.SlideShowSettings; // Run the slide show await SlideShowSettings.Run(); // Go to the previous animation after 2000 ms setTimeout(async () => { await app.ActivePresentation.SlideShowWindow.View.GotoPreClick(); }, 2000); }
ActivePresentation.SlideShowWindow.View.GotoSlide()
The GotoSlide() method navigates to a specified slide.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.GotoSlide({ Index })expression: Represents the Application object.
-
Parameters
Property
Data type
Required
Description
Index
Number
Yes
The index of the destination slide.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Go to the third slide await app.ActivePresentation.SlideShowWindow.View.GotoSlide(3); }
ActivePresentation.SlideShowWindow.View.GotoClick()
The GotoClick() method plays a specific animation on the current slide.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.GotoClick(number)expression: Represents the Application object.
-
Parameters
Property
Data type
Description
number
Number
The index of the animation on the current slide.
-
Example
//@file=base.ppt async function example() { await instance.ready(); const app = instance.Application; // Get the SlideShowSettings object const SlideShowSettings = await app.ActivePresentation.SlideShowSettings; // Run the slide show await SlideShowSettings.Run(); // Get the slide show window object const SlideShowWindow = await app.ActivePresentation.SlideShowWindow; // Get the view object const view = await SlideShowWindow.View; // Go to the second animation on the current slide await view.GotoClick(2); }
ActivePresentation.SlideShowWindow.View.Play()
The Play() method plays a specific animation on a specific slide.
This feature is available in JavaScript SDK v1.1.10 and later.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.Play(slideIndex, animateIndex)expression: Represents the Application object.
-
Parameters
Property
Data type
Description
slideIndex
Number
The index of the slide.
animateIndex
Number
The index of the animation on the slide.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the SlideShowSettings object const SlideShowSettings = await app.ActivePresentation.SlideShowSettings; // Run the slide show await SlideShowSettings.Run(); // Get the slide show window const SlideShowWindow = await app.ActivePresentation.SlideShowWindow; // Get the view within the slide show window const view = await SlideShowWindow.View; // Start playing from the first animation on the first slide await view.Play(1, 1); }
ActivePresentation.SlideShowWindow.View.SetLaserPenData()
The SetLaserPenData() method synchronizes laser pointer data.
This feature is available in JavaScript SDK v1.1.10 and later.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.SetLaserPenData(Data)expression: Represents the Application object.
-
Parameters
Property
Data type
Description
Data
Object
The laser pointer data.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the SlideShowSettings object const SlideShowSettings = await app.ActivePresentation.SlideShowSettings; // Run the slide show await SlideShowSettings.Run(); // Get the slide show window const SlideShowWindow = await app.ActivePresentation.SlideShowWindow; // Get the view within the slide show window const view = await slideShowWindow.View; // Set up a listener for changes to laser pointer ink points app.Sub.SlideLaserPenInkPointsChanged = async (e) => { const { Data } = e; console.log(Data); // Synchronize laser pointer data await view.SetLaserPenData(Data); } }
ActivePresentation.SlideShowWindow.View.SetMediaObj()
The SetMediaObj() method synchronizes video playback data.
This feature is available in JavaScript SDK v1.1.10 and later.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.SetMediaObj(Data)expression: Represents the Application object.
-
Parameters
Property
Data type
Description
Data
Object
The video playback data.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the SlideShowSettings object const SlideShowSettings = await app.ActivePresentation.SlideShowSettings; // Run the slide show await SlideShowSettings.Run(); // Get the slide show window const SlideShowWindow = await app.ActivePresentation.SlideShowWindow; // Get the view within the slide show window const view = await slideShowWindow.View; // Set up a listener for video playback changes app.Sub.SlideMediaChanged = async (e) => { const { Data } = e; console.log(Data); // Synchronize video playback data await view.SetMediaObj(Data); } }
ActivePresentation.SlideShowWindow.View.DestroyMediaPlayer()
The DestroyMediaPlayer() method destroys the video player.
-
This feature is available in JavaScript SDK v1.1.10 and later.
-
This feature is available on mobile devices only.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.DestroyMediaPlayer()expression: Represents the Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the SlideShowSettings object const SlideShowSettings = await app.ActivePresentation.SlideShowSettings; // Run the slide show await SlideShowSettings.Run(); // Get the slide show window const SlideShowWindow = await app.ActivePresentation.SlideShowWindow; // Get the view within the slide show window const view = await slideShowWindow.View; // Set up a listener for video playback changes app.Sub.SlideMediaChanged = async (e) => { const { Data } = e; console.log(Data); setTimeout(async () => { // Destroy the video player after 3000 ms await view.DestroyMediaPlayer(Data); }, 3000); } }
ActivePresentation.SlideShowWindow.View.SetToolVisible()
The SetToolVisible() method shows or hides specified tools in slide show mode.
This feature is available in JavaScript SDK v1.1.10 and later.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.SetToolVisible(toolName, flag)expression: Represents the Application object.
-
Parameters
Property
Data type
Description
toolName
String
The name of the tool to configure.
flag
Boolean
Specifies whether to show or hide the tool. Valid values:
-
false: Hides the tool.
-
true: Shows the tool.
-
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the presentation object const presentation = await app.ActivePresentation; // Get the slide show window const slideShowWindow = await presentation.SlideShowWindow; // Get the view object const view = await slideShowWindow.View; const linkTip = app.Enum.PpToolType.pcPlayHoverLink; // Hyperlink hover tip const imageTip = app.Enum.PpToolType.pcImageHoverTip; // Image hover tip const menu = app.Enum.PpToolType.pcPlayingMenu; // Right-click menu // Hide the tools after 2000 ms setTimeout(() => { // Hide the specified tools in slide show mode view.SetToolVisible(linkTip, false); view.SetToolVisible(imageTip, false); view.SetToolVisible(menu, false); }, 2000) }
Properties
ActivePresentation.SlideShowWindow.View.State
Gets the current state of the slide.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.Stateexpression: Represents the Application object.
-
Return value
Property
Data type
Description
state
String
The current state of the slide. Valid values:
-
edit: The slide is in edit mode.
-
play: The slide is in slide show mode.
-
masterView: The slide is in master view.
-
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the current state of the slide const getState = () => { return app.ActivePresentation.SlideShowWindow.View.State; }
ActivePresentation.SlideShowWindow.View.CoreReadonly
Gets or sets a value indicating whether to enter preview mode.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.CoreReadonlyexpression: Represents the Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the presentation object const presentation = await app.ActivePresentation; // Get the slide show window const slideShowWindow = await presentation.SlideShowWindow; // Get the view object const view = await SlideShowWindow.View; // Enter preview mode view.CoreReadonly = true; }
ActivePresentation.SlideShowWindow.View.MarkerEditVisible
Gets or sets the visibility of the marker toolbar.
This feature is available in JavaScript SDK v1.1.10 and later.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.MarkerEditVisibleexpression: Represents the Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the presentation object const presentation = await app.ActivePresentation; // Get the slide show window const slideShowWindow = await presentation.SlideShowWindow; // Get the view object const view = await SlideShowWindow.View; // Show the marker toolbar view.MarkerEditVisible = true; setTimeout(() => { // Hide the marker toolbar after 3000 ms view.MarkerEditVisible = false; }, 3000) }
ActivePresentation.SlideShowWindow.View.PointerVisible
Gets or sets the visibility of annotations.
This feature is available in JavaScript SDK v1.1.10 and later.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.PointerVisibleexpression: Represents the Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the presentation object const presentation = await app.ActivePresentation; // Get the slide show window const slideShowWindow = await presentation.SlideShowWindow; // Get the view object const view = await SlideShowWindow.View; // Listen for the annotation visibility event app.Sub.SlideInkVisible = async (e) => { const { Data } = e; console.log(Data.showmark); setTimeout(() => { // Hide annotations after 3000 ms view.PointerVisible = false; }, 3000) } }
ActivePresentation.SlideShowWindow.View.IsBanSlideChange
Gets or sets whether slide changes are disabled.
This feature is available in JavaScript SDK v1.1.10 and later.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.IsBanSlideChangeexpression: Represents the Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the presentation object const presentation = await app.ActivePresentation; // Get the slide show window const slideShowWindow = await presentation.SlideShowWindow; // Get the view object const view = await SlideShowWindow.View; // Disable slide changes view.IsBanSlideChange = true; setTimeout(() => { // Enable slide changes after 3000 ms view.IsBanSlideChange = false; }, 3000) }
ActivePresentation.SlideShowWindow.View.ShowPage
Gets or sets whether to display page numbers in slide show mode.
-
This feature is available in JavaScript SDK v1.1.11 and later.
-
This feature is available on PC only.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.ShowPageexpression: Represents the Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the presentation object const presentation = await app.ActivePresentation; // Get the slide show window const slideShowWindow = await presentation.SlideShowWindow; // Get the view object const view = await SlideShowWindow.View; // Show page numbers view.ShowPage = true; }
PageSetup
ActivePresentation.PageSetup
Returns the PageSetup object.
-
Syntax
expression.ActivePresentation.PageSetupexpression: A variable that represents the Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the Presentation object const presentation = await app.ActivePresentation; // Get the PageSetup object const pageSetup = await presentation.PageSetup; }
Properties
ActivePresentation.PageSetup.SlideHeight
Returns the slide height.
-
Syntax
expression.ActivePresentation.PageSetup.SlideHeightexpression: A variable that represents the Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the Presentation object const presentation = await app.ActivePresentation; // Get the PageSetup object const pageSetup = await presentation.PageSetup; // Get the slide height const slideHeight = await pageSetup.SlideHeight; console.log(slideHeight); }
ActivePresentation.PageSetup.SlideWidth
Returns the slide width.
-
Syntax
expression.ActivePresentation.PageSetup.SlideWidthexpression: A variable that represents the Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the Presentation object const presentation = await app.ActivePresentation; // Get the PageSetup object const pageSetup = await presentation.PageSetup; // Get the slide width const slideWidth = await pageSetup.SlideWidth; console.log(slideWidth); }
ActivePresentation.PageSetup.SlideRatio
Returns the aspect ratio of the slide.
This feature is supported in JS-SDK V1.1.10 and later.
-
Syntax
expression.ActivePresentation.PageSetup.SlideRatioexpression: A variable that represents the Application object.
-
Return value
Property
Type
Description
Ratio
Number
The aspect ratio of the slide.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the Presentation object const presentation = await app.ActivePresentation; // Get the PageSetup object const pageSetup = await presentation.PageSetup; // Get the aspect ratio of the slide const slideRatio = await pageSetup.SlideRatio; console.log(slideRatio); }
ActivePresentation.PageSetup.SlideTop
Returns the top margin of the slide.
-
Syntax
expression.ActivePresentation.PageSetup.SlideTopexpression: A variable that represents the Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the Presentation object const presentation = await app.ActivePresentation; // Get the PageSetup object const pageSetup = await presentation.PageSetup; // Get the top margin const slideTop = await pageSetup.SlideTop; console.log(slideTop); }
ActivePresentation.PageSetup.SlideLeft
Returns the left margin of the slide.
-
Syntax
expression.ActivePresentation.PageSetup.SlideLeftexpression: A variable that represents the Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the Presentation object const presentation = await app.ActivePresentation; // Get the PageSetup object const pageSetup = await presentation.PageSetup; // Get the left margin const slideLeft = await pageSetup.SlideLeft; console.log(slideLeft); }
FillFormat
ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Fill
Represents the fill formatting for a shape.
This feature is supported in JavaScript SDK v1.1.11 and later.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Fillexpression: A variable representing the Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Gets the FillFormat object for the specified shape. const fillFormat = await app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Fill; }
Properties
ActivePresentation.SlideMaster.Background.Fill.Transparency
Gets or sets the fill transparency.
This feature is supported in JavaScript SDK v1.1.16 and later.
-
Syntax
expression.ActivePresentation.SlideMaster.Background.Fill.Transparencyexpression: A variable representing the Application object.
The value is a number in the range
[0, 1].A value of 0.0 means fully opaque, and a value of 1.0 means fully transparent.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Set the fill transparency for the slide master background. app.ActivePresentation.SlideMaster.Background.Fill.Transparency = 0.5; }
ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Fill.Visible
Gets or sets the visibility of the fill.
This feature is supported in JavaScript SDK v1.1.16 and later.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Fill.Visibleexpression: A variable representing the Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the visibility of the fill. await app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Fill.Visible; // Set the visibility of the fill. app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Fill.Visible = true; }
ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Fill.BackColor
Gets or sets the fill background color.
This feature is supported in JavaScript SDK v1.1.16 and later.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Fill.BackColorexpression: A variable representing the Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the fill background color. await app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Fill.BackColor.RGB; // Set the fill background color. app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Fill.BackColor = '#ff0000'; }
ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Fill.ForeColor
Gets or sets the fill foreground color.
This feature is supported in JavaScript SDK v1.1.16 and later.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Fill.ForeColorexpression: A variable representing the Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the fill foreground color. await app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Fill.ForeColor.RGB; // Set the fill foreground color. app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Fill.ForeColor = '#ff0000'; }
ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Fill.Type
Gets the fill type.
This feature is supported in JavaScript SDK v1.1.16 and later.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Fill.Typeexpression: A variable representing the Application object.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the fill type. await app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Fill.Type; }
LineFormat
ActivePresentation.SlideMaster.Background.Line
Represents the outline format for a shape.
Supported in JavaScript SDK v1.1.11 and later.
-
Syntax
expression.ActivePresentation.SlideMaster.Background.Lineexpression: A variable that represents the
Applicationobject. -
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the outline format object for the shape. const lineFormat = await app.ActivePresentation.SlideMaster.Background.Line; }
Properties
ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Line.Transparency
Gets or sets the transparency of the shape's outline.
Supported in JavaScript SDK v1.1.16 and later.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Line.Transparencyexpression: A variable that represents the
Applicationobject.The value is a number in the range of
[0.0, 1.0].A value of 0.0 means the outline is opaque, and a value of 1.0 means it is fully transparent.
-
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the outline's transparency. await app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Line.Transparency; // Set the outline's transparency. app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Line.Transparency = 0.5; }
ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Line.Visible
Gets or sets whether the shape's outline is visible.
Supported in JavaScript SDK v1.1.16 and later.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Line.Visibleexpression: A variable that represents the
Applicationobject. -
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the outline's visibility. await app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Line.Visible; // Set the outline's visibility. app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Line.Visible = true; }
ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Line.BackColor
Gets or sets the outline color.
Supported in JavaScript SDK v1.1.16 and later.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Line.BackColorexpression: A variable that represents the
Applicationobject. -
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the outline color. await app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Line.BackColor.RGB // Set the outline color. app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Line.BackColor = '#ff0000'; }
ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Line.Style
Gets or sets the line style of the outline.
Supported in JavaScript SDK v1.1.16 and later.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Line.Styleexpression: A variable that represents the
Applicationobject. -
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the line style of the outline. await app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Line.Style; // Set the line style of the outline. app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Line.Style = await app.Enum.MsoLineStyle.msoLineThickThin; }
ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Line.DashStyle
Gets or sets the dash style of the outline.
Supported in JavaScript SDK v1.1.16 and later.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Line.DashStyleexpression: A variable that represents the
Applicationobject. -
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the dash style of the outline. await app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Line.DashStyle; // Set the dash style of the outline. app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Line.DashStyle = await app.Enum.MsoLineDashStyle.msoLineDashDot; }
ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Line.Weight
Gets or sets the line weight of the outline, in points.
Supported in JavaScript SDK v1.1.16 and later.
-
Syntax
expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Line.Weightexpression: A variable that represents the
Applicationobject. -
Example
async function example() { await instance.ready(); const app = instance.Application; // Get the line weight of the outline. await app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Line.Weight; // Set the line weight of the outline. app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Line.Weight = 10; }