MAIDR JavaScript API
    Preparing search index...

    Interface OfficeDocument

    The open document (Office.Document).

    interface OfficeDocument {
        getFileAsync?: (
            fileType: string,
            options: { sliceSize: number },
            callback: (result: OfficeAsyncResult<OfficeFile>) => void,
        ) => void;
        addHandlerAsync?: (
            eventType: string,
            handler: (event?: OfficeEventArgs) => void,
            callback?: (result: OfficeAsyncResult<void>) => void,
        ) => void;
        removeHandlerAsync?: (
            eventType: string,
            options: { handler: (event?: OfficeEventArgs) => void },
            callback?: (result: OfficeAsyncResult<void>) => void,
        ) => void;
        getActiveViewAsync?: (
            callback: (result: OfficeAsyncResult<string>) => void,
        ) => void;
        getSelectedDataAsync?: (
            coercionType: string,
            callback: (result: OfficeAsyncResult<OfficeSlideRange>) => void,
        ) => void;
        settings?: OfficeSettings;
    }
    Index

    Properties

    getFileAsync?: (
        fileType: string,
        options: { sliceSize: number },
        callback: (result: OfficeAsyncResult<OfficeFile>) => void,
    ) => void

    The document's file (File requirement set): compressed is the Open XML package, which PowerPoint gives on every platform.

    addHandlerAsync?: (
        eventType: string,
        handler: (event?: OfficeEventArgs) => void,
        callback?: (result: OfficeAsyncResult<void>) => void,
    ) => void

    Register a handler for a document event, such as documentSelectionChanged. Office.js hands the handler the event's arguments. They are optional here, so a stand-in for Office.js may call the handler with none.

    removeHandlerAsync?: (
        eventType: string,
        options: { handler: (event?: OfficeEventArgs) => void },
        callback?: (result: OfficeAsyncResult<void>) => void,
    ) => void

    Remove a handler registered by addHandlerAsync.

    getActiveViewAsync?: (
        callback: (result: OfficeAsyncResult<string>) => void,
    ) => void

    Whether the document is being edited, edit, or presented, read (ActiveView requirement set): PowerPoint's Slide Show and Reading View are read. The event activeViewChanged says when it changes.

    getSelectedDataAsync?: (
        coercionType: string,
        callback: (result: OfficeAsyncResult<OfficeSlideRange>) => void,
    ) => void

    The data selected (Selection requirement set); with slideRange, the slides selected in PowerPoint.

    settings?: OfficeSettings

    This instance of the add-in's settings, saved in the document (Settings requirement set).