All Products
Search
Document Center

Intelligent Media Management:Presentation

Last Updated:Jun 20, 2025

This topic describes the API operations that are related to the Presentation object of presentation documents.

Presentation

ActivePresentation

Obtains a Presentation object.

  • Syntax

    expression.ActivePresentation

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the Presentation object.
      const presentation = await app.ActivePresentation;
    }

Methods

ActivePresentation.ExportAsFixedFormat()

You can export the current presentation as a PDF file or images and obtain the URL of the exported file by using the ExportAsFixedFormat() method.

  • Syntax

    expression.ActivePresentation.ExportAsFixedFormat({ RangeType, FrameSlides, FixedFormatType, ImgFormat, Dpi, Combine2LongPic, From, To, WaterMark })

    expression: the application object of the document type.

  • Parameters

    Property

    Data type

    Required

    Description

    RangeType

    Enum

    No

    The type of export range for the presentation. For more information, see the PpPrintRangeType section of the "Presentation" topic.

    FrameSlides

    Enum

    No

    Specifies whether the slides to be exported have borders. For more information, see the MsoTriState section of the "Presentation" topic.

    FixedFormatType

    Enum

    No

    The format of the exported file. Only image and PDF files are supported. The default value is 2, which specifies that the exported file is a PDF file. For more information, see the PpFixedFormatType section of the "Presentation" topic.

    ImgFormat

    Enum

    No

    The format of the exported image. This parameter takes effect only if the exported file is an image. The default value is 2, which specifies that the exported file is an image of the BMP format. For more information, see the PpExportImgFormatType section of the "Presentation" topic.

    Dpi

    Number

    No

    The quality of the exported image. This parameter takes effect only if the exported file is an image. Unit: ppi. Valid values: 96 to 2048. Default value: 96.

    Combine2LongPic

    Boolean

    No

    Specifies whether to export the multiple slides as a long image. This parameter takes effect only if the exported file is an image. Valid values:

    • false (default): exports each slide as an image.

    • true: exports specific slides as a long image.

    From

    Number

    No

    The start page of the slides to be exported. This parameter takes effect only if the presentation is exported as images. A value of 0 specifies that the current slide is the first slide to be exported.

    To

    Number

    No

    The end page of the slides to be exported. This parameter takes effect only if the presentation is exported as images.

    WaterMark

    Boolean

    No

    Specifies whether the exported file contains watermarks. Valid values:

    • false (default)

    • true

  • Return value

    Property

    Data type

    Description

    url

    String

    The URL of the exported file.

  • Examples

    • Export slides as a PDF file

      async function example() {
        await instance.ready();
      
        const app = instance.Application;
        
        // Export slides as a PDF file.
        const pdfUrl = await app.ActivePresentation.ExportAsFixedFormat();
        console.log(pdfUrl);
      }
    • Export slides as images

      async function example() {
        await instance.ready();
      
        const app = instance.Application;
        
        // Export slides as images.
        const imgUrl = await app.ActivePresentation.ExportAsFixedFormat({
          FixedFormatType: app.Enum.PpFixedFormatType.ppFixedFormatTypeIMG,
          From: 0,
          To: 1,
        });
        console.log(imgUrl);
      }

ActivePresentation.GetOperatorsInfo()

You can obtain information about the current operator by using the GetOperatorsInfo() method.

  • Syntax

    expression.ActivePresentation.GetOperatorsInfo()

    expression: the application object of the document type.

  • Return values

    Object object

    Property

    Data type

    Description

    type

    String

    The type of the request.

    response

    Object

    The information about the operator.

    Response structure

    Property

    Data type

    Description

    id

    String

    The user ID.

    avatar_url

    String

    The profile picture of the user.

    logined

    String

    The logon status of the user.

    name

    String

    The name of the user.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the information about the current operator.
      const operatorsInfo = await app.ActivePresentation.GetOperatorsInfo();
      console.log(operatorsInfo);
    }

ActivePresentation.GetRemarkList()

You can obtain the remarks of all slides by using the GetRemarkList() method.

  • Syntax

    expression.ActivePresentation.GetRemarkList()

    expression: the application object of the document type.

  • Return value

    Property

    Data type

    Description

    remarkList

    Array

    The remarks.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the remarks of all slides.
      const operatorsInfo = await app.ActivePresentation.GetRemarkList();
      console.log(operatorsInfo);
    }

ActivePresentation.GetSlideRemark()

You can obtain the remarks of a slide by using the GetSlideRemark() method.

  • Syntax

    expression.ActivePresentation.GetSlideRemark()

    expression: the application object of the document type.

  • Parameter

    Property

    Data type

    Required

    Description

    SlideIndex

    Number

    No

    The index number of the slide. The value is a positive integer greater than or equal to 1 and less than the total number of slides in the presentation. Default value: the index number of the current slide.

  • Return value

    Property

    Data type

    Description

    remarkList

    Array

    The remarks.

  • 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()

You can exit the slide show by using the ExitVideoFullscreen() method.

  • Syntax

    expression.ActivePresentation.ExitVideoFullscreen()

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Exit the slide show.
      const operatorsInfo = await app.ActivePresentation.ExitVideoFullscreen();
      console.log(operatorsInfo);
    }

ActivePresentation.MiniThumbnailVisibleInfo()

You can listen to the event that occurs when a mini thumbnail is opened or closed by using the MiniThumbnailVisibleInfo() method.

  • Syntax

    expression.ActivePresentation.MiniThumbnailVisibleInfo()

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Listen to the event that occurs when a mini thumbnail is opened or closed.
      const operatorsInfo = await app.ActivePresentation.MiniThumbnailVisibleInfo();
      console.log(operatorsInfo);
    }

ActivePresentation.Save()

You can save changes in a presentation by using the Save() method.

Important

Only JavaScript SDK V1.1.9 and later support this feature.

  • Syntax

    expression.ActivePresentation.Save()

    expression: the application object of the document type.

  • Return values

    Property

    Data type

    Description

    result

    String

    The save status of the file.

    size

    Number

    The size of the file. Unit: bytes.

    version

    Number

    The version number of the file.

  • Description of the save status

    Save status

    Description

    ok

    The version of the file is saved. You can view the version in historical versions of the file.

    nochange

    The file is not updated. You do not need to save the version.

    SavedEmptyFile

    An empty file is saved. This state is not supported.

    Scenario: The file is empty after the kernel is saved.

    SpaceFull

    The storage space is full.

    QueneFull

    Frequent saving operations are performed when the presentation is being saved.

    Scenario: The saving operation queue is full on the server and the saving operation is in queue.

    fail

    The presentation failed to be saved.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Save changes in the presentation.
      const saveResult = await app.ActivePresentation.Save();
      console.log(saveResult);
    }

ActivePresentation.PlayTriggerAnim()

You can play a trigger animation by using the PlayTriggerAnim() method.

  • Syntax

    expression.ActivePresentation.PlayTriggerAnim()

    expression: the application object of the document type.

  • Parameters

    Property

    Data type

    Required

    Description

    TargetShapeId

    Number

    Yes

    The trigger ID.

    SlideCategory

    String

    Yes

    The trigger type.

    Steps

    Number

    No

    The number of steps.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Play the trigger animation.
      await app.ActivePresentation.PlayTriggerAnim(TargetShapeId, SlideCategory);
    }

ActivePresentation.GetDiagramContainer()

You can obtain the container document object model (DOM) of a diagram group by using the GetDiagramContainer() method. Before you use this method, you must select a diagram group.

  • Procedure

    1. Select the diagram group.

    2. Call the ActivePresentation.GetDiagramContainer() operation.

    3. Obtain the DOM information.

  • Syntax

    expression.ActivePresentation.GetDiagramContainer()

    expression: the application object of the document type.

  • Return value

    null or a value of the String type that indicates the ID of the selected DOM node.

  • Example

    //@file=base.pptx
    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the container DOM of the diagram group. Before you call this operation, you must select the diagram group.
      const d = await app.ActivePresentation.GetDiagramContainer();
      console.log ('The obtained content:', d);
    }

ActivePresentation.GetDiagramInfo()

You can obtain the information about the selected diagram group by using the GetDiagramInfo() method.

  • Procedure

    1. Select a diagram group.

    2. Call the ActivePresentation.GetDiagramInfo() operation.

    3. Obtain the information about the selected diagram group.

  • Syntax

    expression.ActivePresentation.GetDiagramInfo()

    expression: the application object of the document type.

  • Return value

    null or the ID of the selected DOM node.

  • Example

    //@file=base.pptx
    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the information about the selected diagram group.
      const info = await app.ActivePresentation.GetDiagramInfo();
      console.log ('The obtained content:', info);
    }

ActivePresentation.SetOpenMarkerInkEdit()

You can enable the ink tool or save the ink and disable the ink tool by using the SetOpenMarkerInkEdit() method.

  • Syntax

    expression.ActivePresentation.SetOpenMarkerInkEdit({ Open })

    expression: the application object of the document type.

  • Parameter

    Property

    Data type

    Required

    Description

    Open

    Boolean

    No

    Specifies whether to enable the ink tool or save the ink and disable the ink tool. Valid values:

    • true (default): enables ink tool.

    • false: saves the ink and disables ink tool.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Enable ink tool.
      await app.ActivePresentation.SetOpenMarkerInkEdit(true);
    
      setTimeout(async () => {
        // Save the ink and disable ink tool after 5,000 milliseconds.
        await app.ActivePresentation.SetOpenMarkerInkEdit(false);
      }, 5000);
    }

ActivePresentation.GetDiagramPPTInfo()

You can obtain the URL of a slide that contains the selected diagram group by using the GetDiagramPPTInfo() method.

Important

Only JavaScript SDK V1.1.10 and later support this feature.

  • Syntax

    expression.ActivePresentation.GetDiagramPPTInfo({ Type })

    expression: the application object of the document type.

  • Parameter

    Property

    Data type

    Required

    Description

    Type

    Number

    No

    The purpose of obtaining the URL. Valid values:

    • 1 (default): obtains preview information.

    • 2: obtains information to beautify the presentation.

  • Return values

    Property

    Data type

    Description

    id

    String

    The file ID.

    connid

    String

    The connection ID.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Obtain the URL of the slide that contains the selected diagram group.
      await app.ActivePresentation.GetDiagramPPTInfo({ Type: 2 });
    }

ActivePresentation.BeautifyDiagram()

You can replace the diagram of the current slide by using the BeautifyDiagram() method.

Important

Only JavaScript SDK V1.1.10 and later support this feature.

  • Procedure

    1. Select the diagram.

    2. Click Style.

    3. Select a style to beautify the current slide and obtain the value of UploadId.

    4. Replace the diagram of the current slide by calling the ActivePresentation.BeautifyDiagram operation.

  • Syntax

    expression.ActivePresentation.BeautifyDiagram({ UploadId })

    expression: the application object of the document type.

  • Parameter

    Property

    Data type

    Required

    Description

    UploadId

    String

    No

    The ID of the beautified slide.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Replace the diagram of the current slide.
      await app.ActivePresentation.BeautifyDiagram('xxx');
    }

ActivePresentation.InsertDiagram()

You can insert a diagram by using the InsertDiagram() method.

Important

Only JavaScript SDK V1.1.11 and later support this feature.

  • Syntax

    expression.ActivePresentation.InsertDiagram({ Url })

    expression: the application object of the document type.

  • Parameter

    Property

    Data 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()

You can obtain the source image of the selected image or the URL of the source image by using the GetActiveShapeImg() method.

Important

Only JavaScript SDK V1.1.11 and later support this feature.

  • Syntax

    expression.ActivePresentation.GetActiveShapeImg({ IsOrigin })

    expression: the application object of the document type.

  • Parameter

    Property

    Data type

    Required

    Description

    IsOrigin

    Boolean

    No

    Specifies whether to obtain the URL of the source image. Valid values:

    • false (default)

    • true

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the source image of the selected image or the URL of the source image.
      await app.ActivePresentation.GetActiveShapeImg(true);
    }

ActivePresentation.FetchDownloadUrl()

You can obtain URL of the source file of the presentation by using the FetchDownloadUrl() method.

Important

Only JavaScript SDK V1.1.14 and later support this feature.

  • Syntax

    expression.ActivePresentation.FetchDownloadUrl()

    expression: the application object of the document type.

  • Return value

    A value of the String type, which indicates the URL of the source file of the presentation.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the URL of the source file of the presentation.
      const url = await app.ActivePresentation.FetchDownloadUrl();
    }

ActivePresentation.ReplaceActiveSlide()

You can replace the current slide by using the ReplaceActiveSlide() method.

  • Syntax

    expression.ActivePresentation.ReplaceActiveSlide({ UploadId, FileKey })

    expression: the application object of the document type.

  • Parameter

    Property

    Data type

    Required

    Description

    UploadId

    String

    No

    The return data from the server after the file is uploaded.

    FileKey

    String

    No

    The key that is used by the kernel to decrypt the file.

  • Return value

    { type: 'success' } if the operation is successful.

    { type: 'error' } if the operation failed.

  • 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

You can check whether the current presentation is read-only by using the ReadOnly property.

Important

Only JavaScript SDK V1.1.14 and later support this feature.

  • Syntax

    expression.ActivePresentation.ReadOnly

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Check whether the presentation is read-only.
      const ReadOnly = await app.ActivePresentation.ReadOnly;
    }

ActivePresentation.ReadOnlyComment

You can check whether the current presentation is read-only and allows comments by using the ReadOnlyComment property.

Important

Only JavaScript SDK V1.1.15 and later support this feature.

  • Syntax

    expression.ActivePresentation.ReadOnlyComment

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Check whether the current presentation is read-only and allows comments.
      const ReadOnlyComment = await app.ActivePresentation.ReadOnlyComment;
    }

ActivePresentation.SupportReadOnlyComment

You can check whether the current presentation can be read-only and allow comments by using the SupportReadOnlyComment property.

Important

Only JavaScript SDK V1.1.15 and later support this feature.

  • Syntax

    expression.ActivePresentation.SupportReadOnlyComment

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Check whether the current presentation can be read-only and allow comments.
      const SupportReadOnlyComment = await app.ActivePresentation.SupportReadOnlyComment;
    }

Slides

ActivePresentation.Slides

Obtains a Slides object.

  • Syntax

    expression.ActivePresentation.Slides

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the Presentation object.
      const presentation = await app.ActivePresentation;
    
      // Obtain the Slides object.
      const view = await presentation.Slides;
    }

Methods

ActivePresentation.Slides.AddSlide()

You can insert a new slide into a presentation by using the AddSlide() method.

Important

Only JavaScript SDK V1.1.10 and later support this feature.

  • Syntax

    expression.ActivePresentation.Slides.AddSlide()

    expression: the application object of the document type.

  • Parameters

    Property

    Data type

    Required

    Description

    Index

    Number

    No

    The location where the new slide is inserted.

    If you do not specify this parameter or set this parameter to a negative value, the new slide is inserted after the current slide.

    CustomLayout

    Object

    No

    The local layout to be used for the new slide.

    If you do not specify this parameter, a blank slide is inserted.

    LayoutUrl

    String

    No

    The URL of the online layout to be used for the new slide.

    If you specify this parameter, the CustomlayoutType parameter does not take effect. In this case, the new slide uses the specified online layout, and a Promise object is returned to indicate whether the operation is successful.

    LayoutIndex

    Number

    No

    The index number of the online layout to be used for the new slide.

    This parameter is valid only if you specify the layoutUrl parameter.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      // Insert a blank slide.
      const Index = app.ActivePresentation.SlideShowWindow.View.Slide.SlideIndex;
      await app.ActivePresentation.Slides.AddSlide(Index);
    }

ActivePresentation.Slides.FindBySlideID()

You can obtain the information about a slide based on slide ID by using the FindBySlideID() method.

Important

Only JavaScript SDK V1.1.10 and later support this feature.

  • Syntax

    expression.ActivePresentation.Slides.FindBySlideID2()

    expression: the application object of the document type.

  • Parameter

    Property

    Data type

    Required

    Description

    SlideID

    Number

    Yes

    The slide ID. You can obtain the slide ID by using the ActivePresentation.SlideShowWindow.View.Slide.SlideID property of the Slide object.

  • Return value

    The information about the slide.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the slide ID of the current slide.
      const slideId = await app.ActivePresentation.SlideShowWindow.View.Slide.SlideID;
      console.log(slideId);
    
      // Obtain information about the slide based on the slide ID.
      const info = await app.ActivePresentation.Slides.FindBySlideID2(slideId);
      console.log(info);
    }

ActivePresentation.Slides.Item()

You can obtain a single Slides object by using the Item() method.

Important

Only JavaScript SDK V1.1.14 and later support this feature.

  • Syntax

    expression.ActivePresentation.Slides.Item()

    expression: the application object of the document type.

  • Parameter

    Property

    Data type

    Required

    Description

    Index

    Number

    Yes

    The index number of the slide.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      // Obtain the single Slides object.
      await app.ActivePresentation.Slides.Item(1);
    }

Properties

ActivePresentation.Slides.Count

You can obtain the number of slides by using the Count property.

  • Syntax

    expression.ActivePresentation.Slides.Count

    expression: the application object of the document type.

  • Return value

    The total number of slides.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the Presentation object.
      const presentation = await app.ActivePresentation;
    
      // Obtain the Slides object.
      const slides = await presentation.Slides;
    
      // Obtain the total number of slides.
      const count = await slides.Count;
      console.log(count);
    }

ActivePresentation.Slides.Comments

You can obtain a Comments object by using the Comments property.

Important

Only JavaScript SDK V1.1.14 and later support this feature.

  • Syntax

    expression.ActivePresentation.Slides.Comments

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the Presentation object.
      const presentation = await app.ActivePresentation;
    
      // Obtain the Slides object.
      const view = await presentation.Slides;
    
      // Obtain the Comments object.
      await slides.Comments;
    }

Slide

Properties

ActivePresentation.SlideShowWindow.View.Slide.SlideID

You can obtain the slide ID of the current slide by using the SlideID property.

Important

Only JavaScript SDK V1.1.10 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.Slide.SlideID

    expression: the application object of the document type.

  • Return value

    A value of the Number type, which indicates the slide ID.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the slide ID of the current slide.
      const slideId = await app.ActivePresentation.SlideShowWindow.View.Slide.SlideID;
      console.log(slideId);
    }

ActivePresentation.SlideShowWindow.View.Slide.SlideIndex

You can obtain the index number of the current slide by using the SlideIndex property.

Important

Only JavaScript SDK V1.1.10 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.Slide.SlideIndex

    expression: the application object of the document type.

  • Return value

    A value of the Number type, which indicates the index number of the current slide.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the index number of the current slide.
      const curryPage = await app.ActivePresentation.SlideShowWindow.View.Slide.SlideIndex;
      console.log(curryPage);
    }

ActivePresentation.SlideShowWindow.View.Slide.Tags

You can obtain the tags of the current slide by using the Tags property.

Important

Only JavaScript SDK V1.1.14 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.Slide.Tags

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the tags of the current slide.
      const Tags = app.ActivePresentation.SlideShowWindow.View.Slide.Tags;
    }

ActivePresentation.SlideShowWindow.View.Slide.Shapes

You can obtain all objects that are placed on or inserted into the drawing layer of a slide, slide master, or slide group by using the Shapes property.

Important

Only JavaScript SDK V1.1.14 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain all objects that are placed on or inserted into the drawing layer of a slide, slide master, or slide group.
      const Shapes = app.ActivePresentation.SlideShowWindow.View.Slide.Shapes;
    }

ActivePresentation.SlideShowWindow.View.Slide.Hyperlinks

You can obtain all hyperlinks in a slide by using the Hyperlinks property.

Important

Only JavaScript SDK V1.1.14 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.Slide.Hyperlinks

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain all hyperlinks in the specified slide.
      const Hyperlinks = app.ActivePresentation.SlideShowWindow.View.Slide.Hyperlinks;
    }

SlideShowSettings

ActivePresentation.SlideShowSettings

Obtains the SlideShowSettings object.

  • Syntax

    expression.ActivePresentation.SlideShowSettings

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the Presentation object.
      const presentation = await app.ActivePresentation;
    
      // Obtain the SlideShowSettings object.
      const slideShowSettings = await presentation.SlideShowSettings;
    }

Methods

ActivePresentation.SlideShowSettings.Run()

You can switch to the slide show mode by using the Run() method.

  • Syntax

    expression.ActivePresentation.SlideShowSettings.Run()

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Obtain the SlideShowSettings object.
      const SlideShowSettings = await app.ActivePresentation.SlideShowSettings;
    
      // Switch to the slide show mode.
      await SlideShowSettings.Run();
    }

ActivePresentation.SlideShowSettings.SetMiniThumbnailVisible()

You can specify whether to show the mini thumbnails by using the SetMiniThumbnailVisible() method.

Important
  • Only JavaScript SDK V1.1.10 and later support this feature.

  • Only PCs support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowSettings.SetMiniThumbnailVisible()

    expression: the application object of the document type.

  • Parameter

    Property

    Data type

    Required

    Description

    Visible

    Boolean

    Yes

    Specifies whether to show the mini thumbnails. Valid values:

    • false (default)

    • true

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Show the mini thumbnails.
      await app.ActivePresentation.SlideShowSettings.SetMiniThumbnailVisible(true);
    }

ActivePresentation.SlideShowSettings.SetPlayToolbarPosition()

You can modify the style of the toolbar in the slide show mode by using the SetPlayToolbarPosition() method.

Important
  • Only JavaScript SDK V1.1.14 and later support this feature.

  • Only PCs support this feature.

  • This API provides high flexibility. We recommend that you modify the style by using top, left, right, bottom, and translate. Otherwise, specific features may be affected due to the modification of the style.

  • Syntax

    expression.ActivePresentation.SlideShowSettings.SetPlayToolbarPosition({ Style })

    expression: the application object of the document type.

  • Parameter

    Property

    Data type

    Required

    Description

    Style

    Object

    Yes

    The style of the toolbar. Valid values:

    • Show: the style when the toolbar is displayed. Format: { left: '100px' }.

    • Hidden: the style when the toolbar is hidden.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Obtain the SlideShowSettings object.
      const SlideShowSettings = await app.ActivePresentation.SlideShowSettings;
    
      // Switch to the slide show mode.
      await SlideShowSettings.Run();
    
      // Modify the style of the toolbar.
      await SlideShowSettings.SetPlayToolbarPosition({
        Style: {
          Show: { top: '10px' }, // The position of the toolbar when it is displayed.
          Hidden: { top: '-100px' }, // The position of the toolbar when it is hidden.
        },
      });
    }

ActivePresentation.SlideShowSettings.SetPlayInkPosition()

You can modify the style of the ink tool in the slide show mode by using the SetPlayInkPosition() method.

Important
  • Only JavaScript SDK V1.1.14 and later support this feature.

  • Only PCs support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowSettings.SetPlayInkPosition({ Style })

    expression: the application object of the document type.

  • Parameter

    Property

    Data type

    Required

    Description

    Style

    Object

    Yes

    The style of the ink tool. The parameter is in the JSON format, such as { background: 'deepskyblue' }.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Obtain the SlideShowSettings object.
      const SlideShowSettings = await app.ActivePresentation.SlideShowSettings;
    
      // Switch to the slide show mode.
      await SlideShowSettings.Run();
    
      // Modify the style of the ink tool.
      await SlideShowSettings.SetPlayInkPosition({
        Style: { background: 'deepskyblue' },
      });
    }

ActivePresentation.SlideShowSettings.OpenRemarkSpeaker()

You can enable the remark view in the slide show mode by using the OpenRemarkSpeaker() method.

Important

Only JavaScript SDK V1.1.14 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowSettings.OpenRemarkSpeaker()

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Obtain the SlideShowSettings object.
      const SlideShowSettings = await app.ActivePresentation.SlideShowSettings;
    
      // Switch to the slide show mode.
      await SlideShowSettings.Run();
    
      // Enable the remark view.
      await SlideShowSettings.OpenRemarkSpeaker();
    }

ActivePresentation.SlideShowSettings.SetCountDown()

You can enable countdown in the slide show mode by using the SetCountDown() method.

Important
  • Only JavaScript SDK V1.1.14 and later support this feature.

  • Only PCs support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowSettings.SetCountDown()

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Obtain the SlideShowSettings object.
      const SlideShowSettings = await app.ActivePresentation.SlideShowSettings;
    
      // Switch to the slide show mode.
      await SlideShowSettings.Run();
    
      // Enable countdown.
      await SlideShowSettings.SetCountDown();
    }

ActivePresentation.SlideShowSettings.StartAutoPlay()

You can enable autoplay in the slide show mode by using the StartAutoPlay() method.

Important
  • Only JavaScript SDK V1.1.14 and later support this feature.

  • Only PCs support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowSettings.StartAutoPlay()

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Obtain the SlideShowSettings object.
      const SlideShowSettings = await app.ActivePresentation.SlideShowSettings;
    
      // Switch to the slide show mode.
      await SlideShowSettings.Run();
    
      // Enable autoplay.
      await SlideShowSettings.StartAutoPlay();
    }

ActivePresentation.SlideShowWindow.View.StopAutoPlay()

You can disable autoplay by using the StopAutoPlay() method.

Important
  • Only JavaScript SDK V1.1.10 and later support this feature.

  • Only PCs support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.StopAutoPlay()

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Obtain the SlideShowSettings object.
      const SlideShowSettings = await app.ActivePresentation.SlideShowSettings;
    
      // Switch to the slide show mode.
      await SlideShowSettings.Run();
    
      // Disable autoplay.
      await SlideShowSettings.StopAutoPlay();
    }

Properties

ActivePresentation.SlideShowSettings.ShowPlayToolbar

You can specify whether to display the toolbar in the slide show mode by using the ShowPlayToolbar property.

Important
  • Only JavaScript SDK V1.1.14 and later support this feature.

  • Only PCs support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowSettings.ShowPlayToolbar = Boolean

    expression: the application object of the document type.

    The value of the expression is of the BOOLEAN type. A value of true specifies that the toolbar is displayed. A value of false specifies that the toolbar is hidden.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Hide the toolbar.
      app.ActivePresentation.SlideShowSettings.ShowPlayToolbar = false;
    }

Ink

ActivePresentation.SlideShowSettings.Ink

Obtains an Ink object.

Important

Only JavaScript SDK V1.1.14 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowSettings.Ink

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the Ink object.
      await app.ActivePresentation.SlideShowSettings.Ink;
    }

Method

ActivePresentation.SlideShowSettings.Ink.Delete

You can erase ink by using the Delete method.

  • Syntax

    expression.ActivePresentation.SlideShowSettings.Ink.Delete

    expression: the application object of the document type.

  • Parameters

    Property

    Data type

    Required

    Description

    Type

    Number

    No

    The type of erasure. Valid values:

    • 0: erases a stroke of ink.

    • 1 (default): erases all ink from a page.

    • 2: erases all ink from the document.

    Position

    Object

    No

    The range of erasure. Format: {clientX: number, clientY: number}.

    Note

    This parameter takes effect only if the Type parameter is set to 0. The value of this parameter specifies a position relative to the window.

  • Example

    //@file=base.pptx
    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Erase ink.
      await app.ActivePresentation.SlideShowSettings.Ink.Delete;
        
    }

Properties

ActivePresentation.SlideShowSettings.Ink.Color

You can specify the color of ink by using the Color property.

Important

Only JavaScript SDK V1.1.14 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowSettings.Ink.Color

    expression: the application object of the document type.

  • Parameter

    Property

    Data type

    Required

    Description

    Color

    String

    Yes

    The ink color. The value is a hexadecimal color code. For example, #FFFFFF specifies white.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Specify the ink color.
      await app.ActivePresentation.SlideShowSettings.Ink.Color = '#8bc34a';
    }

ActivePresentation.SlideShowSettings.Ink.Width

You can specify the width of ink by using the Width property.

Important

Only JavaScript SDK V1.1.14 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowSettings.Ink.Width

    expression: the application object of the document type.

  • Parameter

    Property

    Data type

    Required

    Description

    Width

    Number

    Yes

    The width of ink. Valid values:

    • Valid values for PCs: 1 to 16.

    • Valid values for mobile clients: 1 to 30.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Set the width of ink to 10.
      await app.ActivePresentation.SlideShowSettings.Ink.Width = 10;
    }
    

ActivePresentation.SlideShowSettings.Ink.Type

You can specify the type of ink pointer by using the Type property.

Important

Only JavaScript SDK V1.1.14 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowSettings.Ink.Type

    expression: the application object of the document type.

  • Parameter

Property

Data type

Required

Description

Type

Number

Yes

The type of ink pointer. A value of 0 specifies color pen. A value of 1 specifies highlighter. A value of 2 specifies smart pen.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Set the type of the ink pointer to highlighter.
      await app.ActivePresentation.SlideShowSettings.Ink.Type = 1;
    }

SlideShowWindow

ActivePresentation.SlideShowWindow

Obtains the slide show window of the presentation.

  • Syntax

    expression.ActivePresentation.SlideShowWindow

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the Presentation object.
      const presentation = await app.ActivePresentation;
    
      // Obtain the slide show window.
      const slideShowWindow = await presentation.SlideShowWindow;
    }

Property

ActivePresentation.SlideShowWindow.IsFullScreen

You can specify the full-screen mode for the slide show window by using the IsFullScreen property.

Important

Only JavaScript SDK V1.1.10 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.IsFullScreen

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the Presentation object.
      const presentation = await app.ActivePresentation;
    
      // Obtain the slide show window.
      const slideShowWindow = await presentation.SlideShowWindow;
    
      // Specify the full-screen mode for the slide show window.
      SlideShowWindow.IsFullScreen = true;
    
      setTimeout(() => {
        // Exit the slide show after 3,000 milliseconds.
        SlideShowWindow.IsFullScreen = false;
      }, 3000)
    }

SlideShowView

ActivePresentation.SlideShowWindow.View

Obtains the view in the slide show window of the presentation.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the Presentation object.
      const presentation = await app.ActivePresentation;
    
      // Obtain the slide show window.
      const slideShowWindow = await presentation.SlideShowWindow;
    
      // Obtain the view in the slide show window.
      const slideShowView = await slideShowWindow.View;
    }

Methods

ActivePresentation.SlideShowWindow.View.Exit()

You can exit the slide show by using the Exit() method.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.Exit()

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Obtain the SlideShowSettings object.
      const SlideShowSettings = await app.ActivePresentation.SlideShowSettings;
    
      // Switch to the slide show mode.
      await SlideShowSettings.Run();
    
      // Exit the slide show after 5,000 milliseconds.
      setTimeout(async () => {
        await app.ActivePresentation.SlideShowWindow.View.Exit();
      }, 5000);
    }

ActivePresentation.SlideShowWindow.View.GetClickCount()

You can obtain the number of animations on the current slide by using the GetClickCount() method.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.GetClickCount()

    expression: the application object of the document type.

  • Return value

    A value of the Number type, which indicates the number of animations on the current slide.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Obtain the SlideShowSettings object.
      const SlideShowSettings = await app.ActivePresentation.SlideShowSettings;
    
      // Switch to the slide show mode.
      await SlideShowSettings.Run();
    
      // Obtain the number of animations on the current slide.
      const clickCount = await app.ActivePresentation.SlideShowWindow.View.GetClickCount();
      console.log(clickCount);
    }

ActivePresentation.SlideShowWindow.View.GetClickIndex()

By using the GetClickIndex() method, you can obtain the index number of the current mouse click for an animation that is actively playing on a slide or has just finished.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.GetClickIndex()

    expression: the application object of the document type.

  • Return value

    A value of the Number type, which indicates the index number of the current mouse click for an animation.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Obtain the SlideShowSettings object.
      const SlideShowSettings = await app.ActivePresentation.SlideShowSettings;
    
      // Switch to the slide show mode.
      await SlideShowSettings.Run();
    
      // Obtain the index number of the current mouse click for an animation.
      const index = await app.ActivePresentation.SlideShowWindow.View.GetClickIndex();
      console.log(index);
    }

ActivePresentation.SlideShowWindow.View.GotoNextClick()

You can advance to the next animation by using the GotoNextClick() method.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.GotoNextClick()

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Obtain the SlideShowSettings object.
      const SlideShowSettings = await app.ActivePresentation.SlideShowSettings;
    
      // Switch to the slide show mode.
      await SlideShowSettings.Run();
    
      // Advance to the next animation after 2,000 milliseconds.
      setTimeout(async () => {
        await app.ActivePresentation.SlideShowWindow.View.GotoNextClick();
      }, 2000);
    }

ActivePresentation.SlideShowWindow.View.GotoPreClick()

You can return to the previous animation by using the GotoPreClick() method.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.GotoPreClick()

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Obtain the SlideShowSettings object.
      const SlideShowSettings = await app.ActivePresentation.SlideShowSettings;
    
      // Switch to the slide show mode.
      await SlideShowSettings.Run();
    
      // Return to the previous animation after 2,000 milliseconds.
      setTimeout(async () => {
        await app.ActivePresentation.SlideShowWindow.View.GotoPreClick();
      }, 2000);
    }

ActivePresentation.SlideShowWindow.View.GotoSlide()

You can jump to a slide by using the GotoSlide() method.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.GotoSlide({ Index })

    expression: the application object of the document type.

  • Parameter

    Property

    Data type

    Required

    Description

    Index

    Number

    Yes

    The index number of the slide that you want to jump to.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Jump to the third page.
      await app.ActivePresentation.SlideShowWindow.View.GotoSlide(3);
    }

ActivePresentation.SlideShowWindow.View.GotoClick()

You can jump to an animation on a slide by using the GotoClick() method.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.GotoClick(number)

    expression: the application object of the document type.

  • Parameter

    Property

    Data type

    Description

    number

    Number

    The subscript of the current slide animation.

  • Example

    //@file=base.ppt
    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the SlideShowSettings object.
      const SlideShowSettings = await app.ActivePresentation.SlideShowSettings;
      // Enter the slide show mode.
      await SlideShowSettings.Run();
    
      // Obtain the SlideShowWindow object.
      const SlideShowWindow = await app.ActivePresentation.SlideShowWindow;
    
      // Obtain the View object.
      const view = await SlideShowWindow.View;
    
      // Jump to the second animation on the slide.
      await view.GotoClick(2);
    }

ActivePresentation.SlideShowWindow.View.Play()

You can play an animation on a slide by using the Play() method.

Important

Only JavaScript SDK V1.1.10 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.Play(slideIndex, animateIndex)

    expression: the application object of the document type.

  • Parameters

    Property

    Data type

    Description

    slideIndex

    Number

    The index number of the slide.

    animateIndex

    Number

    The index number of the animation on the slide.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the SlideShowSettings object.
      const SlideShowSettings = await app.ActivePresentation.SlideShowSettings;  
      
      // Enter the slide show mode.
      await SlideShowSettings.Run();
    
      // Obtain the slide show window.
      const SlideShowWindow = await app.ActivePresentation.SlideShowWindow;
    
      // Obtain the view in the slide show window.
      const view = await slideShowWindow.View;
    
      // Play from the first animation on the first slide.
      await view.Play(1, 1);
    }

ActivePresentation.SlideShowWindow.View.SetLaserPenData()

You can synchronize the information about laser pointer by using the SetLaserPenData() method.

Important

Only JavaScript SDK V1.1.10 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.SetLaserPenData(Data)

    expression: the application object of the document type.

  • Parameter

    Property

    Data type

    Description

    Data

    Object

    The information about the laser pointer.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the SlideShowSettings object.
      const SlideShowSettings = await app.ActivePresentation.SlideShowSettings;  
      
      // Enter the slide show mode.
      await SlideShowSettings.Run();
    
      // Obtain the slide show window.
      const SlideShowWindow = await app.ActivePresentation.SlideShowWindow;
    
      // Obtain the view in the slide show window.
      const view = await slideShowWindow.View;
    
      // Specify a listener that listens to the laser pointer.
      app.Sub.SlideLaserPenInkPointsChanged = async (e) => {
        const { Data } = e;
        console.log(Data);
    
        // Synchronize the information about the laser pointer.
        await view.SetLaserPenData(Data);
      }
    }

ActivePresentation.SlideShowWindow.View.SetMediaObj()

You can synchronize the information about a video playback by using the SetMediaObj() method.

Important

Only JavaScript SDK V1.1.10 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.SetMediaObj(Data)

    expression: the application object of the document type.

  • Parameter

    Property

    Data type

    Description

    Data

    Object

    The video playback information.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the SlideShowSettings object.
      const SlideShowSettings = await app.ActivePresentation.SlideShowSettings;  
      
      // Enter the slide show mode.
      await SlideShowSettings.Run();
    
      // Obtain the slide show window.
      const SlideShowWindow = await app.ActivePresentation.SlideShowWindow;
    
      // Obtain the view in the slide show window.
      const view = await slideShowWindow.View;
    
      // Specify a listener that listens to changes in the status of the video playback.
      app.Sub.SlideMediaChanged = async (e) => {
        const { Data } = e;
        console.log(Data);
    
        // Synchronize the information about the video playback.
        await view.SetMediaObj(Data);
      }
    }

ActivePresentation.SlideShowWindow.View.DestroyMediaPlayer()

You can destroy the video player by using the DestroyMediaPlayer() method.

Important
  • Only JavaScript SDK V1.1.10 and later support this feature.

  • Only mobile devices support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.DestroyMediaPlayer()

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the SlideShowSettings object.
      const SlideShowSettings = await app.ActivePresentation.SlideShowSettings;  
      
      // Enter the slide show mode.
      await SlideShowSettings.Run();
    
      // Obtain the slide show window.
      const SlideShowWindow = await app.ActivePresentation.SlideShowWindow;
    
      // Obtain the view in the slide show window.
      const view = await slideShowWindow.View;
    
      // Specify a listener that listens to changes in the status of a video playback.
      app.Sub.SlideMediaChanged = async (e) => {
        const { Data } = e;
        console.log(Data);
        setTimeout(async () => {
          // Destroy the video player after 3,000 milliseconds.
          await view.DestroyMediaPlayer(Data);
        }, 3000); 
      }
    }

ActivePresentation.SlideShowWindow.View.SetToolVisible()

You can specify a tool to be hidden after entering the slide show mode by using the SetToolVisible() method.

Important

Only JavaScript SDK V1.1.10 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.SetToolVisible(toolName, flag)

    expression: the application object of the document type.

  • Parameters

    Property

    Data type

    Description

    toolName

    String

    The name of the tool.

    flag

    Boolean

    Specifies whether to display the tool. Valid values:

    • false

    • true

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
     
      // Obtain the Presentation object.
      const presentation = await app.ActivePresentation;
    
      // Obtain the slide show window.
      const slideShowWindow = await presentation.SlideShowWindow;
    
      // Obtain the View object.
      const view = await slideShowWindow.View;
    
      const linkTip=app.Enum.PpToolType.pcPlayHoverLink // Hover hyperlink.
      const imageTip=app.Enum.PpToolType.pcImageHoverTip // Hover image.
      const menu=app.Enum.PpToolType.pcPlayingMenu // Right-click menu. 
    
      // Hide the tool after 2,000 milliseconds.
      setTimeout(() => {
        // Hide the specified tool after entering the slide show mode.
        view.SetToolVisible(linkTip, false);
        view.SetToolVisible(imageTip, false);
        view.SetToolVisible(menu, false);
      }, 2000)
    }

Properties

ActivePresentation.SlideShowWindow.View.State

You can obtain the state of the current slide by using the State property.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.State

    expression: the application object of the document type.

  • Return value

    Property

    Data type

    Description

    state

    String

    The state of the current slide. Valid values:

    • edit: The current slide is in the edit mode.

    • play: The current slide is in the slide show mode.

    • masterView: The current slide is displayed in the master view.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Obtain the state of the current slide.
      const getState = () => {
        return app.ActivePresentation.SlideShowWindow.View.State;
      }

ActivePresentation.SlideShowWindow.View.CoreReadonly

You can specify whether to enter the preview mode by using the CoreReadonly property.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.CoreReadonly

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Obtain the Presentation object.
      const presentation = await app.ActivePresentation;
    
      // Obtain the slide show window.
      const slideShowWindow = await presentation.SlideShowWindow;
    
      // Obtain the View object.
      const view = await SlideShowWindow.View;
    
      // Enter the preview mode.
      view.CoreReadonly = true;
    }

ActivePresentation.SlideShowWindow.View.MarkerEditVisible

You can specify whether to display the marker toolbar by using the MarkerEditVisible property.

Important

Only JavaScript SDK V1.1.10 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.MarkerEditVisible

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Obtain the Presentation object.
      const presentation = await app.ActivePresentation;
    
      // Obtain the slide show window.
      const slideShowWindow = await presentation.SlideShowWindow;
    
      // Obtain the View object.
      const view = await SlideShowWindow.View;
    
      // Display the marker toolbar.
      view.MarkerEditVisible = true;
    
      setTimeout(() => {
        // Hide the marker toolbar after 3,000 milliseconds.
        view.MarkerEditVisible = false;
      }, 3000)
    }

ActivePresentation.SlideShowWindow.View.PointerVisible

You can specify whether to display the remarks by using the PointerVisible property.

Important

Only JavaScript SDK V1.1.10 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.PointerVisible

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Obtain the Presentation object.
      const presentation = await app.ActivePresentation;
    
      // Obtain the slide show window.
      const slideShowWindow = await presentation.SlideShowWindow;
    
      // Obtain the View object.
      const view = await SlideShowWindow.View;
    
      // Listen to the event that occurs when the remarks are displayed or hidden.
      app.Sub.SlideInkVisible = async (e) => {
        const { Data } = e;
        console.log(Data.showmark);
        
        setTimeout(() => {
          // Hide the remarks after 3,000 milliseconds.
          view.PointerVisible = false;
        }, 3000)
      }
    }

ActivePresentation.SlideShowWindow.View.IsBanSlideChange

You can specify whether to disable slide change by using the IsBanSlideChange property.

Important

Only JavaScript SDK V1.1.10 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.IsBanSlideChange

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Obtain the Presentation object.
      const presentation = await app.ActivePresentation;
    
      // Obtain the slide show window.
      const slideShowWindow = await presentation.SlideShowWindow;
    
      // Obtain the View object.
      const view = await SlideShowWindow.View;
    
      // Disable slide change.
      view.IsBanSlideChange = true;
    
      setTimeout(() => {
        // Enable slide change after 3,000 milliseconds.
        view.IsBanSlideChange = false;
      }, 3000)
    }

ActivePresentation.SlideShowWindow.View.ShowPage

You can specify whether to display page numbers in the slide show mode by using the ShowPage property.

Important
  • Only JavaScript SDK V1.1.11 and later support this feature.

  • Only PCs support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.ShowPage

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Obtain the Presentation object.
      const presentation = await app.ActivePresentation;
    
      // Obtain the slide show window.
      const slideShowWindow = await presentation.SlideShowWindow;
    
      // Obtain the View object.
      const view = await SlideShowWindow.View;
    
      // Display page numbers in the slide show mode.
      view.ShowPage = true;
    }

PageSetup

ActivePresentation.PageSetup

Obtains a PageSetup object.

  • Syntax

    expression.ActivePresentation.PageSetup

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the Presentation object.
      const presentation = await app.ActivePresentation;
    
      // Obtain the PageSetup object.
      const pageSetup = await presentation.PageSetup;
    }

Properties

ActivePresentation.PageSetup.SlideHeight

You can obtain the height of the slide by using the SlideHeight property.

  • Syntax

    expression.ActivePresentation.PageSetup.SlideHeight

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the Presentation object.
      const presentation = await app.ActivePresentation;
    
      // Obtain the PageSetup object.
      const pageSetup = await presentation.PageSetup;
    
      // Obtain the height of the slide.
      const slideHeight = await pageSetup.SlideHeight;
      console.log(slideHeight);
    }

ActivePresentation.PageSetup.SlideWidth

You can obtain the width of the slide by using the SlideWidth property.

  • Syntax

    expression.ActivePresentation.PageSetup.SlideWidth

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the Presentation object.
      const presentation = await app.ActivePresentation;
    
      // Obtain the PageSetup object.
      const pageSetup = await presentation.PageSetup;
    
      // Obtain the width of the slide.
      const slideWidth = await pageSetup.SlideWidth;
      console.log(slideWidth);
    }

ActivePresentation.PageSetup.SlideRatio

You can obtain the aspect ratio of the slide by using the SlideRatio property.

Important

Only JavaScript SDK V1.1.10 and later support this feature.

  • Syntax

    expression.ActivePresentation.PageSetup.SlideRatio

    expression: the application object of the document type.

  • Return value

    Property

    Data type

    Description

    Ratio

    Number

    The aspect ratio of the slide.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the Presentation object.
      const presentation = await app.ActivePresentation;
    
      // Obtain the PageSetup object.
      const pageSetup = await presentation.PageSetup;
    
      // Obtain the aspect ratio of the slide.
      const slideRatio = await pageSetup.SlideRatio;
      console.log(slideRatio);
    }

ActivePresentation.PageSetup.SlideTop

You can obtain the distance to the top of the slide by using the SlideTop property.

  • Syntax

    expression.ActivePresentation.PageSetup.SlideTop

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the Presentation object.
      const presentation = await app.ActivePresentation;
    
      // Obtain the PageSetup object.
      const pageSetup = await presentation.PageSetup;
    
      // Obtain the distance to the top of the slide.
      const SlideTop = await pageSetup.SlideTop;
      console.log(SlideTop);
    }

ActivePresentation.PageSetup.SlideLeft

You can obtain the distance to the left of the slide by using the SlideLeft property.

  • Syntax

    expression.ActivePresentation.PageSetup.SlideLeft

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the Presentation object.
      const presentation = await app.ActivePresentation;
    
      // Obtain the PageSetup object.
      const pageSetup = await presentation.PageSetup;
    
      // Obtain the distance to the left of the slide.
      const SlideLeft = await pageSetup.SlideLeft;
      console.log(SlideLeft);
    }

FillFormat

ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Fill

Represents fill formatting for a shape.

Important

Only JavaScript SDK V1.1.11 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Fill

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the FillFormat object, which represents fill formatting for a shape.
      const fillFormat = await app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Fill;
    }

Properties

ActivePresentation.SlideMaster.Background.Fill.Transparency

You can query or specify the transparency of the fill by using the Transparency property.

Important

Only JavaScript SDK V1.1.16 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideMaster.Background.Fill.Transparency

    expression: the application object of the document type.

    Set the Transparency parameter to a value in the range of [0, 1] to adjust the transparency of the fill.

    A value of 0 specifies that the fill is fully transparent. A value of 1 specifies that the fill is not transparent.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Specify the transparency of the fill.
      app.ActivePresentation.SlideMaster.Background.Fill.Transparency = 0.5;
    }

ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Fill.Visible

You can query or specify whether the fill is visible by using the Visible property.

Important

Only JavaScript SDK V1.1.16 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Fill.Visible

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Query whether the fill is visible.
      await app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Fill.Visible;
    
      // Specify whether the fill is visible.
      app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Fill.Visible = true;
    }

ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Fill.BackColor

You can query or specify the background color of the fill by using the BackColor property.

Important

Only JavaScript SDK V1.1.16 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Fill.BackColor

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Query the background color of the fill.
      await app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Fill.BackColor.RGB;
    
      // Specify the background color of the fill.
      app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Fill.BackColor = '#ff0000';
    }

ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Fill.ForeColor

You can query or specify the foreground color of the fill by using the ForeColor property.

Important

Only JavaScript SDK V1.1.16 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Fill.ForeColor

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Query the foreground color of the fill.
      await app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Fill.ForeColor.RGB;
    
      // Specify the foreground color of the fill.
      app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Fill.ForeColor = '#ff0000';
    }

ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Fill.Type

You can query the type of the fill by using the Type property.

Important

Only JavaScript SDK V1.1.16 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Fill.Type

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Query the type of the fill.
      await app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Fill.Type;
    }

LineFormat

ActivePresentation.SlideMaster.Background.Line

Represents the LineFormat object for a shape.

Important

Only JavaScript SDK V1.1.11 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideMaster.Background.Line

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the LineFormat object for a shape.
      const lineFormat = await app.ActivePresentation.SlideMaster.Background.Line;
    }

Properties

ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Line.Transparency

You can query or specify the transparency of the outline by using the Transparency property.

Important

Only JavaScript SDK V1.1.16 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Line.Transparency

    expression: the application object of the document type.

    Set the Transparency parameter to a value in the range of [0, 1] to adjust the transparency of the outline.

    A value of 0 specifies that the outline is fully transparent. A value of 1 specifies that the outline is not transparent.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Query the transparency of the outline.
      await app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Line.Transparency;
    
      // Specify the transparency of the outline.
      app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Line.Transparency = 0.5;
    }

ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Line.Visible

You can query or specify whether the outline is visible by using the Visible property.

Important

Only JavaScript SDK V1.1.16 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Line.Visible

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Query whether the outline is visible.
      await app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Line.Visible;
    
      // Specify whether the outline is visible.
      app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Line.Visible = true;
    }

ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Line.BackColor

You can query or specify the outline color by using BackColor property.

Important

Only JavaScript SDK V1.1.16 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Line.BackColor

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Query the outline color.
      await app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Line.BackColor.RGB
    
      // Specify the outline color.
      app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Line.BackColor = '#ff0000';
    }

ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Line.Style

You can query or specify the type of the outline by using the Style property.

Important

Only JavaScript SDK V1.1.16 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Line.Style

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Query the type of the outline.
      await app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Line.Style;
    
      // Specify the type 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

You query or specify the dashed line type of the outline by using the DashStyle property.

Important

Only JavaScript SDK V1.1.16 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Line.DashStyle

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Query the dashed line type of the outline.
      await app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Line.DashStyle;
    
      // Specify the dashed line type 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

You can query or specify the width of the outline by using the Weight property.

Important

Only JavaScript SDK V1.1.16 and later support this feature.

  • Syntax

    expression.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(Index).Line.Weight

    expression: the application object of the document type.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Query the width of the outline.
      await app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Line.Weight;
    
      // Specify the width of the outline.
      app.ActivePresentation.SlideShowWindow.View.Slide.Shapes.Item(1).Line.Weight = 10;
    }