Word.GetTextOptions interface
Specifies the options to be included in a Paragraph.getText operation.
Remarks
Examples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/get-text.yaml
await Word.run(async (context) => {
const paragraph: Word.Paragraph = context.document.getSelection().paragraphs.getFirst();
const text = paragraph.getText();
const textIncludingHidden = paragraph.getText({ IncludeHiddenText: true });
const textIncludingDeleted = paragraph.getText({ IncludeTextMarkedAsDeleted: true });
await context.sync();
console.log("Text:- " + text.value, "Including hidden text:- " + textIncludingHidden.value, "Including text marked as deleted:- " + textIncludingDeleted.value);
});
Properties
| include |
If provided, specifies whether to include hidden text in the result of the |
| include |
If provided, specifies whether to include text marked as deleted in the result of the |
Property Details
includeHiddenText
If provided, specifies whether to include hidden text in the result of the Paragraph.getText method. The default value is false.
includeHiddenText?: boolean;
Property Value
boolean
Remarks
includeTextMarkedAsDeleted
If provided, specifies whether to include text marked as deleted in the result of the Paragraph.getText method. The default value is false.
includeTextMarkedAsDeleted?: boolean;
Property Value
boolean