How to Access Core Properties / Custom Properties in PowerPoint Office Addin Using Javascript API

Luqman-Ud-Din Muhammad 1 Reputation point
2022-10-26T14:30:09.967+00:00

I want to access a PowerPoint document's core and custom properties in PowerPoint Office Addin.

I can access these properties using Javascript API in Word and Excel Office Addins.

But I am unable to find any documentation related to javascript API to access PowerPoint document core or custom properties.

Is it possible to access these properties using Javascript API? If so how can I access them?

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,000 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,989 questions
PowerPoint Management
PowerPoint Management
PowerPoint: A family of Microsoft presentation graphics products that offer tools for creating presentations and adding graphic effects like multimedia objects and special effects with text.Management: The act or process of organizing, handling, directing or controlling something.
230 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. John Korchok 5,431 Reputation points
    2022-10-26T17:44:15.74+00:00

    Office.js for PowerPoint is the least developed version of the Office.js APIs. Here is Microsoft's page showing all available objects. If it's not on this page, it doesn't exist (yet): PowerPoint Package

    0 comments No comments

  2. Sascha Günther 1 Reputation point
    2024-01-17T10:53:02.7266667+00:00

    @Luqman-Ud-Din Muhammad I was just facing the same challenge, unfortunately Office.js API for PowerPoint still does not provide any function to retrieve custom document properties.

    I implemented the following workaround:

    	<my_file path="docProps/" name="custom.xml">
    		<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/custom-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes">
    			<property fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}" pid="2" name="MSIP_Label_87439970-2b0a-43db-8d36-4f1111a97b08_Enabled">
    				<vt:lpwstr>true</vt:lpwstr>
    			</property>
    			<property fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}" pid="3" name="MSIP_Label_87439970-2b0a-43db-8d36-4f1111a97b08_SetDate">
    				<vt:lpwstr>2024-01-17T09:59:10Z</vt:lpwstr>
    			</property>
    			<property fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}" pid="4" name="MSIP_Label_87439970-2b0a-43db-8d36-4f1111a97b08_Method">
    				<vt:lpwstr>Privileged</vt:lpwstr>
    			</property>
    			<property fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}" pid="5" name="MSIP_Label_87439970-2b0a-43db-8d36-4f1111a97b08_Name">
    				<vt:lpwstr>f87e2893-b95b-4327-95e0-bf1075fe5eb5</vt:lpwstr>
    			</property>
    			<property fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}" pid="6" name="MSIP_Label_87439970-2b0a-43db-8d36-4f1111a97b08_SiteId">
    				<vt:lpwstr>f87e2893-b95b-4327-95e0-bf1075fe5eb5</vt:lpwstr>
    			</property>
    			<property fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}" pid="7" name="MSIP_Label_87439970-2b0a-43db-8d36-4f1111a97b08_ActionId">
    				<vt:lpwstr>f87e2893-b95b-4327-95e0-bf1075fe5eb5</vt:lpwstr>
    			</property>
    			<property fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}" pid="8" name="MSIP_Label_9859f7d1-b5ca-451d-95f2-7d810ca64a9f_ContentBits">
    				<vt:lpwstr>0</vt:lpwstr>
    			</property>
    		</Properties>
    	</my_file>
    

    Hope that helps!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.