Edit

Share via


Word.DocumentPropertyType enum

Represents the document property type.

Remarks

[ API set: WordApi 1.3 ]

Examples

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/30-properties/read-write-custom-document-properties.yaml

await Word.run(async (context) => {
    const properties: Word.CustomPropertyCollection = context.document.properties.customProperties;
    properties.load("key,type,value");

    await context.sync();
    for (let i = 0; i < properties.items.length; i++)
        console.log("Property Name:" + properties.items[i].key + "; Type=" + properties.items[i].type + "; Property Value=" + properties.items[i].value);
});

Fields

boolean = "Boolean"

Represents a Boolean type.

date = "Date"

Represents a date type.

number = "Number"

Represents a number type.

string = "String"

Represents a string type.