From b4e425c5f2aed720b8c8b16f691d59f80778f49c Mon Sep 17 00:00:00 2001 From: Elizabeth Samuel Date: Mon, 18 Nov 2024 09:08:51 -0800 Subject: [PATCH] [Word] (1.9) Release (#2130) * [Word] (1.9) Release * Update to say Coming soon * Revert to default --- .openpublishing.publish.config.json | 5 + docs/docfx.json | 17 + docs/docs-ref-autogen/common/toc.yml | 3 + docs/docs-ref-autogen/common_preview/toc.yml | 3 + docs/docs-ref-autogen/excel/toc.yml | 3 + docs/docs-ref-autogen/excel_1_1/toc.yml | 3 + docs/docs-ref-autogen/excel_1_10/toc.yml | 3 + docs/docs-ref-autogen/excel_1_11/toc.yml | 3 + docs/docs-ref-autogen/excel_1_12/toc.yml | 3 + docs/docs-ref-autogen/excel_1_13/toc.yml | 3 + docs/docs-ref-autogen/excel_1_14/toc.yml | 3 + docs/docs-ref-autogen/excel_1_15/toc.yml | 3 + docs/docs-ref-autogen/excel_1_16/toc.yml | 3 + docs/docs-ref-autogen/excel_1_17/toc.yml | 3 + docs/docs-ref-autogen/excel_1_2/toc.yml | 3 + docs/docs-ref-autogen/excel_1_3/toc.yml | 3 + docs/docs-ref-autogen/excel_1_4/toc.yml | 3 + docs/docs-ref-autogen/excel_1_5/toc.yml | 3 + docs/docs-ref-autogen/excel_1_6/toc.yml | 3 + docs/docs-ref-autogen/excel_1_7/toc.yml | 3 + docs/docs-ref-autogen/excel_1_8/toc.yml | 3 + docs/docs-ref-autogen/excel_1_9/toc.yml | 3 + docs/docs-ref-autogen/excel_online/toc.yml | 3 + docs/docs-ref-autogen/onenote/toc.yml | 3 + docs/docs-ref-autogen/outlook/toc.yml | 3 + docs/docs-ref-autogen/outlook_1_1/toc.yml | 3 + docs/docs-ref-autogen/outlook_1_10/toc.yml | 3 + docs/docs-ref-autogen/outlook_1_11/toc.yml | 3 + docs/docs-ref-autogen/outlook_1_12/toc.yml | 3 + docs/docs-ref-autogen/outlook_1_13/toc.yml | 3 + docs/docs-ref-autogen/outlook_1_14/toc.yml | 3 + docs/docs-ref-autogen/outlook_1_2/toc.yml | 3 + docs/docs-ref-autogen/outlook_1_3/toc.yml | 3 + docs/docs-ref-autogen/outlook_1_4/toc.yml | 3 + docs/docs-ref-autogen/outlook_1_5/toc.yml | 3 + docs/docs-ref-autogen/outlook_1_6/toc.yml | 3 + docs/docs-ref-autogen/outlook_1_7/toc.yml | 3 + docs/docs-ref-autogen/outlook_1_8/toc.yml | 3 + docs/docs-ref-autogen/outlook_1_9/toc.yml | 3 + docs/docs-ref-autogen/overview/overview.md | 1 + docs/docs-ref-autogen/powerpoint/toc.yml | 3 + docs/docs-ref-autogen/powerpoint_1_1/toc.yml | 3 + docs/docs-ref-autogen/powerpoint_1_2/toc.yml | 3 + docs/docs-ref-autogen/powerpoint_1_3/toc.yml | 3 + docs/docs-ref-autogen/powerpoint_1_4/toc.yml | 3 + docs/docs-ref-autogen/powerpoint_1_5/toc.yml | 3 + docs/docs-ref-autogen/powerpoint_1_6/toc.yml | 3 + docs/docs-ref-autogen/visio/toc.yml | 3 + docs/docs-ref-autogen/word/toc.yml | 5 + docs/docs-ref-autogen/word/word.yml | 1 + docs/docs-ref-autogen/word/word/word.body.yml | 2 +- .../word/word/word.comboboxcontentcontrol.yml | 36 +- .../word/word/word.contentcontrol.yml | 18 +- .../word/word/word.contentcontrollistitem.yml | 48 +- .../word.contentcontrollistitemcollection.yml | 30 +- .../word/word/word.contentcontroloptions.yml | 2 +- .../word/word/word.document.yml | 43 +- .../word/word.dropdownlistcontentcontrol.yml | 36 +- .../word.importedstylesconflictbehavior.yml | 38 + ...es.contentcontrolcollectionloadoptions.yml | 4 +- .../word.interfaces.contentcontroldata.yml | 14 +- ...ntcontrollistitemcollectionloadoptions.yml | 18 +- ....interfaces.contentcontrollistitemdata.yml | 12 +- ...aces.contentcontrollistitemloadoptions.yml | 18 +- ...faces.contentcontrollistitemupdatedata.yml | 12 +- ...d.interfaces.contentcontrolloadoptions.yml | 2 +- ...rd.interfaces.contentcontrolupdatedata.yml | 2 +- .../word/word/word.paragraph.yml | 2 +- .../docs-ref-autogen/word/word/word.range.yml | 4 +- docs/docs-ref-autogen/word_1_1/toc.yml | 3 + docs/docs-ref-autogen/word_1_1/word.yml | 6 + .../word_1_1/word/word.body.yml | 14 +- ....interfaces.comboboxcontentcontroldata.yml | 10 + ...s.contentcontrollistitemcollectiondata.yml | 23 + ...entcontrollistitemcollectionupdatedata.yml | 25 + ....interfaces.contentcontrollistitemdata.yml | 10 + ...faces.contentcontrollistitemupdatedata.yml | 12 + ...erfaces.dropdownlistcontentcontroldata.yml | 10 + .../word_1_1/word/word.paragraph.yml | 14 +- .../word_1_1/word/word.range.yml | 14 +- docs/docs-ref-autogen/word_1_2/toc.yml | 3 + docs/docs-ref-autogen/word_1_2/word.yml | 6 + .../word_1_2/word/word.body.yml | 14 +- ....interfaces.comboboxcontentcontroldata.yml | 10 + ...s.contentcontrollistitemcollectiondata.yml | 23 + ...entcontrollistitemcollectionupdatedata.yml | 25 + ....interfaces.contentcontrollistitemdata.yml | 10 + ...faces.contentcontrollistitemupdatedata.yml | 12 + ...erfaces.dropdownlistcontentcontroldata.yml | 10 + .../word_1_2/word/word.paragraph.yml | 14 +- .../word_1_2/word/word.range.yml | 14 +- docs/docs-ref-autogen/word_1_3/toc.yml | 3 + docs/docs-ref-autogen/word_1_3/word.yml | 6 + .../word_1_3/word/word.body.yml | 14 +- ....interfaces.comboboxcontentcontroldata.yml | 10 + ...s.contentcontrollistitemcollectiondata.yml | 23 + ...entcontrollistitemcollectionupdatedata.yml | 25 + ....interfaces.contentcontrollistitemdata.yml | 10 + ...faces.contentcontrollistitemupdatedata.yml | 12 + ...erfaces.dropdownlistcontentcontroldata.yml | 10 + .../word_1_3/word/word.paragraph.yml | 14 +- .../word_1_3/word/word.range.yml | 16 +- .../word_1_3_hidden_document/toc.yml | 3 + .../word_1_3_hidden_document/word.yml | 6 + .../word/word.body.yml | 14 +- ....interfaces.comboboxcontentcontroldata.yml | 10 + ...s.contentcontrollistitemcollectiondata.yml | 23 + ...entcontrollistitemcollectionupdatedata.yml | 25 + ....interfaces.contentcontrollistitemdata.yml | 10 + ...faces.contentcontrollistitemupdatedata.yml | 12 + ...erfaces.dropdownlistcontentcontroldata.yml | 10 + .../word/word.paragraph.yml | 14 +- .../word/word.range.yml | 16 +- docs/docs-ref-autogen/word_1_4/toc.yml | 3 + docs/docs-ref-autogen/word_1_4/word.yml | 6 + .../word_1_4/word/word.body.yml | 14 +- ....interfaces.comboboxcontentcontroldata.yml | 10 + ...s.contentcontrollistitemcollectiondata.yml | 23 + ...entcontrollistitemcollectionupdatedata.yml | 25 + ....interfaces.contentcontrollistitemdata.yml | 10 + ...faces.contentcontrollistitemupdatedata.yml | 12 + ...erfaces.dropdownlistcontentcontroldata.yml | 10 + .../word_1_4/word/word.paragraph.yml | 14 +- .../word_1_4/word/word.range.yml | 16 +- .../word_1_4_hidden_document/toc.yml | 3 + .../word_1_4_hidden_document/word.yml | 6 + .../word/word.body.yml | 14 +- ....interfaces.comboboxcontentcontroldata.yml | 10 + ...s.contentcontrollistitemcollectiondata.yml | 23 + ...entcontrollistitemcollectionupdatedata.yml | 25 + ....interfaces.contentcontrollistitemdata.yml | 10 + ...faces.contentcontrollistitemupdatedata.yml | 12 + ...erfaces.dropdownlistcontentcontroldata.yml | 10 + .../word/word.paragraph.yml | 14 +- .../word/word.range.yml | 16 +- docs/docs-ref-autogen/word_1_5/toc.yml | 3 + docs/docs-ref-autogen/word_1_5/word.yml | 6 + .../word_1_5/word/word.body.yml | 14 +- .../word/word.contentcontroloptions.yml | 10 +- ....interfaces.comboboxcontentcontroldata.yml | 10 + ...s.contentcontrollistitemcollectiondata.yml | 23 + ...entcontrollistitemcollectionupdatedata.yml | 25 + ....interfaces.contentcontrollistitemdata.yml | 10 + ...faces.contentcontrollistitemupdatedata.yml | 12 + ...erfaces.dropdownlistcontentcontroldata.yml | 10 + .../word_1_5/word/word.paragraph.yml | 14 +- .../word_1_5/word/word.range.yml | 16 +- .../word_1_5_hidden_document/toc.yml | 3 + .../word_1_5_hidden_document/word.yml | 6 + .../word/word.body.yml | 14 +- .../word/word.contentcontroloptions.yml | 10 +- ....interfaces.comboboxcontentcontroldata.yml | 10 + ...s.contentcontrollistitemcollectiondata.yml | 23 + ...entcontrollistitemcollectionupdatedata.yml | 25 + ....interfaces.contentcontrollistitemdata.yml | 10 + ...faces.contentcontrollistitemupdatedata.yml | 12 + ...erfaces.dropdownlistcontentcontroldata.yml | 10 + .../word/word.paragraph.yml | 14 +- .../word/word.range.yml | 16 +- docs/docs-ref-autogen/word_1_6/toc.yml | 3 + docs/docs-ref-autogen/word_1_6/word.yml | 6 + .../word_1_6/word/word.body.yml | 14 +- .../word/word.contentcontroloptions.yml | 10 +- .../word_1_6/word/word.document.yml | 43 +- ....interfaces.comboboxcontentcontroldata.yml | 10 + ...s.contentcontrollistitemcollectiondata.yml | 23 + ...entcontrollistitemcollectionupdatedata.yml | 25 + ....interfaces.contentcontrollistitemdata.yml | 10 + ...faces.contentcontrollistitemupdatedata.yml | 12 + ...erfaces.dropdownlistcontentcontroldata.yml | 10 + .../word_1_6/word/word.paragraph.yml | 14 +- .../word_1_6/word/word.range.yml | 16 +- docs/docs-ref-autogen/word_1_7/toc.yml | 3 + docs/docs-ref-autogen/word_1_7/word.yml | 6 + .../word_1_7/word/word.body.yml | 14 +- .../word_1_7/word/word.contentcontrol.yml | 2 +- .../word/word.contentcontroloptions.yml | 10 +- .../word_1_7/word/word.document.yml | 43 +- ....interfaces.comboboxcontentcontroldata.yml | 10 + ...es.contentcontrolcollectionloadoptions.yml | 4 +- .../word.interfaces.contentcontroldata.yml | 2 +- ...s.contentcontrollistitemcollectiondata.yml | 23 + ...entcontrollistitemcollectionupdatedata.yml | 25 + ....interfaces.contentcontrollistitemdata.yml | 10 + ...faces.contentcontrollistitemupdatedata.yml | 12 + ...d.interfaces.contentcontrolloadoptions.yml | 2 +- ...rd.interfaces.contentcontrolupdatedata.yml | 2 +- ...erfaces.dropdownlistcontentcontroldata.yml | 10 + .../word_1_7/word/word.paragraph.yml | 14 +- .../word_1_7/word/word.range.yml | 16 +- docs/docs-ref-autogen/word_1_8/toc.yml | 3 + docs/docs-ref-autogen/word_1_8/word.yml | 6 + .../word_1_8/word/word.body.yml | 14 +- .../word_1_8/word/word.contentcontrol.yml | 2 +- .../word/word.contentcontroloptions.yml | 10 +- .../word_1_8/word/word.document.yml | 43 +- ....interfaces.comboboxcontentcontroldata.yml | 10 + ...es.contentcontrolcollectionloadoptions.yml | 4 +- .../word.interfaces.contentcontroldata.yml | 2 +- ...s.contentcontrollistitemcollectiondata.yml | 23 + ...entcontrollistitemcollectionupdatedata.yml | 25 + ....interfaces.contentcontrollistitemdata.yml | 10 + ...faces.contentcontrollistitemupdatedata.yml | 12 + ...d.interfaces.contentcontrolloadoptions.yml | 2 +- ...rd.interfaces.contentcontrolupdatedata.yml | 2 +- ...erfaces.dropdownlistcontentcontroldata.yml | 10 + .../word_1_8/word/word.paragraph.yml | 14 +- .../word_1_8/word/word.range.yml | 16 +- docs/docs-ref-autogen/word_1_9/toc.yml | 1137 + docs/docs-ref-autogen/word_1_9/word.yml | 379 + .../word_1_9/word/word.alignment.yml | 85 + .../word_1_9/word/word.annotation.yml | 369 + .../word/word.annotationclickedeventargs.yml | 68 + .../word/word.annotationcollection.yml | 218 + .../word/word.annotationhoveredeventargs.yml | 68 + .../word/word.annotationinsertedeventargs.yml | 75 + .../word.annotationpopupactioneventargs.yml | 94 + .../word/word.annotationremovedeventargs.yml | 65 + .../word_1_9/word/word.annotationset.yml | 87 + .../word_1_9/word/word.annotationstate.yml | 69 + .../word_1_9/word/word.application.yml | 218 + .../word_1_9/word/word.body.yml | 1809 ++ .../word_1_9/word/word.bodytype.yml | 86 + .../word_1_9/word/word.borderlocation.yml | 80 + .../word_1_9/word/word.bordertype.yml | 156 + .../word_1_9/word/word.breaktype.yml | 90 + .../word_1_9/word/word.builtinstylename.yml | 814 + .../word/word.cellpaddinglocation.yml | 56 + .../word_1_9/word/word.changetrackingmode.yml | 63 + .../word/word.changetrackingstate.yml | 66 + .../word/word.changetrackingversion.yml | 45 + .../word/word.checkboxcontentcontrol.yml | 264 + .../word_1_9/word/word.closebehavior.yml | 45 + .../word/word.comboboxcontentcontrol.yml | 357 + .../word_1_9/word/word.comment.yml | 590 + .../word_1_9/word/word.commentcollection.yml | 283 + .../word/word.commentcontentrange.yml | 339 + .../word_1_9/word/word.commentreply.yml | 319 + .../word/word.commentreplycollection.yml | 218 + .../word_1_9/word/word.contentcontrol.yml | 2215 ++ .../word.contentcontroladdedeventargs.yml | 87 + .../word/word.contentcontrolappearance.yml | 84 + .../word/word.contentcontrolcollection.yml | 583 + ...ord.contentcontroldatachangedeventargs.yml | 98 + .../word.contentcontroldeletedeventargs.yml | 98 + .../word.contentcontrolenteredeventargs.yml | 98 + .../word.contentcontrolexitedeventargs.yml | 98 + .../word/word.contentcontrollistitem.yml | 429 + .../word.contentcontrollistitemcollection.yml | 235 + .../word/word.contentcontroloptions.yml | 81 + ...ontentcontrolselectionchangedeventargs.yml | 97 + .../word_1_9/word/word.contentcontroltype.yml | 198 + .../word_1_9/word/word.critique.yml | 123 + .../word_1_9/word/word.critiqueannotation.yml | 331 + .../word/word.critiquecolorscheme.yml | 114 + .../word/word.critiquepopupoptions.yml | 125 + .../word_1_9/word/word.customproperty.yml | 264 + .../word/word.custompropertycollection.yml | 319 + .../word_1_9/word/word.customxmlpart.yml | 1128 + .../word/word.customxmlpartcollection.yml | 410 + .../word.customxmlpartscopedcollection.yml | 269 + .../word_1_9/word/word.document.yml | 1640 ++ .../word_1_9/word/word.documentcreated.yml | 250 + .../word_1_9/word/word.documentproperties.yml | 436 + .../word/word.documentpropertytype.yml | 52 + .../word/word.dropdownlistcontentcontrol.yml | 359 + .../word_1_9/word/word.errorcodes.yml | 75 + .../word_1_9/word/word.eventsource.yml | 61 + .../word_1_9/word/word.eventtype.yml | 141 + .../word_1_9/word/word.field.yml | 793 + .../word_1_9/word/word.fieldcollection.yml | 305 + .../word_1_9/word/word.fieldkind.yml | 72 + .../word_1_9/word/word.fieldtype.yml | 760 + .../word_1_9/word/word.font.yml | 513 + .../word_1_9/word/word.gettextoptions.yml | 64 + .../word_1_9/word/word.headerfootertype.yml | 58 + .../word_1_9/word/word.inlinepicture.yml | 767 + .../word/word.inlinepicturecollection.yml | 216 + .../word_1_9/word/word.insertfileoptions.yml | 141 + .../word_1_9/word/word.insertlocation.yml | 79 + ...rd.interfaces.annotationcollectiondata.yml | 23 + ...rfaces.annotationcollectionloadoptions.yml | 63 + ...erfaces.annotationcollectionupdatedata.yml | 25 + .../word/word.interfaces.annotationdata.yml | 35 + .../word.interfaces.annotationloadoptions.yml | 61 + .../word/word.interfaces.bodydata.yml | 221 + .../word/word.interfaces.bodyloadoptions.yml | 181 + .../word/word.interfaces.bodyupdatedata.yml | 114 + .../word.interfaces.bordercollectiondata.yml | 23 + ....interfaces.bordercollectionupdatedata.yml | 23 + .../word/word.interfaces.borderdata.yml | 10 + .../word/word.interfaces.borderupdatedata.yml | 10 + ....interfaces.checkboxcontentcontroldata.yml | 23 + ...aces.checkboxcontentcontrolloadoptions.yml | 37 + ...faces.checkboxcontentcontrolupdatedata.yml | 25 + .../word.interfaces.collectionloadoptions.yml | 37 + ....interfaces.comboboxcontentcontroldata.yml | 10 + .../word.interfaces.commentcollectiondata.yml | 23 + ...nterfaces.commentcollectionloadoptions.yml | 111 + ...interfaces.commentcollectionupdatedata.yml | 23 + ...ord.interfaces.commentcontentrangedata.yml | 105 + ...erfaces.commentcontentrangeloadoptions.yml | 111 + ...terfaces.commentcontentrangeupdatedata.yml | 83 + .../word/word.interfaces.commentdata.yml | 109 + .../word.interfaces.commentloadoptions.yml | 111 + ....interfaces.commentreplycollectiondata.yml | 23 + ...aces.commentreplycollectionloadoptions.yml | 111 + ...faces.commentreplycollectionupdatedata.yml | 25 + .../word/word.interfaces.commentreplydata.yml | 95 + ...ord.interfaces.commentreplyloadoptions.yml | 109 + ...word.interfaces.commentreplyupdatedata.yml | 47 + .../word.interfaces.commentupdatedata.yml | 49 + ...nterfaces.contentcontrolcollectiondata.yml | 23 + ...es.contentcontrolcollectionloadoptions.yml | 354 + ...ces.contentcontrolcollectionupdatedata.yml | 25 + .../word.interfaces.contentcontroldata.yml | 398 + ...s.contentcontrollistitemcollectiondata.yml | 23 + ...ntcontrollistitemcollectionloadoptions.yml | 69 + ...entcontrollistitemcollectionupdatedata.yml | 25 + ....interfaces.contentcontrollistitemdata.yml | 47 + ...aces.contentcontrollistitemloadoptions.yml | 61 + ...faces.contentcontrollistitemupdatedata.yml | 49 + ...d.interfaces.contentcontrolloadoptions.yml | 336 + ...rd.interfaces.contentcontrolupdatedata.yml | 228 + ...word.interfaces.critiqueannotationdata.yml | 23 + ...terfaces.critiqueannotationloadoptions.yml | 49 + ...nterfaces.custompropertycollectiondata.yml | 23 + ...es.custompropertycollectionloadoptions.yml | 66 + ...ces.custompropertycollectionupdatedata.yml | 25 + .../word.interfaces.custompropertydata.yml | 50 + ...d.interfaces.custompropertyloadoptions.yml | 64 + ...rd.interfaces.custompropertyupdatedata.yml | 26 + ...interfaces.customxmlpartcollectiondata.yml | 23 + ...ces.customxmlpartcollectionloadoptions.yml | 49 + ...aces.customxmlpartcollectionupdatedata.yml | 25 + .../word.interfaces.customxmlpartdata.yml | 35 + ...rd.interfaces.customxmlpartloadoptions.yml | 49 + ...aces.customxmlpartscopedcollectiondata.yml | 23 + ...stomxmlpartscopedcollectionloadoptions.yml | 49 + ...ustomxmlpartscopedcollectionupdatedata.yml | 25 + .../word.interfaces.documentcreateddata.yml | 10 + ....interfaces.documentcreatedloadoptions.yml | 27 + ...d.interfaces.documentcreatedupdatedata.yml | 10 + .../word/word.interfaces.documentdata.yml | 113 + .../word.interfaces.documentloadoptions.yml | 79 + ...word.interfaces.documentpropertiesdata.yml | 236 + ...terfaces.documentpropertiesloadoptions.yml | 238 + ...nterfaces.documentpropertiesupdatedata.yml | 123 + .../word.interfaces.documentupdatedata.yml | 49 + ...erfaces.dropdownlistcontentcontroldata.yml | 10 + .../word.interfaces.fieldcollectiondata.yml | 23 + ....interfaces.fieldcollectionloadoptions.yml | 219 + ...d.interfaces.fieldcollectionupdatedata.yml | 23 + .../word/word.interfaces.fielddata.yml | 110 + .../word/word.interfaces.fieldloadoptions.yml | 212 + .../word/word.interfaces.fieldupdatedata.yml | 64 + .../word/word.interfaces.fontdata.yml | 167 + .../word/word.interfaces.fontloadoptions.yml | 173 + .../word/word.interfaces.fontupdatedata.yml | 167 + ...interfaces.inlinepicturecollectiondata.yml | 23 + ...ces.inlinepicturecollectionloadoptions.yml | 208 + ...aces.inlinepicturecollectionupdatedata.yml | 25 + .../word.interfaces.inlinepicturedata.yml | 83 + ...rd.interfaces.inlinepictureloadoptions.yml | 200 + ...ord.interfaces.inlinepictureupdatedata.yml | 83 + .../word.interfaces.listcollectiondata.yml | 23 + ...d.interfaces.listcollectionloadoptions.yml | 65 + ...rd.interfaces.listcollectionupdatedata.yml | 23 + .../word/word.interfaces.listdata.yml | 61 + .../word/word.interfaces.listitemdata.yml | 47 + .../word.interfaces.listitemloadoptions.yml | 61 + .../word.interfaces.listitemupdatedata.yml | 23 + ...ord.interfaces.listlevelcollectiondata.yml | 23 + ...terfaces.listlevelcollectionupdatedata.yml | 25 + .../word/word.interfaces.listleveldata.yml | 10 + .../word.interfaces.listlevelupdatedata.yml | 10 + .../word/word.interfaces.listloadoptions.yml | 63 + .../word/word.interfaces.listtemplatedata.yml | 10 + ...word.interfaces.listtemplateupdatedata.yml | 10 + ...word.interfaces.noteitemcollectiondata.yml | 23 + ...terfaces.noteitemcollectionloadoptions.yml | 63 + ...nterfaces.noteitemcollectionupdatedata.yml | 25 + .../word/word.interfaces.noteitemdata.yml | 47 + .../word.interfaces.noteitemloadoptions.yml | 61 + .../word.interfaces.noteitemupdatedata.yml | 35 + ...ord.interfaces.paragraphcollectiondata.yml | 23 + ...erfaces.paragraphcollectionloadoptions.yml | 426 + ...terfaces.paragraphcollectionupdatedata.yml | 25 + .../word/word.interfaces.paragraphdata.yml | 350 + .../word.interfaces.paragraphformatdata.yml | 193 + ....interfaces.paragraphformatloadoptions.yml | 201 + ...d.interfaces.paragraphformatupdatedata.yml | 193 + .../word.interfaces.paragraphloadoptions.yml | 409 + .../word.interfaces.paragraphupdatedata.yml | 264 + .../word.interfaces.rangecollectiondata.yml | 23 + ....interfaces.rangecollectionloadoptions.yml | 212 + ...d.interfaces.rangecollectionupdatedata.yml | 23 + .../word/word.interfaces.rangedata.yml | 177 + .../word/word.interfaces.rangeloadoptions.yml | 204 + .../word/word.interfaces.rangeupdatedata.yml | 129 + .../word.interfaces.searchoptionsdata.yml | 109 + ...rd.interfaces.searchoptionsloadoptions.yml | 126 + ...ord.interfaces.searchoptionsupdatedata.yml | 109 + .../word.interfaces.sectioncollectiondata.yml | 23 + ...nterfaces.sectioncollectionloadoptions.yml | 39 + ...interfaces.sectioncollectionupdatedata.yml | 23 + .../word/word.interfaces.sectiondata.yml | 23 + .../word.interfaces.sectionloadoptions.yml | 37 + .../word.interfaces.sectionupdatedata.yml | 23 + .../word.interfaces.settingcollectiondata.yml | 23 + ...nterfaces.settingcollectionloadoptions.yml | 49 + ...interfaces.settingcollectionupdatedata.yml | 23 + .../word/word.interfaces.settingdata.yml | 35 + .../word.interfaces.settingloadoptions.yml | 49 + .../word.interfaces.settingupdatedata.yml | 23 + .../word/word.interfaces.shadingdata.yml | 25 + .../word.interfaces.shadingloadoptions.yml | 39 + .../word.interfaces.shadingupdatedata.yml | 25 + .../word.interfaces.stylecollectiondata.yml | 23 + ....interfaces.stylecollectionloadoptions.yml | 231 + ...d.interfaces.stylecollectionupdatedata.yml | 23 + .../word/word.interfaces.styledata.yml | 205 + .../word/word.interfaces.styleloadoptions.yml | 219 + .../word/word.interfaces.styleupdatedata.yml | 143 + .../word/word.interfaces.tableborderdata.yml | 56 + ...word.interfaces.tableborderloadoptions.yml | 61 + .../word.interfaces.tableborderupdatedata.yml | 56 + ...ord.interfaces.tablecellcollectiondata.yml | 23 + ...erfaces.tablecellcollectionloadoptions.yml | 165 + ...terfaces.tablecellcollectionupdatedata.yml | 25 + .../word/word.interfaces.tablecelldata.yml | 119 + .../word.interfaces.tablecellloadoptions.yml | 157 + .../word.interfaces.tablecellupdatedata.yml | 83 + .../word.interfaces.tablecollectiondata.yml | 23 + ....interfaces.tablecollectionloadoptions.yml | 361 + ...d.interfaces.tablecollectionupdatedata.yml | 23 + .../word/word.interfaces.tabledata.yml | 332 + .../word/word.interfaces.tableloadoptions.yml | 349 + ...word.interfaces.tablerowcollectiondata.yml | 23 + ...terfaces.tablerowcollectionloadoptions.yml | 155 + ...nterfaces.tablerowcollectionupdatedata.yml | 25 + .../word/word.interfaces.tablerowdata.yml | 147 + .../word.interfaces.tablerowloadoptions.yml | 149 + .../word.interfaces.tablerowupdatedata.yml | 85 + .../word/word.interfaces.tablestyledata.yml | 71 + .../word.interfaces.tablestyleloadoptions.yml | 85 + .../word.interfaces.tablestyleupdatedata.yml | 71 + .../word/word.interfaces.tableupdatedata.yml | 260 + ...interfaces.trackedchangecollectiondata.yml | 23 + ...ces.trackedchangecollectionloadoptions.yml | 73 + ...aces.trackedchangecollectionupdatedata.yml | 25 + .../word.interfaces.trackedchangedata.yml | 59 + ...rd.interfaces.trackedchangeloadoptions.yml | 73 + .../word_1_9/word/word.list.yml | 717 + .../word_1_9/word/word.listbullet.yml | 90 + .../word_1_9/word/word.listcollection.yml | 290 + .../word_1_9/word/word.listitem.yml | 370 + .../word_1_9/word/word.listleveltype.yml | 70 + .../word_1_9/word/word.listnumbering.yml | 85 + .../word_1_9/word/word.locationrelation.yml | 166 + .../word_1_9/word/word.noteitem.yml | 444 + .../word_1_9/word/word.noteitemcollection.yml | 229 + .../word_1_9/word/word.noteitemtype.yml | 51 + .../word_1_9/word/word.outlinelevel.yml | 113 + .../word_1_9/word/word.paragraph.yml | 2285 ++ .../word/word.paragraphaddedeventargs.yml | 89 + .../word/word.paragraphchangedeventargs.yml | 89 + .../word/word.paragraphcollection.yml | 362 + .../word/word.paragraphdeletedeventargs.yml | 89 + .../word_1_9/word/word.paragraphformat.yml | 477 + .../word_1_9/word/word.range.yml | 2224 ++ .../word_1_9/word/word.rangecollection.yml | 216 + .../word_1_9/word/word.rangelocation.yml | 103 + .../word_1_9/word/word.requestcontext.yml | 66 + .../word_1_9/word/word.savebehavior.yml | 52 + .../word_1_9/word/word.searchoptions.yml | 420 + .../word_1_9/word/word.section.yml | 436 + .../word_1_9/word/word.sectioncollection.yml | 211 + .../word_1_9/word/word.selectionmode.yml | 54 + .../word_1_9/word/word.setting.yml | 376 + .../word_1_9/word/word.settingcollection.yml | 460 + .../word_1_9/word/word.shading.yml | 245 + .../word_1_9/word/word.style.yml | 629 + .../word_1_9/word/word.stylecollection.yml | 309 + .../word_1_9/word/word.styletype.yml | 85 + .../word_1_9/word/word.table.yml | 1420 ++ .../word_1_9/word/word.tableborder.yml | 335 + .../word_1_9/word/word.tablecell.yml | 696 + .../word/word.tablecellcollection.yml | 212 + .../word_1_9/word/word.tablecollection.yml | 233 + .../word_1_9/word/word.tablerow.yml | 751 + .../word_1_9/word/word.tablerowcollection.yml | 237 + .../word_1_9/word/word.tablestyle.yml | 294 + .../word_1_9/word/word.trackedchange.yml | 420 + .../word/word.trackedchangecollection.yml | 314 + .../word_1_9/word/word.trackedchangetype.yml | 74 + .../word_1_9/word/word.underlinetype.yml | 172 + .../word_1_9/word/word.verticalalignment.yml | 54 + .../docs-ref-autogen/word_desktop_1_1/toc.yml | 5 + .../word_desktop_1_1/word.yml | 7 + .../word_desktop_1_1/word/word.body.yml | 14 +- .../word/word.contentcontrol.yml | 2 +- .../word/word.contentcontroloptions.yml | 10 +- .../word_desktop_1_1/word/word.document.yml | 43 +- .../word.importedstylesconflictbehavior.yml | 38 + ....interfaces.comboboxcontentcontroldata.yml | 10 + ...es.contentcontrolcollectionloadoptions.yml | 4 +- .../word.interfaces.contentcontroldata.yml | 2 +- ...s.contentcontrollistitemcollectiondata.yml | 23 + ...entcontrollistitemcollectionupdatedata.yml | 25 + ....interfaces.contentcontrollistitemdata.yml | 10 + ...faces.contentcontrollistitemupdatedata.yml | 12 + ...d.interfaces.contentcontrolloadoptions.yml | 2 +- ...rd.interfaces.contentcontrolupdatedata.yml | 2 +- ...erfaces.dropdownlistcontentcontroldata.yml | 10 + .../word_desktop_1_1/word/word.paragraph.yml | 14 +- .../word_desktop_1_1/word/word.range.yml | 16 +- docs/docs-ref-autogen/word_online/toc.yml | 11 + docs/docs-ref-autogen/word_online/word.yml | 12 + .../word_online/word/word.body.yml | 14 +- .../word/word.comboboxcontentcontrol.yml | 357 + .../word_online/word/word.contentcontrol.yml | 122 +- .../word/word.contentcontrollistitem.yml | 429 + .../word.contentcontrollistitemcollection.yml | 235 + .../word/word.contentcontroloptions.yml | 10 +- .../word_online/word/word.document.yml | 43 +- .../word/word.dropdownlistcontentcontrol.yml | 359 + ....interfaces.comboboxcontentcontroldata.yml | 10 + ...es.contentcontrolcollectionloadoptions.yml | 4 +- .../word.interfaces.contentcontroldata.yml | 26 +- ...s.contentcontrollistitemcollectiondata.yml | 23 + ...ntcontrollistitemcollectionloadoptions.yml | 69 + ...entcontrollistitemcollectionupdatedata.yml | 25 + ....interfaces.contentcontrollistitemdata.yml | 47 + ...aces.contentcontrollistitemloadoptions.yml | 61 + ...faces.contentcontrollistitemupdatedata.yml | 49 + ...d.interfaces.contentcontrolloadoptions.yml | 2 +- ...rd.interfaces.contentcontrolupdatedata.yml | 2 +- ...erfaces.dropdownlistcontentcontroldata.yml | 10 + .../word_online/word/word.paragraph.yml | 14 +- .../word_online/word/word.range.yml | 16 +- docs/includes/word-1_1.md | 6 +- docs/includes/word-1_5.md | 2 +- docs/includes/word-1_6.md | 2 +- docs/includes/word-1_7.md | 2 +- docs/includes/word-1_9.md | 18 + docs/includes/word-preview.md | 27 +- docs/requirement-sets/requirement-sets.md | 12 +- docs/requirement-sets/toc.yml | 3 + .../word/word-api-1-1-requirement-set.md | 145 +- .../word/word-api-1-2-requirement-set.md | 17 +- .../word/word-api-1-3-requirement-set.md | 261 +- .../word/word-api-1-4-requirement-set.md | 109 +- .../word/word-api-1-5-requirement-set.md | 113 +- .../word/word-api-1-6-requirement-set.md | 49 +- .../word/word-api-1-9-requirement-set.md | 22 + .../word/word-api-requirement-sets.md | 3 +- .../word/word-preview-apis.md | 23 +- generate-docs/API Coverage Report.csv | 7 +- generate-docs/GenerateDocs.sh | 28 +- .../word_1_1/word.d.ts | 53 +- .../word_1_2/word.d.ts | 53 +- .../word_1_3/word.d.ts | 53 +- .../word-desktop1.d.ts | 53 +- .../word_1_3_hidden_document/word.d.ts | 53 +- .../word_1_4/word.d.ts | 53 +- .../word-desktop1.d.ts | 58 +- .../word_1_4_hidden_document/word.d.ts | 53 +- .../word_1_5/word.d.ts | 58 +- .../word_1_5_hidden_document/word.d.ts | 58 +- .../word_1_6/word.d.ts | 74 +- .../word_1_7/word.d.ts | 84 +- .../word_1_8/word.d.ts | 84 +- .../word_1_9/api-extractor.json | 41 + .../word_1_9/dist/tsdoc-metadata.json | 11 + .../word_1_9/package.json | 4 + .../word_1_9/tsconfig.json | 22 + .../word_1_9/tsdoc-metadata.json | 11 + .../word_1_9/word.d.ts | 19134 ++++++++++++++++ .../word_desktop_1_1/word-desktop1.d.ts | 3270 ++- .../word_desktop_1_1/word-desktop2.d.ts | 194 +- .../word_desktop_1_1/word-desktop3.d.ts | 866 +- .../word_desktop_1_1/word-desktop4.d.ts | 18135 +++++++++++++++ .../word_desktop_1_1/word.d.ts | 109 +- .../word_online/word-init.d.ts | 501 +- .../word_online/word-online1.d.ts | 476 +- .../word_online/word-online2.d.ts | 476 +- .../word_online/word-online3.d.ts | 476 +- .../word_online/word.d.ts | 476 +- .../api-extractor-inputs-word/word.d.ts | 174 +- generate-docs/script-inputs/office.d.ts | 501 +- .../script-inputs/office_preview.d.ts | 174 +- .../script-inputs/script-lab-snippets.yaml | 30 +- generate-docs/scripts/midprocessor.ts | 2 +- generate-docs/scripts/postprocessor.ts | 2 +- 595 files changed, 104554 insertions(+), 1972 deletions(-) create mode 100644 docs/docs-ref-autogen/word/word/word.importedstylesconflictbehavior.yml create mode 100644 docs/docs-ref-autogen/word_1_1/word/word.interfaces.comboboxcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_1/word/word.interfaces.contentcontrollistitemcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_1/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_1/word/word.interfaces.contentcontrollistitemdata.yml create mode 100644 docs/docs-ref-autogen/word_1_1/word/word.interfaces.contentcontrollistitemupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_1/word/word.interfaces.dropdownlistcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_2/word/word.interfaces.comboboxcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_2/word/word.interfaces.contentcontrollistitemcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_2/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_2/word/word.interfaces.contentcontrollistitemdata.yml create mode 100644 docs/docs-ref-autogen/word_1_2/word/word.interfaces.contentcontrollistitemupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_2/word/word.interfaces.dropdownlistcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_3/word/word.interfaces.comboboxcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_3/word/word.interfaces.contentcontrollistitemcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_3/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_3/word/word.interfaces.contentcontrollistitemdata.yml create mode 100644 docs/docs-ref-autogen/word_1_3/word/word.interfaces.contentcontrollistitemupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_3/word/word.interfaces.dropdownlistcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_3_hidden_document/word/word.interfaces.comboboxcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_3_hidden_document/word/word.interfaces.contentcontrollistitemcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_3_hidden_document/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_3_hidden_document/word/word.interfaces.contentcontrollistitemdata.yml create mode 100644 docs/docs-ref-autogen/word_1_3_hidden_document/word/word.interfaces.contentcontrollistitemupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_3_hidden_document/word/word.interfaces.dropdownlistcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_4/word/word.interfaces.comboboxcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_4/word/word.interfaces.contentcontrollistitemcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_4/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_4/word/word.interfaces.contentcontrollistitemdata.yml create mode 100644 docs/docs-ref-autogen/word_1_4/word/word.interfaces.contentcontrollistitemupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_4/word/word.interfaces.dropdownlistcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_4_hidden_document/word/word.interfaces.comboboxcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_4_hidden_document/word/word.interfaces.contentcontrollistitemcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_4_hidden_document/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_4_hidden_document/word/word.interfaces.contentcontrollistitemdata.yml create mode 100644 docs/docs-ref-autogen/word_1_4_hidden_document/word/word.interfaces.contentcontrollistitemupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_4_hidden_document/word/word.interfaces.dropdownlistcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_5/word/word.interfaces.comboboxcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_5/word/word.interfaces.contentcontrollistitemcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_5/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_5/word/word.interfaces.contentcontrollistitemdata.yml create mode 100644 docs/docs-ref-autogen/word_1_5/word/word.interfaces.contentcontrollistitemupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_5/word/word.interfaces.dropdownlistcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_5_hidden_document/word/word.interfaces.comboboxcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_5_hidden_document/word/word.interfaces.contentcontrollistitemcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_5_hidden_document/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_5_hidden_document/word/word.interfaces.contentcontrollistitemdata.yml create mode 100644 docs/docs-ref-autogen/word_1_5_hidden_document/word/word.interfaces.contentcontrollistitemupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_5_hidden_document/word/word.interfaces.dropdownlistcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_6/word/word.interfaces.comboboxcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_6/word/word.interfaces.contentcontrollistitemcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_6/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_6/word/word.interfaces.contentcontrollistitemdata.yml create mode 100644 docs/docs-ref-autogen/word_1_6/word/word.interfaces.contentcontrollistitemupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_6/word/word.interfaces.dropdownlistcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_7/word/word.interfaces.comboboxcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrollistitemcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrollistitemdata.yml create mode 100644 docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrollistitemupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_7/word/word.interfaces.dropdownlistcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_8/word/word.interfaces.comboboxcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrollistitemcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrollistitemdata.yml create mode 100644 docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrollistitemupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_8/word/word.interfaces.dropdownlistcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/toc.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.alignment.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.annotation.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.annotationclickedeventargs.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.annotationcollection.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.annotationhoveredeventargs.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.annotationinsertedeventargs.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.annotationpopupactioneventargs.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.annotationremovedeventargs.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.annotationset.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.annotationstate.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.application.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.body.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.bodytype.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.borderlocation.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.bordertype.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.breaktype.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.builtinstylename.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.cellpaddinglocation.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.changetrackingmode.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.changetrackingstate.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.changetrackingversion.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.checkboxcontentcontrol.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.closebehavior.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.comboboxcontentcontrol.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.comment.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.commentcollection.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.commentcontentrange.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.commentreply.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.commentreplycollection.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.contentcontrol.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.contentcontroladdedeventargs.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.contentcontrolappearance.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.contentcontrolcollection.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.contentcontroldatachangedeventargs.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.contentcontroldeletedeventargs.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.contentcontrolenteredeventargs.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.contentcontrolexitedeventargs.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.contentcontrollistitem.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.contentcontrollistitemcollection.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.contentcontroloptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.contentcontrolselectionchangedeventargs.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.contentcontroltype.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.critique.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.critiqueannotation.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.critiquecolorscheme.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.critiquepopupoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.customproperty.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.custompropertycollection.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.customxmlpart.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.customxmlpartcollection.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.customxmlpartscopedcollection.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.document.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.documentcreated.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.documentproperties.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.documentpropertytype.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.dropdownlistcontentcontrol.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.errorcodes.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.eventsource.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.eventtype.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.field.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.fieldcollection.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.fieldkind.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.fieldtype.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.font.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.gettextoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.headerfootertype.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.inlinepicture.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.inlinepicturecollection.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.insertfileoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.insertlocation.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.annotationcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.annotationcollectionloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.annotationcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.annotationdata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.annotationloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.bodydata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.bodyloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.bodyupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.bordercollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.bordercollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.borderdata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.borderupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.checkboxcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.checkboxcontentcontrolloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.checkboxcontentcontrolupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.collectionloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.comboboxcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentcollectionloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentcontentrangedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentcontentrangeloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentcontentrangeupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentdata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentreplycollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentreplycollectionloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentreplycollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentreplydata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentreplyloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentreplyupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrolcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrolcollectionloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrolcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrollistitemcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrollistitemcollectionloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrollistitemdata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrollistitemloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrollistitemupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrolloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrolupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.critiqueannotationdata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.critiqueannotationloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.custompropertycollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.custompropertycollectionloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.custompropertycollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.custompropertydata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.custompropertyloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.custompropertyupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartcollectionloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartdata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartscopedcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartscopedcollectionloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartscopedcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentcreateddata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentcreatedloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentcreatedupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentdata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentpropertiesdata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentpropertiesloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentpropertiesupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.dropdownlistcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.fieldcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.fieldcollectionloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.fieldcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.fielddata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.fieldloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.fieldupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.fontdata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.fontloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.fontupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.inlinepicturecollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.inlinepicturecollectionloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.inlinepicturecollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.inlinepicturedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.inlinepictureloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.inlinepictureupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.listcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.listcollectionloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.listcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.listdata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.listitemdata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.listitemloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.listitemupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.listlevelcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.listlevelcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.listleveldata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.listlevelupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.listloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.listtemplatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.listtemplateupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.noteitemcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.noteitemcollectionloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.noteitemcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.noteitemdata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.noteitemloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.noteitemupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphcollectionloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphdata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphformatdata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphformatloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphformatupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.rangecollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.rangecollectionloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.rangecollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.rangedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.rangeloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.rangeupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.searchoptionsdata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.searchoptionsloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.searchoptionsupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.sectioncollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.sectioncollectionloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.sectioncollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.sectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.sectionloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.sectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.settingcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.settingcollectionloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.settingcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.settingdata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.settingloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.settingupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.shadingdata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.shadingloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.shadingupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.stylecollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.stylecollectionloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.stylecollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.styledata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.styleloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.styleupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.tableborderdata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.tableborderloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.tableborderupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecellcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecellcollectionloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecellcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecelldata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecellloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecellupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecollectionloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.tabledata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.tableloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablerowcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablerowcollectionloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablerowcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablerowdata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablerowloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablerowupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablestyledata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablestyleloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablestyleupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.tableupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.trackedchangecollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.trackedchangecollectionloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.trackedchangecollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.trackedchangedata.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.interfaces.trackedchangeloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.list.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.listbullet.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.listcollection.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.listitem.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.listleveltype.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.listnumbering.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.locationrelation.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.noteitem.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.noteitemcollection.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.noteitemtype.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.outlinelevel.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.paragraph.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.paragraphaddedeventargs.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.paragraphchangedeventargs.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.paragraphcollection.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.paragraphdeletedeventargs.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.paragraphformat.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.range.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.rangecollection.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.rangelocation.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.requestcontext.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.savebehavior.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.searchoptions.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.section.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.sectioncollection.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.selectionmode.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.setting.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.settingcollection.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.shading.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.style.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.stylecollection.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.styletype.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.table.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.tableborder.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.tablecell.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.tablecellcollection.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.tablecollection.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.tablerow.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.tablerowcollection.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.tablestyle.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.trackedchange.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.trackedchangecollection.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.trackedchangetype.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.underlinetype.yml create mode 100644 docs/docs-ref-autogen/word_1_9/word/word.verticalalignment.yml create mode 100644 docs/docs-ref-autogen/word_desktop_1_1/word/word.importedstylesconflictbehavior.yml create mode 100644 docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.comboboxcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrollistitemcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrollistitemdata.yml create mode 100644 docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrollistitemupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.dropdownlistcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_online/word/word.comboboxcontentcontrol.yml create mode 100644 docs/docs-ref-autogen/word_online/word/word.contentcontrollistitem.yml create mode 100644 docs/docs-ref-autogen/word_online/word/word.contentcontrollistitemcollection.yml create mode 100644 docs/docs-ref-autogen/word_online/word/word.dropdownlistcontentcontrol.yml create mode 100644 docs/docs-ref-autogen/word_online/word/word.interfaces.comboboxcontentcontroldata.yml create mode 100644 docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrollistitemcollectiondata.yml create mode 100644 docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrollistitemcollectionloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrollistitemdata.yml create mode 100644 docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrollistitemloadoptions.yml create mode 100644 docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrollistitemupdatedata.yml create mode 100644 docs/docs-ref-autogen/word_online/word/word.interfaces.dropdownlistcontentcontroldata.yml create mode 100644 docs/includes/word-1_9.md create mode 100644 docs/requirement-sets/word/word-api-1-9-requirement-set.md create mode 100644 generate-docs/api-extractor-inputs-word-release/word_1_9/api-extractor.json create mode 100644 generate-docs/api-extractor-inputs-word-release/word_1_9/dist/tsdoc-metadata.json create mode 100644 generate-docs/api-extractor-inputs-word-release/word_1_9/package.json create mode 100644 generate-docs/api-extractor-inputs-word-release/word_1_9/tsconfig.json create mode 100644 generate-docs/api-extractor-inputs-word-release/word_1_9/tsdoc-metadata.json create mode 100644 generate-docs/api-extractor-inputs-word-release/word_1_9/word.d.ts create mode 100644 generate-docs/api-extractor-inputs-word-release/word_desktop_1_1/word-desktop4.d.ts diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index 8191de304c..81710ad6af 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -63,6 +63,7 @@ "word-js-1.7", "word-js-1.8", "word-js-desktop-1.1", + "word-js-1.9", "word-js-online" ], "open_to_public_contributors": true, @@ -349,6 +350,10 @@ "ReferenceTOC": "docs/docs-ref-autogen/word_desktop_1_1/toc.yml", "ConceptualTOCUrl": "/office/dev/add-ins/toc.json" }, + { + "ReferenceTOC": "docs/docs-ref-autogen/word_1_9/toc.yml", + "ConceptualTOCUrl": "/office/dev/add-ins/toc.json" + }, { "ReferenceTOC": "docs/docs-ref-autogen/word_online/toc.yml", "ConceptualTOCUrl": "/office/dev/add-ins/toc.json" diff --git a/docs/docfx.json b/docs/docfx.json index 40a097aa9d..08d1350d7c 100644 --- a/docs/docfx.json +++ b/docs/docfx.json @@ -791,6 +791,18 @@ "src": "docs-ref-autogen/word_desktop_1_1", "dest": "api" }, + { + "files": ["**/toc.yml"], + "group": "word-js-1.9", + "src": "docs-ref-autogen/word_1_9", + "dest": "api/office-js-docs-reference" + }, + { + "files": ["**/*.md", "**/*.yml"], + "group": "word-js-1.9", + "src": "docs-ref-autogen/word_1_9", + "dest": "api" + }, { "files": ["**/toc.yml"], "group": "word-js-online", @@ -1043,6 +1055,10 @@ "dest": "word-js-desktop-1.1", "moniker_range": "word-js-desktop-1.1" }, + "word-js-1.9": { + "dest": "word-js-1.9", + "moniker_range": "word-js-1.9" + }, "word-js-online": { "dest": "word-js-online", "moniker_range": "word-js-online" @@ -1153,6 +1169,7 @@ "docs-ref-autogen/word_1_6/**": "word", "docs-ref-autogen/word_1_7/**": "word", "docs-ref-autogen/word_1_8/**": "word", + "docs-ref-autogen/word_1_9/**": "word", "docs-ref-autogen/word_online/**": "word", "docs-ref-autogen/word_1_3_hidden_document/**": "word", "docs-ref-autogen/word_1_4_hidden_document/**": "word", diff --git a/docs/docs-ref-autogen/common/toc.yml b/docs/docs-ref-autogen/common/toc.yml index 053237cd1a..5841733af6 100644 --- a/docs/docs-ref-autogen/common/toc.yml +++ b/docs/docs-ref-autogen/common/toc.yml @@ -845,6 +845,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/common_preview/toc.yml b/docs/docs-ref-autogen/common_preview/toc.yml index a741ec9e13..89b2d5d417 100644 --- a/docs/docs-ref-autogen/common_preview/toc.yml +++ b/docs/docs-ref-autogen/common_preview/toc.yml @@ -847,6 +847,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/excel/toc.yml b/docs/docs-ref-autogen/excel/toc.yml index deb43718c6..8772365372 100644 --- a/docs/docs-ref-autogen/excel/toc.yml +++ b/docs/docs-ref-autogen/excel/toc.yml @@ -1995,6 +1995,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/excel_1_1/toc.yml b/docs/docs-ref-autogen/excel_1_1/toc.yml index 432540aa1a..536cdb6e96 100644 --- a/docs/docs-ref-autogen/excel_1_1/toc.yml +++ b/docs/docs-ref-autogen/excel_1_1/toc.yml @@ -987,6 +987,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/excel_1_10/toc.yml b/docs/docs-ref-autogen/excel_1_10/toc.yml index ce61f9240d..b418b2f1f7 100644 --- a/docs/docs-ref-autogen/excel_1_10/toc.yml +++ b/docs/docs-ref-autogen/excel_1_10/toc.yml @@ -1671,6 +1671,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/excel_1_11/toc.yml b/docs/docs-ref-autogen/excel_1_11/toc.yml index 03ff4bd0d4..4d17623581 100644 --- a/docs/docs-ref-autogen/excel_1_11/toc.yml +++ b/docs/docs-ref-autogen/excel_1_11/toc.yml @@ -1683,6 +1683,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/excel_1_12/toc.yml b/docs/docs-ref-autogen/excel_1_12/toc.yml index 7d88e03830..9a3813c315 100644 --- a/docs/docs-ref-autogen/excel_1_12/toc.yml +++ b/docs/docs-ref-autogen/excel_1_12/toc.yml @@ -1729,6 +1729,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/excel_1_13/toc.yml b/docs/docs-ref-autogen/excel_1_13/toc.yml index f95c259e7d..1dad5bf7a3 100644 --- a/docs/docs-ref-autogen/excel_1_13/toc.yml +++ b/docs/docs-ref-autogen/excel_1_13/toc.yml @@ -1739,6 +1739,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/excel_1_14/toc.yml b/docs/docs-ref-autogen/excel_1_14/toc.yml index a0b201a673..f1c5e500a0 100644 --- a/docs/docs-ref-autogen/excel_1_14/toc.yml +++ b/docs/docs-ref-autogen/excel_1_14/toc.yml @@ -1757,6 +1757,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/excel_1_15/toc.yml b/docs/docs-ref-autogen/excel_1_15/toc.yml index 7391bfa78e..682c945ad9 100644 --- a/docs/docs-ref-autogen/excel_1_15/toc.yml +++ b/docs/docs-ref-autogen/excel_1_15/toc.yml @@ -1761,6 +1761,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/excel_1_16/toc.yml b/docs/docs-ref-autogen/excel_1_16/toc.yml index 7adfcbb88f..4797bb6de0 100644 --- a/docs/docs-ref-autogen/excel_1_16/toc.yml +++ b/docs/docs-ref-autogen/excel_1_16/toc.yml @@ -1891,6 +1891,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/excel_1_17/toc.yml b/docs/docs-ref-autogen/excel_1_17/toc.yml index 7c5e1ec1fd..c1163f2544 100644 --- a/docs/docs-ref-autogen/excel_1_17/toc.yml +++ b/docs/docs-ref-autogen/excel_1_17/toc.yml @@ -1897,6 +1897,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/excel_1_2/toc.yml b/docs/docs-ref-autogen/excel_1_2/toc.yml index 7a71635e9b..883cd0c22d 100644 --- a/docs/docs-ref-autogen/excel_1_2/toc.yml +++ b/docs/docs-ref-autogen/excel_1_2/toc.yml @@ -1084,6 +1084,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/excel_1_3/toc.yml b/docs/docs-ref-autogen/excel_1_3/toc.yml index 50515b4dd5..2ac8fd5862 100644 --- a/docs/docs-ref-autogen/excel_1_3/toc.yml +++ b/docs/docs-ref-autogen/excel_1_3/toc.yml @@ -1092,6 +1092,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/excel_1_4/toc.yml b/docs/docs-ref-autogen/excel_1_4/toc.yml index 5a8c5a4e0e..6784c71b85 100644 --- a/docs/docs-ref-autogen/excel_1_4/toc.yml +++ b/docs/docs-ref-autogen/excel_1_4/toc.yml @@ -1100,6 +1100,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/excel_1_5/toc.yml b/docs/docs-ref-autogen/excel_1_5/toc.yml index efa82ab9c0..aefcd9a34b 100644 --- a/docs/docs-ref-autogen/excel_1_5/toc.yml +++ b/docs/docs-ref-autogen/excel_1_5/toc.yml @@ -1108,6 +1108,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/excel_1_6/toc.yml b/docs/docs-ref-autogen/excel_1_6/toc.yml index 5586aeaedd..c42d6a89ba 100644 --- a/docs/docs-ref-autogen/excel_1_6/toc.yml +++ b/docs/docs-ref-autogen/excel_1_6/toc.yml @@ -1190,6 +1190,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/excel_1_7/toc.yml b/docs/docs-ref-autogen/excel_1_7/toc.yml index 1021519570..020a90b293 100644 --- a/docs/docs-ref-autogen/excel_1_7/toc.yml +++ b/docs/docs-ref-autogen/excel_1_7/toc.yml @@ -1292,6 +1292,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/excel_1_8/toc.yml b/docs/docs-ref-autogen/excel_1_8/toc.yml index d4a21c484a..849cf7a4c5 100644 --- a/docs/docs-ref-autogen/excel_1_8/toc.yml +++ b/docs/docs-ref-autogen/excel_1_8/toc.yml @@ -1386,6 +1386,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/excel_1_9/toc.yml b/docs/docs-ref-autogen/excel_1_9/toc.yml index 09a0dbdf7e..b101ccaf09 100644 --- a/docs/docs-ref-autogen/excel_1_9/toc.yml +++ b/docs/docs-ref-autogen/excel_1_9/toc.yml @@ -1627,6 +1627,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/excel_online/toc.yml b/docs/docs-ref-autogen/excel_online/toc.yml index d2c5e2ce47..f88d57977f 100644 --- a/docs/docs-ref-autogen/excel_online/toc.yml +++ b/docs/docs-ref-autogen/excel_online/toc.yml @@ -1913,6 +1913,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/onenote/toc.yml b/docs/docs-ref-autogen/onenote/toc.yml index 281d59afcf..dcaa73f3b3 100644 --- a/docs/docs-ref-autogen/onenote/toc.yml +++ b/docs/docs-ref-autogen/onenote/toc.yml @@ -949,6 +949,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/outlook/toc.yml b/docs/docs-ref-autogen/outlook/toc.yml index 4f8a82fcd4..db71dc804a 100644 --- a/docs/docs-ref-autogen/outlook/toc.yml +++ b/docs/docs-ref-autogen/outlook/toc.yml @@ -1049,6 +1049,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/outlook_1_1/toc.yml b/docs/docs-ref-autogen/outlook_1_1/toc.yml index 8245aa7257..00c8f728ea 100644 --- a/docs/docs-ref-autogen/outlook_1_1/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_1/toc.yml @@ -915,6 +915,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/outlook_1_10/toc.yml b/docs/docs-ref-autogen/outlook_1_10/toc.yml index 483561fd69..1f3479d4b0 100644 --- a/docs/docs-ref-autogen/outlook_1_10/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_10/toc.yml @@ -1005,6 +1005,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/outlook_1_11/toc.yml b/docs/docs-ref-autogen/outlook_1_11/toc.yml index 3bf22a3c7f..4d7b041de3 100644 --- a/docs/docs-ref-autogen/outlook_1_11/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_11/toc.yml @@ -1007,6 +1007,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/outlook_1_12/toc.yml b/docs/docs-ref-autogen/outlook_1_12/toc.yml index 61e5fa1e1a..6bbd7aac12 100644 --- a/docs/docs-ref-autogen/outlook_1_12/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_12/toc.yml @@ -1009,6 +1009,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/outlook_1_13/toc.yml b/docs/docs-ref-autogen/outlook_1_13/toc.yml index 8382e8db7f..bda88ae369 100644 --- a/docs/docs-ref-autogen/outlook_1_13/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_13/toc.yml @@ -1021,6 +1021,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/outlook_1_14/toc.yml b/docs/docs-ref-autogen/outlook_1_14/toc.yml index 6af3bd74ad..04cdbbf7b2 100644 --- a/docs/docs-ref-autogen/outlook_1_14/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_14/toc.yml @@ -1035,6 +1035,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/outlook_1_2/toc.yml b/docs/docs-ref-autogen/outlook_1_2/toc.yml index cd5f3af468..998e685d45 100644 --- a/docs/docs-ref-autogen/outlook_1_2/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_2/toc.yml @@ -917,6 +917,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/outlook_1_3/toc.yml b/docs/docs-ref-autogen/outlook_1_3/toc.yml index eb6d9095f7..1b6a366c20 100644 --- a/docs/docs-ref-autogen/outlook_1_3/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_3/toc.yml @@ -925,6 +925,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/outlook_1_4/toc.yml b/docs/docs-ref-autogen/outlook_1_4/toc.yml index eb6d9095f7..1b6a366c20 100644 --- a/docs/docs-ref-autogen/outlook_1_4/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_4/toc.yml @@ -925,6 +925,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/outlook_1_5/toc.yml b/docs/docs-ref-autogen/outlook_1_5/toc.yml index eb6d9095f7..1b6a366c20 100644 --- a/docs/docs-ref-autogen/outlook_1_5/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_5/toc.yml @@ -925,6 +925,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/outlook_1_6/toc.yml b/docs/docs-ref-autogen/outlook_1_6/toc.yml index eb6d9095f7..1b6a366c20 100644 --- a/docs/docs-ref-autogen/outlook_1_6/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_6/toc.yml @@ -925,6 +925,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/outlook_1_7/toc.yml b/docs/docs-ref-autogen/outlook_1_7/toc.yml index 202c673ac5..33c83da0dd 100644 --- a/docs/docs-ref-autogen/outlook_1_7/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_7/toc.yml @@ -955,6 +955,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/outlook_1_8/toc.yml b/docs/docs-ref-autogen/outlook_1_8/toc.yml index 205867fd83..4e60e43d1f 100644 --- a/docs/docs-ref-autogen/outlook_1_8/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_8/toc.yml @@ -989,6 +989,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/outlook_1_9/toc.yml b/docs/docs-ref-autogen/outlook_1_9/toc.yml index 205867fd83..4e60e43d1f 100644 --- a/docs/docs-ref-autogen/outlook_1_9/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_9/toc.yml @@ -989,6 +989,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/overview/overview.md b/docs/docs-ref-autogen/overview/overview.md index 8f2bbe6e0d..ea2b85c1ce 100644 --- a/docs/docs-ref-autogen/overview/overview.md +++ b/docs/docs-ref-autogen/overview/overview.md @@ -76,6 +76,7 @@ The following is a list of APIs for the [supported Office host applications](/of
  • WordApiHiddenDocument 1.5 (Desktop only)
  • WordApiHiddenDocument 1.4 (Desktop only)
  • WordApiHiddenDocument 1.3 (Desktop only)
  • +
  • WordApi 1.9
  • WordApi 1.8
  • WordApi 1.7
  • WordApi 1.6
  • diff --git a/docs/docs-ref-autogen/powerpoint/toc.yml b/docs/docs-ref-autogen/powerpoint/toc.yml index 68535a2ed2..a483d0a574 100644 --- a/docs/docs-ref-autogen/powerpoint/toc.yml +++ b/docs/docs-ref-autogen/powerpoint/toc.yml @@ -945,6 +945,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/powerpoint_1_1/toc.yml b/docs/docs-ref-autogen/powerpoint_1_1/toc.yml index 9271f755da..89281baf02 100644 --- a/docs/docs-ref-autogen/powerpoint_1_1/toc.yml +++ b/docs/docs-ref-autogen/powerpoint_1_1/toc.yml @@ -857,6 +857,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/powerpoint_1_2/toc.yml b/docs/docs-ref-autogen/powerpoint_1_2/toc.yml index e2e5977568..02cd244fe5 100644 --- a/docs/docs-ref-autogen/powerpoint_1_2/toc.yml +++ b/docs/docs-ref-autogen/powerpoint_1_2/toc.yml @@ -865,6 +865,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/powerpoint_1_3/toc.yml b/docs/docs-ref-autogen/powerpoint_1_3/toc.yml index 04c7b764fe..552d31423f 100644 --- a/docs/docs-ref-autogen/powerpoint_1_3/toc.yml +++ b/docs/docs-ref-autogen/powerpoint_1_3/toc.yml @@ -883,6 +883,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/powerpoint_1_4/toc.yml b/docs/docs-ref-autogen/powerpoint_1_4/toc.yml index a365c85c24..4a04b19b13 100644 --- a/docs/docs-ref-autogen/powerpoint_1_4/toc.yml +++ b/docs/docs-ref-autogen/powerpoint_1_4/toc.yml @@ -919,6 +919,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/powerpoint_1_5/toc.yml b/docs/docs-ref-autogen/powerpoint_1_5/toc.yml index 5c66cdb457..a7fcbd88f7 100644 --- a/docs/docs-ref-autogen/powerpoint_1_5/toc.yml +++ b/docs/docs-ref-autogen/powerpoint_1_5/toc.yml @@ -923,6 +923,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/powerpoint_1_6/toc.yml b/docs/docs-ref-autogen/powerpoint_1_6/toc.yml index 6cd35637cf..96f036d120 100644 --- a/docs/docs-ref-autogen/powerpoint_1_6/toc.yml +++ b/docs/docs-ref-autogen/powerpoint_1_6/toc.yml @@ -927,6 +927,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/visio/toc.yml b/docs/docs-ref-autogen/visio/toc.yml index 5eda3a14a8..d27dd26f43 100644 --- a/docs/docs-ref-autogen/visio/toc.yml +++ b/docs/docs-ref-autogen/visio/toc.yml @@ -703,6 +703,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/word/toc.yml b/docs/docs-ref-autogen/word/toc.yml index b26619b2be..55afb09764 100644 --- a/docs/docs-ref-autogen/word/toc.yml +++ b/docs/docs-ref-autogen/word/toc.yml @@ -73,6 +73,8 @@ items: uid: 'word!Word.HeaderFooterType:enum' - name: ImageFormat uid: 'word!Word.ImageFormat:enum' + - name: ImportedStylesConflictBehavior + uid: 'word!Word.ImportedStylesConflictBehavior:enum' - name: InsertLocation uid: 'word!Word.InsertLocation:enum' - name: ListBuiltInNumberStyle @@ -1113,6 +1115,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/word/word.yml b/docs/docs-ref-autogen/word/word.yml index cdb050d06f..b7fd9b0eb9 100644 --- a/docs/docs-ref-autogen/word/word.yml +++ b/docs/docs-ref-autogen/word/word.yml @@ -31,6 +31,7 @@ enums: - 'word!Word.FieldType:enum' - 'word!Word.HeaderFooterType:enum' - 'word!Word.ImageFormat:enum' + - 'word!Word.ImportedStylesConflictBehavior:enum' - 'word!Word.InsertLocation:enum' - 'word!Word.ListBuiltInNumberStyle:enum' - 'word!Word.ListBullet:enum' diff --git a/docs/docs-ref-autogen/word/word/word.body.yml b/docs/docs-ref-autogen/word/word/word.body.yml index bad794e0e6..e9327219c1 100644 --- a/docs/docs-ref-autogen/word/word/word.body.yml +++ b/docs/docs-ref-autogen/word/word/word.body.yml @@ -1037,7 +1037,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support are currently in preview. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples diff --git a/docs/docs-ref-autogen/word/word/word.comboboxcontentcontrol.yml b/docs/docs-ref-autogen/word/word/word.comboboxcontentcontrol.yml index a07517bb82..8fc81eafec 100644 --- a/docs/docs-ref-autogen/word/word/word.comboboxcontentcontrol.yml +++ b/docs/docs-ref-autogen/word/word/word.comboboxcontentcontrol.yml @@ -5,7 +5,7 @@ package: word! fullName: Word.ComboBoxContentControl summary: The data specific to content controls of type 'ComboBox'. remarks: >- - \[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] #### Examples @@ -14,7 +14,7 @@ remarks: >- ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-combo-box-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml // Places a combo box content control at the end of the selection. @@ -28,7 +28,7 @@ remarks: >- }); ``` -isPreview: true +isPreview: false isDeprecated: false type: class properties: @@ -40,7 +40,7 @@ properties: The request context associated with the object. This connects the add-in's process to the Office host application's process. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'context: RequestContext;' @@ -52,7 +52,7 @@ properties: fullName: listItems summary: Gets the collection of list items in the combo box content control. remarks: >- - \[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] #### Examples @@ -61,7 +61,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-combo-box-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml // Deletes the provided list item from the first combo box content control in the selection. @@ -111,7 +111,7 @@ properties: }); ``` - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'readonly listItems: Word.ContentControlListItemCollection;' @@ -126,7 +126,7 @@ methods: Adds a new list item to this combo box content control and returns a [Word.ContentControlListItem](xref:word!Word.ContentControlListItem:class) object. remarks: >- - \[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] #### Examples @@ -135,7 +135,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-combo-box-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml // Adds the provided list item to the first combo box content control in the selection. @@ -174,7 +174,7 @@ methods: }); ``` - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem;' @@ -199,7 +199,7 @@ methods: fullName: deleteAllListItems() summary: Deletes all list items in this combo box content control. remarks: >- - \[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] #### Examples @@ -208,7 +208,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-combo-box-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml // Deletes the list items from first combo box content control found in the selection. @@ -244,7 +244,7 @@ methods: }); ``` - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'deleteAllListItems(): void;' @@ -259,7 +259,7 @@ methods: Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'load(propertyNames?: string | string[]): Word.ComboBoxContentControl;' @@ -278,7 +278,7 @@ methods: Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: |- @@ -310,7 +310,7 @@ methods: returns a plain JavaScript object (typed as `Word.Interfaces.ComboBoxContentControlData`) that contains shallow copies of any loaded child properties from the original object. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'toJSON(): Word.Interfaces.ComboBoxContentControlData;' @@ -330,7 +330,7 @@ methods: object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'track(): Word.ComboBoxContentControl;' @@ -347,7 +347,7 @@ methods: -->. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'untrack(): Word.ComboBoxContentControl;' diff --git a/docs/docs-ref-autogen/word/word/word.contentcontrol.yml b/docs/docs-ref-autogen/word/word/word.contentcontrol.yml index af362a2eb1..10fa8a9b25 100644 --- a/docs/docs-ref-autogen/word/word/word.contentcontrol.yml +++ b/docs/docs-ref-autogen/word/word/word.contentcontrol.yml @@ -114,7 +114,7 @@ properties: uid: 'word!Word.ContentControl#checkboxContentControl:member' package: word! fullName: checkboxContentControl - summary: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + summary: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. remarks: >- \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] @@ -189,9 +189,9 @@ properties: uid: 'word!Word.ContentControl#comboBoxContentControl:member' package: word! fullName: comboBoxContentControl - summary: Specifies the combo box-related data if the content control's type is 'ComboBox'. It's `null` otherwise. + summary: Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. remarks: >- - \[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] #### Examples @@ -200,7 +200,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-combo-box-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml // Adds the provided list item to the first combo box content control in the selection. @@ -239,7 +239,7 @@ properties: }); ``` - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'readonly comboBoxContentControl: Word.ComboBoxContentControl;' @@ -275,9 +275,9 @@ properties: uid: 'word!Word.ContentControl#dropDownListContentControl:member' package: word! fullName: dropDownListContentControl - summary: Specifies the dropdown list-related data if the content control's type is 'DropDownList'. It's `null` otherwise. + summary: Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. remarks: >- - \[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] #### Examples @@ -286,7 +286,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Adds the provided list item to the first dropdown list content control in the selection. @@ -325,7 +325,7 @@ properties: }); ``` - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'readonly dropDownListContentControl: Word.DropDownListContentControl;' diff --git a/docs/docs-ref-autogen/word/word/word.contentcontrollistitem.yml b/docs/docs-ref-autogen/word/word/word.contentcontrollistitem.yml index cdeb605e63..0a35a3f5a6 100644 --- a/docs/docs-ref-autogen/word/word/word.contentcontrollistitem.yml +++ b/docs/docs-ref-autogen/word/word/word.contentcontrollistitem.yml @@ -5,7 +5,7 @@ package: word! fullName: Word.ContentControlListItem summary: Represents a list item in a dropdown list or combo box content control. remarks: >- - \[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] #### Examples @@ -14,7 +14,7 @@ remarks: >- ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Deletes the provided list item from the first dropdown list content control in the selection. @@ -64,7 +64,7 @@ remarks: >- }); ``` -isPreview: true +isPreview: false isDeprecated: false type: class properties: @@ -76,7 +76,7 @@ properties: The request context associated with the object. This connects the add-in's process to the Office host application's process. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'context: RequestContext;' @@ -88,7 +88,7 @@ properties: fullName: displayText summary: Specifies the display text of a list item for a dropdown list or combo box content control. remarks: >- - \[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] #### Examples @@ -97,7 +97,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Deletes the provided list item from the first dropdown list content control in the selection. @@ -147,7 +147,7 @@ properties: }); ``` - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'displayText: string;' @@ -158,8 +158,8 @@ properties: package: word! fullName: index summary: Specifies the index location of a content control list item in the collection of list items. - remarks: '\[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' - isPreview: true + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false isDeprecated: false syntax: content: 'index: number;' @@ -170,8 +170,8 @@ properties: package: word! fullName: value summary: Specifies the programmatic value of a list item for a dropdown list or combo box content control. - remarks: '\[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' - isPreview: true + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false isDeprecated: false syntax: content: 'value: string;' @@ -184,7 +184,7 @@ methods: fullName: delete() summary: Deletes the list item. remarks: >- - \[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] #### Examples @@ -193,7 +193,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-combo-box-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml // Deletes the provided list item from the first combo box content control in the selection. @@ -243,7 +243,7 @@ methods: }); ``` - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'delete(): void;' @@ -258,7 +258,7 @@ methods: Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'load(options?: Word.Interfaces.ContentControlListItemLoadOptions): Word.ContentControlListItem;' @@ -277,7 +277,7 @@ methods: Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'load(propertyNames?: string | string[]): Word.ContentControlListItem;' @@ -296,7 +296,7 @@ methods: Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: |- @@ -322,8 +322,8 @@ methods: package: word! fullName: select() summary: Selects the list item and sets the text of the content control to the value of the list item. - remarks: '\[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' - isPreview: true + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false isDeprecated: false syntax: content: 'select(): void;' @@ -338,7 +338,7 @@ methods: Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'set(properties: Interfaces.ContentControlListItemUpdateData, options?: OfficeExtension.UpdateOptions): void;' @@ -360,7 +360,7 @@ methods: fullName: set(properties) summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'set(properties: Word.ContentControlListItem): void;' @@ -382,7 +382,7 @@ methods: returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemData`) that contains shallow copies of any loaded child properties from the original object. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'toJSON(): Word.Interfaces.ContentControlListItemData;' @@ -402,7 +402,7 @@ methods: object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'track(): Word.ContentControlListItem;' @@ -419,7 +419,7 @@ methods: -->. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'untrack(): Word.ContentControlListItem;' diff --git a/docs/docs-ref-autogen/word/word/word.contentcontrollistitemcollection.yml b/docs/docs-ref-autogen/word/word/word.contentcontrollistitemcollection.yml index 65ff0fd185..3b732004af 100644 --- a/docs/docs-ref-autogen/word/word/word.contentcontrollistitemcollection.yml +++ b/docs/docs-ref-autogen/word/word/word.contentcontrollistitemcollection.yml @@ -7,7 +7,7 @@ summary: >- Contains a collection of [Word.ContentControlListItem](xref:word!Word.ContentControlListItem:class) objects that represent the items in a dropdown list or combo box content control. remarks: >- - \[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] #### Examples @@ -16,7 +16,7 @@ remarks: >- ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-combo-box-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml // Gets the list items from the first combo box content control found in the selection. @@ -53,7 +53,7 @@ remarks: >- }); ``` -isPreview: true +isPreview: false isDeprecated: false type: class properties: @@ -65,7 +65,7 @@ properties: The request context associated with the object. This connects the add-in's process to the Office host application's process. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'context: RequestContext;' @@ -77,7 +77,7 @@ properties: fullName: items summary: Gets the loaded child items in this collection. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'readonly items: Word.ContentControlListItem[];' @@ -89,8 +89,8 @@ methods: package: word! fullName: getFirst() summary: Gets the first list item in this collection. Throws an `ItemNotFound` error if this collection is empty. - remarks: '\[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' - isPreview: true + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false isDeprecated: false syntax: content: 'getFirst(): Word.ContentControlListItem;' @@ -106,8 +106,8 @@ methods: with its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). - remarks: '\[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' - isPreview: true + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false isDeprecated: false syntax: content: 'getFirstOrNullObject(): Word.ContentControlListItem;' @@ -122,7 +122,7 @@ methods: Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -145,7 +145,7 @@ methods: Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'load(propertyNames?: string | string[]): Word.ContentControlListItemCollection;' @@ -164,7 +164,7 @@ methods: Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ContentControlListItemCollection;' @@ -188,7 +188,7 @@ methods: method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'toJSON(): Word.Interfaces.ContentControlListItemCollectionData;' @@ -208,7 +208,7 @@ methods: object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'track(): Word.ContentControlListItemCollection;' @@ -225,7 +225,7 @@ methods: -->. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'untrack(): Word.ContentControlListItemCollection;' diff --git a/docs/docs-ref-autogen/word/word/word.contentcontroloptions.yml b/docs/docs-ref-autogen/word/word/word.contentcontroloptions.yml index d821a835af..d7b0a8acd7 100644 --- a/docs/docs-ref-autogen/word/word/word.contentcontroloptions.yml +++ b/docs/docs-ref-autogen/word/word/word.contentcontroloptions.yml @@ -72,7 +72,7 @@ properties: Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. 'DropDownList' - and 'ComboBox' support are currently in preview. + and 'ComboBox' support was added in WordApi 1.9. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/word/word/word.document.yml b/docs/docs-ref-autogen/word/word/word.document.yml index bf4ea5a17d..19a39ec1c3 100644 --- a/docs/docs-ref-autogen/word/word/word.document.yml +++ b/docs/docs-ref-autogen/word/word/word.document.yml @@ -753,15 +753,18 @@ methods: return: type: '' description: '' - - name: importStylesFromJson(stylesJson) + - name: 'importStylesFromJson(stylesJson, importedStylesConflictBehavior)' uid: 'word!Word.Document#importStylesFromJson:member(1)' package: word! - fullName: importStylesFromJson(stylesJson) + fullName: 'importStylesFromJson(stylesJson, importedStylesConflictBehavior)' summary: Import styles from a JSON-formatted string. remarks: >- \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + + #### Examples @@ -785,11 +788,45 @@ methods: isPreview: false isDeprecated: false syntax: - content: 'importStylesFromJson(stylesJson: string): OfficeExtension.ClientResult;' + content: >- + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): + OfficeExtension.ClientResult; parameters: - id: stylesJson description: Required. A JSON-formatted string representing the styles. type: string + - id: importedStylesConflictBehavior + description: >- + Optional. Specifies how to handle any imported styles with the same name as existing styles in the current + document. + type: '' + return: + type: '<string[]>' + description: '' + - name: 'importStylesFromJson(stylesJson, importedStylesConflictBehaviorString)' + uid: 'word!Word.Document#importStylesFromJson:member(2)' + package: word! + fullName: 'importStylesFromJson(stylesJson, importedStylesConflictBehaviorString)' + summary: Import styles from a JSON-formatted string. + remarks: |- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + isPreview: false + isDeprecated: false + syntax: + content: >- + importStylesFromJson(stylesJson: string, importedStylesConflictBehaviorString?: "Ignore" | "Overwrite" | + "CreateNew"): OfficeExtension.ClientResult; + parameters: + - id: stylesJson + description: Required. A JSON-formatted string representing the styles. + type: string + - id: importedStylesConflictBehaviorString + description: >- + Optional. Specifies how to handle any imported styles with the same name as existing styles in the current + document. + type: '"Ignore" | "Overwrite" | "CreateNew"' return: type: '<string[]>' description: '' diff --git a/docs/docs-ref-autogen/word/word/word.dropdownlistcontentcontrol.yml b/docs/docs-ref-autogen/word/word/word.dropdownlistcontentcontrol.yml index acd5f5c4b0..13f720a977 100644 --- a/docs/docs-ref-autogen/word/word/word.dropdownlistcontentcontrol.yml +++ b/docs/docs-ref-autogen/word/word/word.dropdownlistcontentcontrol.yml @@ -5,7 +5,7 @@ package: word! fullName: Word.DropDownListContentControl summary: The data specific to content controls of type DropDownList. remarks: >- - \[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] #### Examples @@ -14,7 +14,7 @@ remarks: >- ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Places a dropdown list content control at the end of the selection. @@ -28,7 +28,7 @@ remarks: >- }); ``` -isPreview: true +isPreview: false isDeprecated: false type: class properties: @@ -40,7 +40,7 @@ properties: The request context associated with the object. This connects the add-in's process to the Office host application's process. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'context: RequestContext;' @@ -52,7 +52,7 @@ properties: fullName: listItems summary: Gets the collection of list items in the dropdown list content control. remarks: >- - \[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] #### Examples @@ -61,7 +61,7 @@ properties: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Deletes the provided list item from the first dropdown list content control in the selection. @@ -111,7 +111,7 @@ properties: }); ``` - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'readonly listItems: Word.ContentControlListItemCollection;' @@ -126,7 +126,7 @@ methods: Adds a new list item to this dropdown list content control and returns a [Word.ContentControlListItem](xref:word!Word.ContentControlListItem:class) object. remarks: >- - \[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] #### Examples @@ -135,7 +135,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Adds the provided list item to the first dropdown list content control in the selection. @@ -174,7 +174,7 @@ methods: }); ``` - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem;' @@ -199,7 +199,7 @@ methods: fullName: deleteAllListItems() summary: Deletes all list items in this dropdown list content control. remarks: >- - \[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] #### Examples @@ -208,7 +208,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Deletes the list items from first dropdown list content control found in the selection. @@ -246,7 +246,7 @@ methods: }); ``` - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'deleteAllListItems(): void;' @@ -261,7 +261,7 @@ methods: Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'load(propertyNames?: string | string[]): Word.DropDownListContentControl;' @@ -280,7 +280,7 @@ methods: Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: |- @@ -312,7 +312,7 @@ methods: returns a plain JavaScript object (typed as `Word.Interfaces.DropDownListContentControlData`) that contains shallow copies of any loaded child properties from the original object. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'toJSON(): Word.Interfaces.DropDownListContentControlData;' @@ -332,7 +332,7 @@ methods: object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'track(): Word.DropDownListContentControl;' @@ -349,7 +349,7 @@ methods: -->. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'untrack(): Word.DropDownListContentControl;' diff --git a/docs/docs-ref-autogen/word/word/word.importedstylesconflictbehavior.yml b/docs/docs-ref-autogen/word/word/word.importedstylesconflictbehavior.yml new file mode 100644 index 0000000000..82c90238f7 --- /dev/null +++ b/docs/docs-ref-autogen/word/word/word.importedstylesconflictbehavior.yml @@ -0,0 +1,38 @@ +### YamlMime:TSEnum +name: Word.ImportedStylesConflictBehavior +uid: 'word!Word.ImportedStylesConflictBehavior:enum' +package: word! +fullName: Word.ImportedStylesConflictBehavior +summary: >- + Specifies how to handle any conflicts, that is, when imported styles have the same name as existing styles in the + current document. +remarks: '\[ [API set: WordApiDesktop 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +fields: + - name: createNew + uid: 'word!Word.ImportedStylesConflictBehavior.createNew:member' + package: word! + summary: >- + Rename conflicting imported styles so that both versions are kept in the current document. For example, if MyStyle + already exists in the document, then the imported version could be added as MyStyle1. + + + * \[ [API set: WordApiDesktop 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"CreateNew"' + - name: ignore + uid: 'word!Word.ImportedStylesConflictBehavior.ignore:member' + package: word! + summary: |- + Ignore conflicting imported styles and keep the existing version of those styles in the current document. + + * \[ [API set: WordApiDesktop 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Ignore"' + - name: overwrite + uid: 'word!Word.ImportedStylesConflictBehavior.overwrite:member' + package: word! + summary: |- + Overwrite the existing styles in the current document. + + * \[ [API set: WordApiDesktop 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Overwrite"' diff --git a/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrolcollectionloadoptions.yml b/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrolcollectionloadoptions.yml index e4d5e7eb32..91ad1b9984 100644 --- a/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrolcollectionloadoptions.yml +++ b/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrolcollectionloadoptions.yml @@ -74,8 +74,8 @@ properties: package: word! fullName: checkboxContentControl summary: >- - For EACH ITEM in the collection: Specifies the checkbox-related data if the content control's type is 'CheckBox'. - It's `null` otherwise. + For EACH ITEM in the collection: Gets the data of the content control when its type is 'CheckBox'. It's `null` + otherwise. remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/word/word/word.interfaces.contentcontroldata.yml b/docs/docs-ref-autogen/word/word/word.interfaces.contentcontroldata.yml index 63070159a1..c0549d0c74 100644 --- a/docs/docs-ref-autogen/word/word/word.interfaces.contentcontroldata.yml +++ b/docs/docs-ref-autogen/word/word/word.interfaces.contentcontroldata.yml @@ -51,7 +51,7 @@ properties: uid: 'word!Word.Interfaces.ContentControlData#checkboxContentControl:member' package: word! fullName: checkboxContentControl - summary: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + summary: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' isPreview: false isDeprecated: false @@ -75,9 +75,9 @@ properties: uid: 'word!Word.Interfaces.ContentControlData#comboBoxContentControl:member' package: word! fullName: comboBoxContentControl - summary: Specifies the combo box-related data if the content control's type is 'ComboBox'. It's `null` otherwise. - remarks: '\[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' - isPreview: true + summary: Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false isDeprecated: false syntax: content: 'comboBoxContentControl?: Word.Interfaces.ComboBoxContentControlData;' @@ -99,9 +99,9 @@ properties: uid: 'word!Word.Interfaces.ContentControlData#dropDownListContentControl:member' package: word! fullName: dropDownListContentControl - summary: Specifies the dropdown list-related data if the content control's type is 'DropDownList'. It's `null` otherwise. - remarks: '\[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' - isPreview: true + summary: Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false isDeprecated: false syntax: content: 'dropDownListContentControl?: Word.Interfaces.DropDownListContentControlData;' diff --git a/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrollistitemcollectionloadoptions.yml b/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrollistitemcollectionloadoptions.yml index f29a12210e..007570b4e8 100644 --- a/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrollistitemcollectionloadoptions.yml +++ b/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrollistitemcollectionloadoptions.yml @@ -6,8 +6,8 @@ fullName: Word.Interfaces.ContentControlListItemCollectionLoadOptions summary: >- Contains a collection of [Word.ContentControlListItem](xref:word!Word.ContentControlListItem:class) objects that represent the items in a dropdown list or combo box content control. -remarks: '\[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' -isPreview: true +remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false isDeprecated: false type: interface properties: @@ -19,7 +19,7 @@ properties: Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: '$all?: boolean;' @@ -32,8 +32,8 @@ properties: summary: >- For EACH ITEM in the collection: Specifies the display text of a list item for a dropdown list or combo box content control. - remarks: '\[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' - isPreview: true + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false isDeprecated: false syntax: content: 'displayText?: boolean;' @@ -46,8 +46,8 @@ properties: summary: >- For EACH ITEM in the collection: Specifies the index location of a content control list item in the collection of list items. - remarks: '\[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' - isPreview: true + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false isDeprecated: false syntax: content: 'index?: boolean;' @@ -60,8 +60,8 @@ properties: summary: >- For EACH ITEM in the collection: Specifies the programmatic value of a list item for a dropdown list or combo box content control. - remarks: '\[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' - isPreview: true + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false isDeprecated: false syntax: content: 'value?: boolean;' diff --git a/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrollistitemdata.yml b/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrollistitemdata.yml index 88f05a1384..69ef8934f1 100644 --- a/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrollistitemdata.yml +++ b/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrollistitemdata.yml @@ -14,8 +14,8 @@ properties: package: word! fullName: displayText summary: Specifies the display text of a list item for a dropdown list or combo box content control. - remarks: '\[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' - isPreview: true + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false isDeprecated: false syntax: content: 'displayText?: string;' @@ -26,8 +26,8 @@ properties: package: word! fullName: index summary: Specifies the index location of a content control list item in the collection of list items. - remarks: '\[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' - isPreview: true + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false isDeprecated: false syntax: content: 'index?: number;' @@ -38,8 +38,8 @@ properties: package: word! fullName: value summary: Specifies the programmatic value of a list item for a dropdown list or combo box content control. - remarks: '\[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' - isPreview: true + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false isDeprecated: false syntax: content: 'value?: string;' diff --git a/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrollistitemloadoptions.yml b/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrollistitemloadoptions.yml index 6baee84ce5..3961f99bcc 100644 --- a/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrollistitemloadoptions.yml +++ b/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrollistitemloadoptions.yml @@ -4,8 +4,8 @@ uid: 'word!Word.Interfaces.ContentControlListItemLoadOptions:interface' package: word! fullName: Word.Interfaces.ContentControlListItemLoadOptions summary: Represents a list item in a dropdown list or combo box content control. -remarks: '\[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' -isPreview: true +remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false isDeprecated: false type: interface properties: @@ -17,7 +17,7 @@ properties: Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). remarks: '' - isPreview: true + isPreview: false isDeprecated: false syntax: content: '$all?: boolean;' @@ -28,8 +28,8 @@ properties: package: word! fullName: displayText summary: Specifies the display text of a list item for a dropdown list or combo box content control. - remarks: '\[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' - isPreview: true + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false isDeprecated: false syntax: content: 'displayText?: boolean;' @@ -40,8 +40,8 @@ properties: package: word! fullName: index summary: Specifies the index location of a content control list item in the collection of list items. - remarks: '\[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' - isPreview: true + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false isDeprecated: false syntax: content: 'index?: boolean;' @@ -52,8 +52,8 @@ properties: package: word! fullName: value summary: Specifies the programmatic value of a list item for a dropdown list or combo box content control. - remarks: '\[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' - isPreview: true + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false isDeprecated: false syntax: content: 'value?: boolean;' diff --git a/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrollistitemupdatedata.yml b/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrollistitemupdatedata.yml index 42511b38a7..278599b7da 100644 --- a/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrollistitemupdatedata.yml +++ b/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrollistitemupdatedata.yml @@ -16,8 +16,8 @@ properties: package: word! fullName: displayText summary: Specifies the display text of a list item for a dropdown list or combo box content control. - remarks: '\[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' - isPreview: true + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false isDeprecated: false syntax: content: 'displayText?: string;' @@ -28,8 +28,8 @@ properties: package: word! fullName: index summary: Specifies the index location of a content control list item in the collection of list items. - remarks: '\[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' - isPreview: true + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false isDeprecated: false syntax: content: 'index?: number;' @@ -40,8 +40,8 @@ properties: package: word! fullName: value summary: Specifies the programmatic value of a list item for a dropdown list or combo box content control. - remarks: '\[ [API set: WordApi BETA (PREVIEW ONLY)](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' - isPreview: true + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false isDeprecated: false syntax: content: 'value?: string;' diff --git a/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrolloadoptions.yml b/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrolloadoptions.yml index 781dc0c5f9..2b497a9074 100644 --- a/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrolloadoptions.yml +++ b/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrolloadoptions.yml @@ -68,7 +68,7 @@ properties: uid: 'word!Word.Interfaces.ContentControlLoadOptions#checkboxContentControl:member' package: word! fullName: checkboxContentControl - summary: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + summary: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrolupdatedata.yml b/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrolupdatedata.yml index cb78a93109..001ea1bf3d 100644 --- a/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrolupdatedata.yml +++ b/docs/docs-ref-autogen/word/word/word.interfaces.contentcontrolupdatedata.yml @@ -51,7 +51,7 @@ properties: uid: 'word!Word.Interfaces.ContentControlUpdateData#checkboxContentControl:member' package: word! fullName: checkboxContentControl - summary: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + summary: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/word/word/word.paragraph.yml b/docs/docs-ref-autogen/word/word/word.paragraph.yml index 83c6e26a18..df3b5c0ecf 100644 --- a/docs/docs-ref-autogen/word/word/word.paragraph.yml +++ b/docs/docs-ref-autogen/word/word/word.paragraph.yml @@ -1509,7 +1509,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support are currently in preview. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples diff --git a/docs/docs-ref-autogen/word/word/word.range.yml b/docs/docs-ref-autogen/word/word/word.range.yml index bc3266d49b..ed8c714b26 100644 --- a/docs/docs-ref-autogen/word/word/word.range.yml +++ b/docs/docs-ref-autogen/word/word/word.range.yml @@ -998,7 +998,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Places a dropdown list content control at the end of the selection. @@ -1307,7 +1307,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support are currently in preview. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples diff --git a/docs/docs-ref-autogen/word_1_1/toc.yml b/docs/docs-ref-autogen/word_1_1/toc.yml index cc98c2e851..cac4a1e3ec 100644 --- a/docs/docs-ref-autogen/word_1_1/toc.yml +++ b/docs/docs-ref-autogen/word_1_1/toc.yml @@ -899,6 +899,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/word_1_1/word.yml b/docs/docs-ref-autogen/word_1_1/word.yml index c247c121ed..bcd5c84a94 100644 --- a/docs/docs-ref-autogen/word_1_1/word.yml +++ b/docs/docs-ref-autogen/word_1_1/word.yml @@ -44,6 +44,7 @@ interfaces: - 'word!Word.Interfaces.CheckboxContentControlData:interface' - 'word!Word.Interfaces.CheckboxContentControlUpdateData:interface' - 'word!Word.Interfaces.CollectionLoadOptions:interface' + - 'word!Word.Interfaces.ComboBoxContentControlData:interface' - 'word!Word.Interfaces.CommentCollectionData:interface' - 'word!Word.Interfaces.CommentCollectionUpdateData:interface' - 'word!Word.Interfaces.CommentContentRangeData:interface' @@ -58,6 +59,10 @@ interfaces: - 'word!Word.Interfaces.ContentControlCollectionLoadOptions:interface' - 'word!Word.Interfaces.ContentControlCollectionUpdateData:interface' - 'word!Word.Interfaces.ContentControlData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' + - 'word!Word.Interfaces.ContentControlListItemData:interface' + - 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' - 'word!Word.Interfaces.ContentControlLoadOptions:interface' - 'word!Word.Interfaces.ContentControlUpdateData:interface' - 'word!Word.Interfaces.CritiqueAnnotationData:interface' @@ -77,6 +82,7 @@ interfaces: - 'word!Word.Interfaces.DocumentPropertiesData:interface' - 'word!Word.Interfaces.DocumentPropertiesUpdateData:interface' - 'word!Word.Interfaces.DocumentUpdateData:interface' + - 'word!Word.Interfaces.DropDownListContentControlData:interface' - 'word!Word.Interfaces.FieldCollectionData:interface' - 'word!Word.Interfaces.FieldCollectionUpdateData:interface' - 'word!Word.Interfaces.FieldData:interface' diff --git a/docs/docs-ref-autogen/word_1_1/word/word.body.yml b/docs/docs-ref-autogen/word_1_1/word/word.body.yml index e5db3f459a..ff9a15a026 100644 --- a/docs/docs-ref-autogen/word_1_1/word/word.body.yml +++ b/docs/docs-ref-autogen/word_1_1/word/word.body.yml @@ -495,7 +495,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -530,16 +530,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_1/word/word.interfaces.comboboxcontentcontroldata.yml b/docs/docs-ref-autogen/word_1_1/word/word.interfaces.comboboxcontentcontroldata.yml new file mode 100644 index 0000000000..6032dbb944 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_1/word/word.interfaces.comboboxcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ComboBoxContentControlData +uid: 'word!Word.Interfaces.ComboBoxContentControlData:interface' +package: word! +fullName: Word.Interfaces.ComboBoxContentControlData +summary: An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_1/word/word.interfaces.contentcontrollistitemcollectiondata.yml b/docs/docs-ref-autogen/word_1_1/word/word.interfaces.contentcontrollistitemcollectiondata.yml new file mode 100644 index 0000000000..75af720340 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_1/word/word.interfaces.contentcontrollistitemcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionData +summary: An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_1/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_1/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml new file mode 100644 index 0000000000..e22526b0d5 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_1/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionUpdateData +summary: >- + An interface for updating data on the `ContentControlListItemCollection` object, for use in + `contentControlListItemCollection.set({ ... })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_1/word/word.interfaces.contentcontrollistitemdata.yml b/docs/docs-ref-autogen/word_1_1/word/word.interfaces.contentcontrollistitemdata.yml new file mode 100644 index 0000000000..b14d4ec6c2 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_1/word/word.interfaces.contentcontrollistitemdata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemData +uid: 'word!Word.Interfaces.ContentControlListItemData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemData +summary: An interface describing the data returned by calling `contentControlListItem.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_1/word/word.interfaces.contentcontrollistitemupdatedata.yml b/docs/docs-ref-autogen/word_1_1/word/word.interfaces.contentcontrollistitemupdatedata.yml new file mode 100644 index 0000000000..94e73591c6 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_1/word/word.interfaces.contentcontrollistitemupdatedata.yml @@ -0,0 +1,12 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemUpdateData +summary: >- + An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... + })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_1/word/word.interfaces.dropdownlistcontentcontroldata.yml b/docs/docs-ref-autogen/word_1_1/word/word.interfaces.dropdownlistcontentcontroldata.yml new file mode 100644 index 0000000000..0802e15d92 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_1/word/word.interfaces.dropdownlistcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.DropDownListContentControlData +uid: 'word!Word.Interfaces.DropDownListContentControlData:interface' +package: word! +fullName: Word.Interfaces.DropDownListContentControlData +summary: An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_1/word/word.paragraph.yml b/docs/docs-ref-autogen/word_1_1/word/word.paragraph.yml index 6586032e91..224eb09f24 100644 --- a/docs/docs-ref-autogen/word_1_1/word/word.paragraph.yml +++ b/docs/docs-ref-autogen/word_1_1/word/word.paragraph.yml @@ -681,7 +681,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -752,16 +752,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_1/word/word.range.yml b/docs/docs-ref-autogen/word_1_1/word/word.range.yml index 03b857980e..19f7390523 100644 --- a/docs/docs-ref-autogen/word_1_1/word/word.range.yml +++ b/docs/docs-ref-autogen/word_1_1/word/word.range.yml @@ -386,7 +386,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -432,16 +432,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_2/toc.yml b/docs/docs-ref-autogen/word_1_2/toc.yml index cc98c2e851..cac4a1e3ec 100644 --- a/docs/docs-ref-autogen/word_1_2/toc.yml +++ b/docs/docs-ref-autogen/word_1_2/toc.yml @@ -899,6 +899,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/word_1_2/word.yml b/docs/docs-ref-autogen/word_1_2/word.yml index c247c121ed..bcd5c84a94 100644 --- a/docs/docs-ref-autogen/word_1_2/word.yml +++ b/docs/docs-ref-autogen/word_1_2/word.yml @@ -44,6 +44,7 @@ interfaces: - 'word!Word.Interfaces.CheckboxContentControlData:interface' - 'word!Word.Interfaces.CheckboxContentControlUpdateData:interface' - 'word!Word.Interfaces.CollectionLoadOptions:interface' + - 'word!Word.Interfaces.ComboBoxContentControlData:interface' - 'word!Word.Interfaces.CommentCollectionData:interface' - 'word!Word.Interfaces.CommentCollectionUpdateData:interface' - 'word!Word.Interfaces.CommentContentRangeData:interface' @@ -58,6 +59,10 @@ interfaces: - 'word!Word.Interfaces.ContentControlCollectionLoadOptions:interface' - 'word!Word.Interfaces.ContentControlCollectionUpdateData:interface' - 'word!Word.Interfaces.ContentControlData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' + - 'word!Word.Interfaces.ContentControlListItemData:interface' + - 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' - 'word!Word.Interfaces.ContentControlLoadOptions:interface' - 'word!Word.Interfaces.ContentControlUpdateData:interface' - 'word!Word.Interfaces.CritiqueAnnotationData:interface' @@ -77,6 +82,7 @@ interfaces: - 'word!Word.Interfaces.DocumentPropertiesData:interface' - 'word!Word.Interfaces.DocumentPropertiesUpdateData:interface' - 'word!Word.Interfaces.DocumentUpdateData:interface' + - 'word!Word.Interfaces.DropDownListContentControlData:interface' - 'word!Word.Interfaces.FieldCollectionData:interface' - 'word!Word.Interfaces.FieldCollectionUpdateData:interface' - 'word!Word.Interfaces.FieldData:interface' diff --git a/docs/docs-ref-autogen/word_1_2/word/word.body.yml b/docs/docs-ref-autogen/word_1_2/word/word.body.yml index fbae8f6787..17ac187dc9 100644 --- a/docs/docs-ref-autogen/word_1_2/word/word.body.yml +++ b/docs/docs-ref-autogen/word_1_2/word/word.body.yml @@ -495,7 +495,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -530,16 +530,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_2/word/word.interfaces.comboboxcontentcontroldata.yml b/docs/docs-ref-autogen/word_1_2/word/word.interfaces.comboboxcontentcontroldata.yml new file mode 100644 index 0000000000..6032dbb944 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_2/word/word.interfaces.comboboxcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ComboBoxContentControlData +uid: 'word!Word.Interfaces.ComboBoxContentControlData:interface' +package: word! +fullName: Word.Interfaces.ComboBoxContentControlData +summary: An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_2/word/word.interfaces.contentcontrollistitemcollectiondata.yml b/docs/docs-ref-autogen/word_1_2/word/word.interfaces.contentcontrollistitemcollectiondata.yml new file mode 100644 index 0000000000..75af720340 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_2/word/word.interfaces.contentcontrollistitemcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionData +summary: An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_2/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_2/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml new file mode 100644 index 0000000000..e22526b0d5 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_2/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionUpdateData +summary: >- + An interface for updating data on the `ContentControlListItemCollection` object, for use in + `contentControlListItemCollection.set({ ... })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_2/word/word.interfaces.contentcontrollistitemdata.yml b/docs/docs-ref-autogen/word_1_2/word/word.interfaces.contentcontrollistitemdata.yml new file mode 100644 index 0000000000..b14d4ec6c2 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_2/word/word.interfaces.contentcontrollistitemdata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemData +uid: 'word!Word.Interfaces.ContentControlListItemData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemData +summary: An interface describing the data returned by calling `contentControlListItem.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_2/word/word.interfaces.contentcontrollistitemupdatedata.yml b/docs/docs-ref-autogen/word_1_2/word/word.interfaces.contentcontrollistitemupdatedata.yml new file mode 100644 index 0000000000..94e73591c6 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_2/word/word.interfaces.contentcontrollistitemupdatedata.yml @@ -0,0 +1,12 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemUpdateData +summary: >- + An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... + })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_2/word/word.interfaces.dropdownlistcontentcontroldata.yml b/docs/docs-ref-autogen/word_1_2/word/word.interfaces.dropdownlistcontentcontroldata.yml new file mode 100644 index 0000000000..0802e15d92 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_2/word/word.interfaces.dropdownlistcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.DropDownListContentControlData +uid: 'word!Word.Interfaces.DropDownListContentControlData:interface' +package: word! +fullName: Word.Interfaces.DropDownListContentControlData +summary: An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_2/word/word.paragraph.yml b/docs/docs-ref-autogen/word_1_2/word/word.paragraph.yml index 6586032e91..224eb09f24 100644 --- a/docs/docs-ref-autogen/word_1_2/word/word.paragraph.yml +++ b/docs/docs-ref-autogen/word_1_2/word/word.paragraph.yml @@ -681,7 +681,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -752,16 +752,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_2/word/word.range.yml b/docs/docs-ref-autogen/word_1_2/word/word.range.yml index cec67770cc..68bc21586c 100644 --- a/docs/docs-ref-autogen/word_1_2/word/word.range.yml +++ b/docs/docs-ref-autogen/word_1_2/word/word.range.yml @@ -398,7 +398,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -444,16 +444,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_3/toc.yml b/docs/docs-ref-autogen/word_1_3/toc.yml index 2ad421e258..11b1c99276 100644 --- a/docs/docs-ref-autogen/word_1_3/toc.yml +++ b/docs/docs-ref-autogen/word_1_3/toc.yml @@ -955,6 +955,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/word_1_3/word.yml b/docs/docs-ref-autogen/word_1_3/word.yml index fbc545025f..22c81b3468 100644 --- a/docs/docs-ref-autogen/word_1_3/word.yml +++ b/docs/docs-ref-autogen/word_1_3/word.yml @@ -72,6 +72,7 @@ interfaces: - 'word!Word.Interfaces.CheckboxContentControlData:interface' - 'word!Word.Interfaces.CheckboxContentControlUpdateData:interface' - 'word!Word.Interfaces.CollectionLoadOptions:interface' + - 'word!Word.Interfaces.ComboBoxContentControlData:interface' - 'word!Word.Interfaces.CommentCollectionData:interface' - 'word!Word.Interfaces.CommentCollectionUpdateData:interface' - 'word!Word.Interfaces.CommentContentRangeData:interface' @@ -86,6 +87,10 @@ interfaces: - 'word!Word.Interfaces.ContentControlCollectionLoadOptions:interface' - 'word!Word.Interfaces.ContentControlCollectionUpdateData:interface' - 'word!Word.Interfaces.ContentControlData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' + - 'word!Word.Interfaces.ContentControlListItemData:interface' + - 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' - 'word!Word.Interfaces.ContentControlLoadOptions:interface' - 'word!Word.Interfaces.ContentControlUpdateData:interface' - 'word!Word.Interfaces.CritiqueAnnotationData:interface' @@ -109,6 +114,7 @@ interfaces: - 'word!Word.Interfaces.DocumentPropertiesLoadOptions:interface' - 'word!Word.Interfaces.DocumentPropertiesUpdateData:interface' - 'word!Word.Interfaces.DocumentUpdateData:interface' + - 'word!Word.Interfaces.DropDownListContentControlData:interface' - 'word!Word.Interfaces.FieldCollectionData:interface' - 'word!Word.Interfaces.FieldCollectionUpdateData:interface' - 'word!Word.Interfaces.FieldData:interface' diff --git a/docs/docs-ref-autogen/word_1_3/word/word.body.yml b/docs/docs-ref-autogen/word_1_3/word/word.body.yml index 51531c8075..25e291b21e 100644 --- a/docs/docs-ref-autogen/word_1_3/word/word.body.yml +++ b/docs/docs-ref-autogen/word_1_3/word/word.body.yml @@ -812,7 +812,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -847,16 +847,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_3/word/word.interfaces.comboboxcontentcontroldata.yml b/docs/docs-ref-autogen/word_1_3/word/word.interfaces.comboboxcontentcontroldata.yml new file mode 100644 index 0000000000..6032dbb944 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_3/word/word.interfaces.comboboxcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ComboBoxContentControlData +uid: 'word!Word.Interfaces.ComboBoxContentControlData:interface' +package: word! +fullName: Word.Interfaces.ComboBoxContentControlData +summary: An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_3/word/word.interfaces.contentcontrollistitemcollectiondata.yml b/docs/docs-ref-autogen/word_1_3/word/word.interfaces.contentcontrollistitemcollectiondata.yml new file mode 100644 index 0000000000..75af720340 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_3/word/word.interfaces.contentcontrollistitemcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionData +summary: An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_3/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_3/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml new file mode 100644 index 0000000000..e22526b0d5 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_3/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionUpdateData +summary: >- + An interface for updating data on the `ContentControlListItemCollection` object, for use in + `contentControlListItemCollection.set({ ... })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_3/word/word.interfaces.contentcontrollistitemdata.yml b/docs/docs-ref-autogen/word_1_3/word/word.interfaces.contentcontrollistitemdata.yml new file mode 100644 index 0000000000..b14d4ec6c2 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_3/word/word.interfaces.contentcontrollistitemdata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemData +uid: 'word!Word.Interfaces.ContentControlListItemData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemData +summary: An interface describing the data returned by calling `contentControlListItem.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_3/word/word.interfaces.contentcontrollistitemupdatedata.yml b/docs/docs-ref-autogen/word_1_3/word/word.interfaces.contentcontrollistitemupdatedata.yml new file mode 100644 index 0000000000..94e73591c6 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_3/word/word.interfaces.contentcontrollistitemupdatedata.yml @@ -0,0 +1,12 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemUpdateData +summary: >- + An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... + })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_3/word/word.interfaces.dropdownlistcontentcontroldata.yml b/docs/docs-ref-autogen/word_1_3/word/word.interfaces.dropdownlistcontentcontroldata.yml new file mode 100644 index 0000000000..0802e15d92 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_3/word/word.interfaces.dropdownlistcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.DropDownListContentControlData +uid: 'word!Word.Interfaces.DropDownListContentControlData:interface' +package: word! +fullName: Word.Interfaces.DropDownListContentControlData +summary: An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_3/word/word.paragraph.yml b/docs/docs-ref-autogen/word_1_3/word/word.paragraph.yml index 7be0602efa..f54fdf7454 100644 --- a/docs/docs-ref-autogen/word_1_3/word/word.paragraph.yml +++ b/docs/docs-ref-autogen/word_1_3/word/word.paragraph.yml @@ -1198,7 +1198,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1269,16 +1269,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_3/word/word.range.yml b/docs/docs-ref-autogen/word_1_3/word/word.range.yml index 9c7c9c40a0..f618c3dbec 100644 --- a/docs/docs-ref-autogen/word_1_3/word/word.range.yml +++ b/docs/docs-ref-autogen/word_1_3/word/word.range.yml @@ -805,7 +805,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Places a dropdown list content control at the end of the selection. @@ -956,7 +956,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1002,16 +1002,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_3_hidden_document/toc.yml b/docs/docs-ref-autogen/word_1_3_hidden_document/toc.yml index 2ad421e258..11b1c99276 100644 --- a/docs/docs-ref-autogen/word_1_3_hidden_document/toc.yml +++ b/docs/docs-ref-autogen/word_1_3_hidden_document/toc.yml @@ -955,6 +955,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/word_1_3_hidden_document/word.yml b/docs/docs-ref-autogen/word_1_3_hidden_document/word.yml index fbc545025f..22c81b3468 100644 --- a/docs/docs-ref-autogen/word_1_3_hidden_document/word.yml +++ b/docs/docs-ref-autogen/word_1_3_hidden_document/word.yml @@ -72,6 +72,7 @@ interfaces: - 'word!Word.Interfaces.CheckboxContentControlData:interface' - 'word!Word.Interfaces.CheckboxContentControlUpdateData:interface' - 'word!Word.Interfaces.CollectionLoadOptions:interface' + - 'word!Word.Interfaces.ComboBoxContentControlData:interface' - 'word!Word.Interfaces.CommentCollectionData:interface' - 'word!Word.Interfaces.CommentCollectionUpdateData:interface' - 'word!Word.Interfaces.CommentContentRangeData:interface' @@ -86,6 +87,10 @@ interfaces: - 'word!Word.Interfaces.ContentControlCollectionLoadOptions:interface' - 'word!Word.Interfaces.ContentControlCollectionUpdateData:interface' - 'word!Word.Interfaces.ContentControlData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' + - 'word!Word.Interfaces.ContentControlListItemData:interface' + - 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' - 'word!Word.Interfaces.ContentControlLoadOptions:interface' - 'word!Word.Interfaces.ContentControlUpdateData:interface' - 'word!Word.Interfaces.CritiqueAnnotationData:interface' @@ -109,6 +114,7 @@ interfaces: - 'word!Word.Interfaces.DocumentPropertiesLoadOptions:interface' - 'word!Word.Interfaces.DocumentPropertiesUpdateData:interface' - 'word!Word.Interfaces.DocumentUpdateData:interface' + - 'word!Word.Interfaces.DropDownListContentControlData:interface' - 'word!Word.Interfaces.FieldCollectionData:interface' - 'word!Word.Interfaces.FieldCollectionUpdateData:interface' - 'word!Word.Interfaces.FieldData:interface' diff --git a/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.body.yml b/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.body.yml index 51531c8075..25e291b21e 100644 --- a/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.body.yml +++ b/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.body.yml @@ -812,7 +812,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -847,16 +847,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.interfaces.comboboxcontentcontroldata.yml b/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.interfaces.comboboxcontentcontroldata.yml new file mode 100644 index 0000000000..6032dbb944 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.interfaces.comboboxcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ComboBoxContentControlData +uid: 'word!Word.Interfaces.ComboBoxContentControlData:interface' +package: word! +fullName: Word.Interfaces.ComboBoxContentControlData +summary: An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.interfaces.contentcontrollistitemcollectiondata.yml b/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.interfaces.contentcontrollistitemcollectiondata.yml new file mode 100644 index 0000000000..75af720340 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.interfaces.contentcontrollistitemcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionData +summary: An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml new file mode 100644 index 0000000000..e22526b0d5 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionUpdateData +summary: >- + An interface for updating data on the `ContentControlListItemCollection` object, for use in + `contentControlListItemCollection.set({ ... })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.interfaces.contentcontrollistitemdata.yml b/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.interfaces.contentcontrollistitemdata.yml new file mode 100644 index 0000000000..b14d4ec6c2 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.interfaces.contentcontrollistitemdata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemData +uid: 'word!Word.Interfaces.ContentControlListItemData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemData +summary: An interface describing the data returned by calling `contentControlListItem.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.interfaces.contentcontrollistitemupdatedata.yml b/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.interfaces.contentcontrollistitemupdatedata.yml new file mode 100644 index 0000000000..94e73591c6 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.interfaces.contentcontrollistitemupdatedata.yml @@ -0,0 +1,12 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemUpdateData +summary: >- + An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... + })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.interfaces.dropdownlistcontentcontroldata.yml b/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.interfaces.dropdownlistcontentcontroldata.yml new file mode 100644 index 0000000000..0802e15d92 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.interfaces.dropdownlistcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.DropDownListContentControlData +uid: 'word!Word.Interfaces.DropDownListContentControlData:interface' +package: word! +fullName: Word.Interfaces.DropDownListContentControlData +summary: An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.paragraph.yml b/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.paragraph.yml index 7be0602efa..f54fdf7454 100644 --- a/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.paragraph.yml +++ b/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.paragraph.yml @@ -1198,7 +1198,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1269,16 +1269,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.range.yml b/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.range.yml index 9c7c9c40a0..f618c3dbec 100644 --- a/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.range.yml +++ b/docs/docs-ref-autogen/word_1_3_hidden_document/word/word.range.yml @@ -805,7 +805,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Places a dropdown list content control at the end of the selection. @@ -956,7 +956,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1002,16 +1002,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_4/toc.yml b/docs/docs-ref-autogen/word_1_4/toc.yml index b765b41064..fedc4fe8ba 100644 --- a/docs/docs-ref-autogen/word_1_4/toc.yml +++ b/docs/docs-ref-autogen/word_1_4/toc.yml @@ -983,6 +983,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/word_1_4/word.yml b/docs/docs-ref-autogen/word_1_4/word.yml index 4e6bd4413f..45d7b5121f 100644 --- a/docs/docs-ref-autogen/word_1_4/word.yml +++ b/docs/docs-ref-autogen/word_1_4/word.yml @@ -86,6 +86,7 @@ interfaces: - 'word!Word.Interfaces.CheckboxContentControlData:interface' - 'word!Word.Interfaces.CheckboxContentControlUpdateData:interface' - 'word!Word.Interfaces.CollectionLoadOptions:interface' + - 'word!Word.Interfaces.ComboBoxContentControlData:interface' - 'word!Word.Interfaces.CommentCollectionData:interface' - 'word!Word.Interfaces.CommentCollectionLoadOptions:interface' - 'word!Word.Interfaces.CommentCollectionUpdateData:interface' @@ -105,6 +106,10 @@ interfaces: - 'word!Word.Interfaces.ContentControlCollectionLoadOptions:interface' - 'word!Word.Interfaces.ContentControlCollectionUpdateData:interface' - 'word!Word.Interfaces.ContentControlData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' + - 'word!Word.Interfaces.ContentControlListItemData:interface' + - 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' - 'word!Word.Interfaces.ContentControlLoadOptions:interface' - 'word!Word.Interfaces.ContentControlUpdateData:interface' - 'word!Word.Interfaces.CritiqueAnnotationData:interface' @@ -131,6 +136,7 @@ interfaces: - 'word!Word.Interfaces.DocumentPropertiesLoadOptions:interface' - 'word!Word.Interfaces.DocumentPropertiesUpdateData:interface' - 'word!Word.Interfaces.DocumentUpdateData:interface' + - 'word!Word.Interfaces.DropDownListContentControlData:interface' - 'word!Word.Interfaces.FieldCollectionData:interface' - 'word!Word.Interfaces.FieldCollectionLoadOptions:interface' - 'word!Word.Interfaces.FieldCollectionUpdateData:interface' diff --git a/docs/docs-ref-autogen/word_1_4/word/word.body.yml b/docs/docs-ref-autogen/word_1_4/word/word.body.yml index f10665c079..0bc05a001b 100644 --- a/docs/docs-ref-autogen/word_1_4/word/word.body.yml +++ b/docs/docs-ref-autogen/word_1_4/word/word.body.yml @@ -928,7 +928,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -963,16 +963,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_4/word/word.interfaces.comboboxcontentcontroldata.yml b/docs/docs-ref-autogen/word_1_4/word/word.interfaces.comboboxcontentcontroldata.yml new file mode 100644 index 0000000000..6032dbb944 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_4/word/word.interfaces.comboboxcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ComboBoxContentControlData +uid: 'word!Word.Interfaces.ComboBoxContentControlData:interface' +package: word! +fullName: Word.Interfaces.ComboBoxContentControlData +summary: An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_4/word/word.interfaces.contentcontrollistitemcollectiondata.yml b/docs/docs-ref-autogen/word_1_4/word/word.interfaces.contentcontrollistitemcollectiondata.yml new file mode 100644 index 0000000000..75af720340 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_4/word/word.interfaces.contentcontrollistitemcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionData +summary: An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_4/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_4/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml new file mode 100644 index 0000000000..e22526b0d5 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_4/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionUpdateData +summary: >- + An interface for updating data on the `ContentControlListItemCollection` object, for use in + `contentControlListItemCollection.set({ ... })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_4/word/word.interfaces.contentcontrollistitemdata.yml b/docs/docs-ref-autogen/word_1_4/word/word.interfaces.contentcontrollistitemdata.yml new file mode 100644 index 0000000000..b14d4ec6c2 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_4/word/word.interfaces.contentcontrollistitemdata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemData +uid: 'word!Word.Interfaces.ContentControlListItemData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemData +summary: An interface describing the data returned by calling `contentControlListItem.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_4/word/word.interfaces.contentcontrollistitemupdatedata.yml b/docs/docs-ref-autogen/word_1_4/word/word.interfaces.contentcontrollistitemupdatedata.yml new file mode 100644 index 0000000000..94e73591c6 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_4/word/word.interfaces.contentcontrollistitemupdatedata.yml @@ -0,0 +1,12 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemUpdateData +summary: >- + An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... + })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_4/word/word.interfaces.dropdownlistcontentcontroldata.yml b/docs/docs-ref-autogen/word_1_4/word/word.interfaces.dropdownlistcontentcontroldata.yml new file mode 100644 index 0000000000..0802e15d92 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_4/word/word.interfaces.dropdownlistcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.DropDownListContentControlData +uid: 'word!Word.Interfaces.DropDownListContentControlData:interface' +package: word! +fullName: Word.Interfaces.DropDownListContentControlData +summary: An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_4/word/word.paragraph.yml b/docs/docs-ref-autogen/word_1_4/word/word.paragraph.yml index 12f9a878f8..088344e964 100644 --- a/docs/docs-ref-autogen/word_1_4/word/word.paragraph.yml +++ b/docs/docs-ref-autogen/word_1_4/word/word.paragraph.yml @@ -1257,7 +1257,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1328,16 +1328,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_4/word/word.range.yml b/docs/docs-ref-autogen/word_1_4/word/word.range.yml index f18ada787b..b9d077effc 100644 --- a/docs/docs-ref-autogen/word_1_4/word/word.range.yml +++ b/docs/docs-ref-autogen/word_1_4/word/word.range.yml @@ -881,7 +881,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Places a dropdown list content control at the end of the selection. @@ -1162,7 +1162,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1208,16 +1208,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_4_hidden_document/toc.yml b/docs/docs-ref-autogen/word_1_4_hidden_document/toc.yml index b765b41064..fedc4fe8ba 100644 --- a/docs/docs-ref-autogen/word_1_4_hidden_document/toc.yml +++ b/docs/docs-ref-autogen/word_1_4_hidden_document/toc.yml @@ -983,6 +983,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/word_1_4_hidden_document/word.yml b/docs/docs-ref-autogen/word_1_4_hidden_document/word.yml index 4e6bd4413f..45d7b5121f 100644 --- a/docs/docs-ref-autogen/word_1_4_hidden_document/word.yml +++ b/docs/docs-ref-autogen/word_1_4_hidden_document/word.yml @@ -86,6 +86,7 @@ interfaces: - 'word!Word.Interfaces.CheckboxContentControlData:interface' - 'word!Word.Interfaces.CheckboxContentControlUpdateData:interface' - 'word!Word.Interfaces.CollectionLoadOptions:interface' + - 'word!Word.Interfaces.ComboBoxContentControlData:interface' - 'word!Word.Interfaces.CommentCollectionData:interface' - 'word!Word.Interfaces.CommentCollectionLoadOptions:interface' - 'word!Word.Interfaces.CommentCollectionUpdateData:interface' @@ -105,6 +106,10 @@ interfaces: - 'word!Word.Interfaces.ContentControlCollectionLoadOptions:interface' - 'word!Word.Interfaces.ContentControlCollectionUpdateData:interface' - 'word!Word.Interfaces.ContentControlData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' + - 'word!Word.Interfaces.ContentControlListItemData:interface' + - 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' - 'word!Word.Interfaces.ContentControlLoadOptions:interface' - 'word!Word.Interfaces.ContentControlUpdateData:interface' - 'word!Word.Interfaces.CritiqueAnnotationData:interface' @@ -131,6 +136,7 @@ interfaces: - 'word!Word.Interfaces.DocumentPropertiesLoadOptions:interface' - 'word!Word.Interfaces.DocumentPropertiesUpdateData:interface' - 'word!Word.Interfaces.DocumentUpdateData:interface' + - 'word!Word.Interfaces.DropDownListContentControlData:interface' - 'word!Word.Interfaces.FieldCollectionData:interface' - 'word!Word.Interfaces.FieldCollectionLoadOptions:interface' - 'word!Word.Interfaces.FieldCollectionUpdateData:interface' diff --git a/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.body.yml b/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.body.yml index f10665c079..0bc05a001b 100644 --- a/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.body.yml +++ b/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.body.yml @@ -928,7 +928,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -963,16 +963,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.interfaces.comboboxcontentcontroldata.yml b/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.interfaces.comboboxcontentcontroldata.yml new file mode 100644 index 0000000000..6032dbb944 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.interfaces.comboboxcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ComboBoxContentControlData +uid: 'word!Word.Interfaces.ComboBoxContentControlData:interface' +package: word! +fullName: Word.Interfaces.ComboBoxContentControlData +summary: An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.interfaces.contentcontrollistitemcollectiondata.yml b/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.interfaces.contentcontrollistitemcollectiondata.yml new file mode 100644 index 0000000000..75af720340 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.interfaces.contentcontrollistitemcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionData +summary: An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml new file mode 100644 index 0000000000..e22526b0d5 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionUpdateData +summary: >- + An interface for updating data on the `ContentControlListItemCollection` object, for use in + `contentControlListItemCollection.set({ ... })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.interfaces.contentcontrollistitemdata.yml b/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.interfaces.contentcontrollistitemdata.yml new file mode 100644 index 0000000000..b14d4ec6c2 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.interfaces.contentcontrollistitemdata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemData +uid: 'word!Word.Interfaces.ContentControlListItemData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemData +summary: An interface describing the data returned by calling `contentControlListItem.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.interfaces.contentcontrollistitemupdatedata.yml b/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.interfaces.contentcontrollistitemupdatedata.yml new file mode 100644 index 0000000000..94e73591c6 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.interfaces.contentcontrollistitemupdatedata.yml @@ -0,0 +1,12 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemUpdateData +summary: >- + An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... + })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.interfaces.dropdownlistcontentcontroldata.yml b/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.interfaces.dropdownlistcontentcontroldata.yml new file mode 100644 index 0000000000..0802e15d92 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.interfaces.dropdownlistcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.DropDownListContentControlData +uid: 'word!Word.Interfaces.DropDownListContentControlData:interface' +package: word! +fullName: Word.Interfaces.DropDownListContentControlData +summary: An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.paragraph.yml b/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.paragraph.yml index 12f9a878f8..088344e964 100644 --- a/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.paragraph.yml +++ b/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.paragraph.yml @@ -1257,7 +1257,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1328,16 +1328,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.range.yml b/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.range.yml index f18ada787b..b9d077effc 100644 --- a/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.range.yml +++ b/docs/docs-ref-autogen/word_1_4_hidden_document/word/word.range.yml @@ -881,7 +881,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Places a dropdown list content control at the end of the selection. @@ -1162,7 +1162,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1208,16 +1208,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_5/toc.yml b/docs/docs-ref-autogen/word_1_5/toc.yml index a6dd7e63b3..15ecb9631e 100644 --- a/docs/docs-ref-autogen/word_1_5/toc.yml +++ b/docs/docs-ref-autogen/word_1_5/toc.yml @@ -1025,6 +1025,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/word_1_5/word.yml b/docs/docs-ref-autogen/word_1_5/word.yml index e69e0e3bb2..fceaf8103f 100644 --- a/docs/docs-ref-autogen/word_1_5/word.yml +++ b/docs/docs-ref-autogen/word_1_5/word.yml @@ -107,6 +107,7 @@ interfaces: - 'word!Word.Interfaces.CheckboxContentControlData:interface' - 'word!Word.Interfaces.CheckboxContentControlUpdateData:interface' - 'word!Word.Interfaces.CollectionLoadOptions:interface' + - 'word!Word.Interfaces.ComboBoxContentControlData:interface' - 'word!Word.Interfaces.CommentCollectionData:interface' - 'word!Word.Interfaces.CommentCollectionLoadOptions:interface' - 'word!Word.Interfaces.CommentCollectionUpdateData:interface' @@ -126,6 +127,10 @@ interfaces: - 'word!Word.Interfaces.ContentControlCollectionLoadOptions:interface' - 'word!Word.Interfaces.ContentControlCollectionUpdateData:interface' - 'word!Word.Interfaces.ContentControlData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' + - 'word!Word.Interfaces.ContentControlListItemData:interface' + - 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' - 'word!Word.Interfaces.ContentControlLoadOptions:interface' - 'word!Word.Interfaces.ContentControlUpdateData:interface' - 'word!Word.Interfaces.CritiqueAnnotationData:interface' @@ -152,6 +157,7 @@ interfaces: - 'word!Word.Interfaces.DocumentPropertiesLoadOptions:interface' - 'word!Word.Interfaces.DocumentPropertiesUpdateData:interface' - 'word!Word.Interfaces.DocumentUpdateData:interface' + - 'word!Word.Interfaces.DropDownListContentControlData:interface' - 'word!Word.Interfaces.FieldCollectionData:interface' - 'word!Word.Interfaces.FieldCollectionLoadOptions:interface' - 'word!Word.Interfaces.FieldCollectionUpdateData:interface' diff --git a/docs/docs-ref-autogen/word_1_5/word/word.body.yml b/docs/docs-ref-autogen/word_1_5/word/word.body.yml index cdfbc28a8f..b21f51bdb2 100644 --- a/docs/docs-ref-autogen/word_1_5/word/word.body.yml +++ b/docs/docs-ref-autogen/word_1_5/word/word.body.yml @@ -1000,7 +1000,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1035,16 +1035,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_5/word/word.contentcontroloptions.yml b/docs/docs-ref-autogen/word_1_5/word/word.contentcontroloptions.yml index 6378ac8d30..d7b0a8acd7 100644 --- a/docs/docs-ref-autogen/word_1_5/word/word.contentcontroloptions.yml +++ b/docs/docs-ref-autogen/word_1_5/word/word.contentcontroloptions.yml @@ -64,11 +64,15 @@ properties: uid: 'word!Word.ContentControlOptions#types:member' package: word! fullName: types - summary: 'An array of content control types, item must be ''RichText'', ''PlainText'', or ''CheckBox''.' - remarks: |- + summary: >- + An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. + remarks: >- \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] - Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + + Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. 'DropDownList' + and 'ComboBox' support was added in WordApi 1.9. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/word_1_5/word/word.interfaces.comboboxcontentcontroldata.yml b/docs/docs-ref-autogen/word_1_5/word/word.interfaces.comboboxcontentcontroldata.yml new file mode 100644 index 0000000000..6032dbb944 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_5/word/word.interfaces.comboboxcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ComboBoxContentControlData +uid: 'word!Word.Interfaces.ComboBoxContentControlData:interface' +package: word! +fullName: Word.Interfaces.ComboBoxContentControlData +summary: An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_5/word/word.interfaces.contentcontrollistitemcollectiondata.yml b/docs/docs-ref-autogen/word_1_5/word/word.interfaces.contentcontrollistitemcollectiondata.yml new file mode 100644 index 0000000000..75af720340 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_5/word/word.interfaces.contentcontrollistitemcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionData +summary: An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_5/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_5/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml new file mode 100644 index 0000000000..e22526b0d5 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_5/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionUpdateData +summary: >- + An interface for updating data on the `ContentControlListItemCollection` object, for use in + `contentControlListItemCollection.set({ ... })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_5/word/word.interfaces.contentcontrollistitemdata.yml b/docs/docs-ref-autogen/word_1_5/word/word.interfaces.contentcontrollistitemdata.yml new file mode 100644 index 0000000000..b14d4ec6c2 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_5/word/word.interfaces.contentcontrollistitemdata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemData +uid: 'word!Word.Interfaces.ContentControlListItemData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemData +summary: An interface describing the data returned by calling `contentControlListItem.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_5/word/word.interfaces.contentcontrollistitemupdatedata.yml b/docs/docs-ref-autogen/word_1_5/word/word.interfaces.contentcontrollistitemupdatedata.yml new file mode 100644 index 0000000000..94e73591c6 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_5/word/word.interfaces.contentcontrollistitemupdatedata.yml @@ -0,0 +1,12 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemUpdateData +summary: >- + An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... + })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_5/word/word.interfaces.dropdownlistcontentcontroldata.yml b/docs/docs-ref-autogen/word_1_5/word/word.interfaces.dropdownlistcontentcontroldata.yml new file mode 100644 index 0000000000..0802e15d92 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_5/word/word.interfaces.dropdownlistcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.DropDownListContentControlData +uid: 'word!Word.Interfaces.DropDownListContentControlData:interface' +package: word! +fullName: Word.Interfaces.DropDownListContentControlData +summary: An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_5/word/word.paragraph.yml b/docs/docs-ref-autogen/word_1_5/word/word.paragraph.yml index ec42b6de31..bd805d95cf 100644 --- a/docs/docs-ref-autogen/word_1_5/word/word.paragraph.yml +++ b/docs/docs-ref-autogen/word_1_5/word/word.paragraph.yml @@ -1306,7 +1306,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1377,16 +1377,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_5/word/word.range.yml b/docs/docs-ref-autogen/word_1_5/word/word.range.yml index 405291a252..f586884385 100644 --- a/docs/docs-ref-autogen/word_1_5/word/word.range.yml +++ b/docs/docs-ref-autogen/word_1_5/word/word.range.yml @@ -998,7 +998,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Places a dropdown list content control at the end of the selection. @@ -1279,7 +1279,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1325,16 +1325,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_5_hidden_document/toc.yml b/docs/docs-ref-autogen/word_1_5_hidden_document/toc.yml index a6dd7e63b3..15ecb9631e 100644 --- a/docs/docs-ref-autogen/word_1_5_hidden_document/toc.yml +++ b/docs/docs-ref-autogen/word_1_5_hidden_document/toc.yml @@ -1025,6 +1025,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/word_1_5_hidden_document/word.yml b/docs/docs-ref-autogen/word_1_5_hidden_document/word.yml index e69e0e3bb2..fceaf8103f 100644 --- a/docs/docs-ref-autogen/word_1_5_hidden_document/word.yml +++ b/docs/docs-ref-autogen/word_1_5_hidden_document/word.yml @@ -107,6 +107,7 @@ interfaces: - 'word!Word.Interfaces.CheckboxContentControlData:interface' - 'word!Word.Interfaces.CheckboxContentControlUpdateData:interface' - 'word!Word.Interfaces.CollectionLoadOptions:interface' + - 'word!Word.Interfaces.ComboBoxContentControlData:interface' - 'word!Word.Interfaces.CommentCollectionData:interface' - 'word!Word.Interfaces.CommentCollectionLoadOptions:interface' - 'word!Word.Interfaces.CommentCollectionUpdateData:interface' @@ -126,6 +127,10 @@ interfaces: - 'word!Word.Interfaces.ContentControlCollectionLoadOptions:interface' - 'word!Word.Interfaces.ContentControlCollectionUpdateData:interface' - 'word!Word.Interfaces.ContentControlData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' + - 'word!Word.Interfaces.ContentControlListItemData:interface' + - 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' - 'word!Word.Interfaces.ContentControlLoadOptions:interface' - 'word!Word.Interfaces.ContentControlUpdateData:interface' - 'word!Word.Interfaces.CritiqueAnnotationData:interface' @@ -152,6 +157,7 @@ interfaces: - 'word!Word.Interfaces.DocumentPropertiesLoadOptions:interface' - 'word!Word.Interfaces.DocumentPropertiesUpdateData:interface' - 'word!Word.Interfaces.DocumentUpdateData:interface' + - 'word!Word.Interfaces.DropDownListContentControlData:interface' - 'word!Word.Interfaces.FieldCollectionData:interface' - 'word!Word.Interfaces.FieldCollectionLoadOptions:interface' - 'word!Word.Interfaces.FieldCollectionUpdateData:interface' diff --git a/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.body.yml b/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.body.yml index cdfbc28a8f..b21f51bdb2 100644 --- a/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.body.yml +++ b/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.body.yml @@ -1000,7 +1000,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1035,16 +1035,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.contentcontroloptions.yml b/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.contentcontroloptions.yml index 6378ac8d30..d7b0a8acd7 100644 --- a/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.contentcontroloptions.yml +++ b/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.contentcontroloptions.yml @@ -64,11 +64,15 @@ properties: uid: 'word!Word.ContentControlOptions#types:member' package: word! fullName: types - summary: 'An array of content control types, item must be ''RichText'', ''PlainText'', or ''CheckBox''.' - remarks: |- + summary: >- + An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. + remarks: >- \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] - Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + + Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. 'DropDownList' + and 'ComboBox' support was added in WordApi 1.9. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.interfaces.comboboxcontentcontroldata.yml b/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.interfaces.comboboxcontentcontroldata.yml new file mode 100644 index 0000000000..6032dbb944 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.interfaces.comboboxcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ComboBoxContentControlData +uid: 'word!Word.Interfaces.ComboBoxContentControlData:interface' +package: word! +fullName: Word.Interfaces.ComboBoxContentControlData +summary: An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.interfaces.contentcontrollistitemcollectiondata.yml b/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.interfaces.contentcontrollistitemcollectiondata.yml new file mode 100644 index 0000000000..75af720340 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.interfaces.contentcontrollistitemcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionData +summary: An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml new file mode 100644 index 0000000000..e22526b0d5 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionUpdateData +summary: >- + An interface for updating data on the `ContentControlListItemCollection` object, for use in + `contentControlListItemCollection.set({ ... })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.interfaces.contentcontrollistitemdata.yml b/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.interfaces.contentcontrollistitemdata.yml new file mode 100644 index 0000000000..b14d4ec6c2 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.interfaces.contentcontrollistitemdata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemData +uid: 'word!Word.Interfaces.ContentControlListItemData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemData +summary: An interface describing the data returned by calling `contentControlListItem.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.interfaces.contentcontrollistitemupdatedata.yml b/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.interfaces.contentcontrollistitemupdatedata.yml new file mode 100644 index 0000000000..94e73591c6 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.interfaces.contentcontrollistitemupdatedata.yml @@ -0,0 +1,12 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemUpdateData +summary: >- + An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... + })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.interfaces.dropdownlistcontentcontroldata.yml b/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.interfaces.dropdownlistcontentcontroldata.yml new file mode 100644 index 0000000000..0802e15d92 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.interfaces.dropdownlistcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.DropDownListContentControlData +uid: 'word!Word.Interfaces.DropDownListContentControlData:interface' +package: word! +fullName: Word.Interfaces.DropDownListContentControlData +summary: An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.paragraph.yml b/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.paragraph.yml index ec42b6de31..bd805d95cf 100644 --- a/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.paragraph.yml +++ b/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.paragraph.yml @@ -1306,7 +1306,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1377,16 +1377,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.range.yml b/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.range.yml index 405291a252..f586884385 100644 --- a/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.range.yml +++ b/docs/docs-ref-autogen/word_1_5_hidden_document/word/word.range.yml @@ -998,7 +998,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Places a dropdown list content control at the end of the selection. @@ -1279,7 +1279,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1325,16 +1325,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_6/toc.yml b/docs/docs-ref-autogen/word_1_6/toc.yml index bb31768f77..1bae862ce0 100644 --- a/docs/docs-ref-autogen/word_1_6/toc.yml +++ b/docs/docs-ref-autogen/word_1_6/toc.yml @@ -1041,6 +1041,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/word_1_6/word.yml b/docs/docs-ref-autogen/word_1_6/word.yml index 3c4e75f9d2..7c3726c34d 100644 --- a/docs/docs-ref-autogen/word_1_6/word.yml +++ b/docs/docs-ref-autogen/word_1_6/word.yml @@ -112,6 +112,7 @@ interfaces: - 'word!Word.Interfaces.CheckboxContentControlData:interface' - 'word!Word.Interfaces.CheckboxContentControlUpdateData:interface' - 'word!Word.Interfaces.CollectionLoadOptions:interface' + - 'word!Word.Interfaces.ComboBoxContentControlData:interface' - 'word!Word.Interfaces.CommentCollectionData:interface' - 'word!Word.Interfaces.CommentCollectionLoadOptions:interface' - 'word!Word.Interfaces.CommentCollectionUpdateData:interface' @@ -131,6 +132,10 @@ interfaces: - 'word!Word.Interfaces.ContentControlCollectionLoadOptions:interface' - 'word!Word.Interfaces.ContentControlCollectionUpdateData:interface' - 'word!Word.Interfaces.ContentControlData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' + - 'word!Word.Interfaces.ContentControlListItemData:interface' + - 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' - 'word!Word.Interfaces.ContentControlLoadOptions:interface' - 'word!Word.Interfaces.ContentControlUpdateData:interface' - 'word!Word.Interfaces.CritiqueAnnotationData:interface' @@ -157,6 +162,7 @@ interfaces: - 'word!Word.Interfaces.DocumentPropertiesLoadOptions:interface' - 'word!Word.Interfaces.DocumentPropertiesUpdateData:interface' - 'word!Word.Interfaces.DocumentUpdateData:interface' + - 'word!Word.Interfaces.DropDownListContentControlData:interface' - 'word!Word.Interfaces.FieldCollectionData:interface' - 'word!Word.Interfaces.FieldCollectionLoadOptions:interface' - 'word!Word.Interfaces.FieldCollectionUpdateData:interface' diff --git a/docs/docs-ref-autogen/word_1_6/word/word.body.yml b/docs/docs-ref-autogen/word_1_6/word/word.body.yml index da8819a964..f47a299085 100644 --- a/docs/docs-ref-autogen/word_1_6/word/word.body.yml +++ b/docs/docs-ref-autogen/word_1_6/word/word.body.yml @@ -1037,7 +1037,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1072,16 +1072,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_6/word/word.contentcontroloptions.yml b/docs/docs-ref-autogen/word_1_6/word/word.contentcontroloptions.yml index 6378ac8d30..d7b0a8acd7 100644 --- a/docs/docs-ref-autogen/word_1_6/word/word.contentcontroloptions.yml +++ b/docs/docs-ref-autogen/word_1_6/word/word.contentcontroloptions.yml @@ -64,11 +64,15 @@ properties: uid: 'word!Word.ContentControlOptions#types:member' package: word! fullName: types - summary: 'An array of content control types, item must be ''RichText'', ''PlainText'', or ''CheckBox''.' - remarks: |- + summary: >- + An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. + remarks: >- \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] - Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + + Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. 'DropDownList' + and 'ComboBox' support was added in WordApi 1.9. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/word_1_6/word/word.document.yml b/docs/docs-ref-autogen/word_1_6/word/word.document.yml index 35298887ea..bcd9e9aadd 100644 --- a/docs/docs-ref-autogen/word_1_6/word/word.document.yml +++ b/docs/docs-ref-autogen/word_1_6/word/word.document.yml @@ -661,15 +661,18 @@ methods: return: type: '' description: '' - - name: importStylesFromJson(stylesJson) + - name: 'importStylesFromJson(stylesJson, importedStylesConflictBehavior)' uid: 'word!Word.Document#importStylesFromJson:member(1)' package: word! - fullName: importStylesFromJson(stylesJson) + fullName: 'importStylesFromJson(stylesJson, importedStylesConflictBehavior)' summary: Import styles from a JSON-formatted string. remarks: >- \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + + #### Examples @@ -693,11 +696,45 @@ methods: isPreview: false isDeprecated: false syntax: - content: 'importStylesFromJson(stylesJson: string): OfficeExtension.ClientResult;' + content: >- + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): + OfficeExtension.ClientResult; parameters: - id: stylesJson description: Required. A JSON-formatted string representing the styles. type: string + - id: importedStylesConflictBehavior + description: >- + Optional. Specifies how to handle any imported styles with the same name as existing styles in the current + document. + type: Word.ImportedStylesConflictBehavior + return: + type: '<string[]>' + description: '' + - name: 'importStylesFromJson(stylesJson, importedStylesConflictBehaviorString)' + uid: 'word!Word.Document#importStylesFromJson:member(2)' + package: word! + fullName: 'importStylesFromJson(stylesJson, importedStylesConflictBehaviorString)' + summary: Import styles from a JSON-formatted string. + remarks: |- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + isPreview: false + isDeprecated: false + syntax: + content: >- + importStylesFromJson(stylesJson: string, importedStylesConflictBehaviorString?: "Ignore" | "Overwrite" | + "CreateNew"): OfficeExtension.ClientResult; + parameters: + - id: stylesJson + description: Required. A JSON-formatted string representing the styles. + type: string + - id: importedStylesConflictBehaviorString + description: >- + Optional. Specifies how to handle any imported styles with the same name as existing styles in the current + document. + type: '"Ignore" | "Overwrite" | "CreateNew"' return: type: '<string[]>' description: '' diff --git a/docs/docs-ref-autogen/word_1_6/word/word.interfaces.comboboxcontentcontroldata.yml b/docs/docs-ref-autogen/word_1_6/word/word.interfaces.comboboxcontentcontroldata.yml new file mode 100644 index 0000000000..6032dbb944 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_6/word/word.interfaces.comboboxcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ComboBoxContentControlData +uid: 'word!Word.Interfaces.ComboBoxContentControlData:interface' +package: word! +fullName: Word.Interfaces.ComboBoxContentControlData +summary: An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_6/word/word.interfaces.contentcontrollistitemcollectiondata.yml b/docs/docs-ref-autogen/word_1_6/word/word.interfaces.contentcontrollistitemcollectiondata.yml new file mode 100644 index 0000000000..75af720340 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_6/word/word.interfaces.contentcontrollistitemcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionData +summary: An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_6/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_6/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml new file mode 100644 index 0000000000..e22526b0d5 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_6/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionUpdateData +summary: >- + An interface for updating data on the `ContentControlListItemCollection` object, for use in + `contentControlListItemCollection.set({ ... })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_6/word/word.interfaces.contentcontrollistitemdata.yml b/docs/docs-ref-autogen/word_1_6/word/word.interfaces.contentcontrollistitemdata.yml new file mode 100644 index 0000000000..b14d4ec6c2 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_6/word/word.interfaces.contentcontrollistitemdata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemData +uid: 'word!Word.Interfaces.ContentControlListItemData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemData +summary: An interface describing the data returned by calling `contentControlListItem.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_6/word/word.interfaces.contentcontrollistitemupdatedata.yml b/docs/docs-ref-autogen/word_1_6/word/word.interfaces.contentcontrollistitemupdatedata.yml new file mode 100644 index 0000000000..94e73591c6 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_6/word/word.interfaces.contentcontrollistitemupdatedata.yml @@ -0,0 +1,12 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemUpdateData +summary: >- + An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... + })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_6/word/word.interfaces.dropdownlistcontentcontroldata.yml b/docs/docs-ref-autogen/word_1_6/word/word.interfaces.dropdownlistcontentcontroldata.yml new file mode 100644 index 0000000000..0802e15d92 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_6/word/word.interfaces.dropdownlistcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.DropDownListContentControlData +uid: 'word!Word.Interfaces.DropDownListContentControlData:interface' +package: word! +fullName: Word.Interfaces.DropDownListContentControlData +summary: An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_6/word/word.paragraph.yml b/docs/docs-ref-autogen/word_1_6/word/word.paragraph.yml index 5d9aad6606..9990f0f6c8 100644 --- a/docs/docs-ref-autogen/word_1_6/word/word.paragraph.yml +++ b/docs/docs-ref-autogen/word_1_6/word/word.paragraph.yml @@ -1385,7 +1385,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1456,16 +1456,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_6/word/word.range.yml b/docs/docs-ref-autogen/word_1_6/word/word.range.yml index de6a5ce7ea..1d4a39bab9 100644 --- a/docs/docs-ref-autogen/word_1_6/word/word.range.yml +++ b/docs/docs-ref-autogen/word_1_6/word/word.range.yml @@ -998,7 +998,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Places a dropdown list content control at the end of the selection. @@ -1292,7 +1292,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1338,16 +1338,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_7/toc.yml b/docs/docs-ref-autogen/word_1_7/toc.yml index 81230bfecf..856494325c 100644 --- a/docs/docs-ref-autogen/word_1_7/toc.yml +++ b/docs/docs-ref-autogen/word_1_7/toc.yml @@ -1067,6 +1067,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/word_1_7/word.yml b/docs/docs-ref-autogen/word_1_7/word.yml index 657e34fdf9..878ec994bc 100644 --- a/docs/docs-ref-autogen/word_1_7/word.yml +++ b/docs/docs-ref-autogen/word_1_7/word.yml @@ -128,6 +128,7 @@ interfaces: - 'word!Word.Interfaces.CheckboxContentControlLoadOptions:interface' - 'word!Word.Interfaces.CheckboxContentControlUpdateData:interface' - 'word!Word.Interfaces.CollectionLoadOptions:interface' + - 'word!Word.Interfaces.ComboBoxContentControlData:interface' - 'word!Word.Interfaces.CommentCollectionData:interface' - 'word!Word.Interfaces.CommentCollectionLoadOptions:interface' - 'word!Word.Interfaces.CommentCollectionUpdateData:interface' @@ -147,6 +148,10 @@ interfaces: - 'word!Word.Interfaces.ContentControlCollectionLoadOptions:interface' - 'word!Word.Interfaces.ContentControlCollectionUpdateData:interface' - 'word!Word.Interfaces.ContentControlData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' + - 'word!Word.Interfaces.ContentControlListItemData:interface' + - 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' - 'word!Word.Interfaces.ContentControlLoadOptions:interface' - 'word!Word.Interfaces.ContentControlUpdateData:interface' - 'word!Word.Interfaces.CritiqueAnnotationData:interface' @@ -174,6 +179,7 @@ interfaces: - 'word!Word.Interfaces.DocumentPropertiesLoadOptions:interface' - 'word!Word.Interfaces.DocumentPropertiesUpdateData:interface' - 'word!Word.Interfaces.DocumentUpdateData:interface' + - 'word!Word.Interfaces.DropDownListContentControlData:interface' - 'word!Word.Interfaces.FieldCollectionData:interface' - 'word!Word.Interfaces.FieldCollectionLoadOptions:interface' - 'word!Word.Interfaces.FieldCollectionUpdateData:interface' diff --git a/docs/docs-ref-autogen/word_1_7/word/word.body.yml b/docs/docs-ref-autogen/word_1_7/word/word.body.yml index da8819a964..f47a299085 100644 --- a/docs/docs-ref-autogen/word_1_7/word/word.body.yml +++ b/docs/docs-ref-autogen/word_1_7/word/word.body.yml @@ -1037,7 +1037,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1072,16 +1072,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_7/word/word.contentcontrol.yml b/docs/docs-ref-autogen/word_1_7/word/word.contentcontrol.yml index c060655104..abef410a0f 100644 --- a/docs/docs-ref-autogen/word_1_7/word/word.contentcontrol.yml +++ b/docs/docs-ref-autogen/word_1_7/word/word.contentcontrol.yml @@ -114,7 +114,7 @@ properties: uid: 'word!Word.ContentControl#checkboxContentControl:member' package: word! fullName: checkboxContentControl - summary: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + summary: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. remarks: >- \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] diff --git a/docs/docs-ref-autogen/word_1_7/word/word.contentcontroloptions.yml b/docs/docs-ref-autogen/word_1_7/word/word.contentcontroloptions.yml index 6378ac8d30..d7b0a8acd7 100644 --- a/docs/docs-ref-autogen/word_1_7/word/word.contentcontroloptions.yml +++ b/docs/docs-ref-autogen/word_1_7/word/word.contentcontroloptions.yml @@ -64,11 +64,15 @@ properties: uid: 'word!Word.ContentControlOptions#types:member' package: word! fullName: types - summary: 'An array of content control types, item must be ''RichText'', ''PlainText'', or ''CheckBox''.' - remarks: |- + summary: >- + An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. + remarks: >- \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] - Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + + Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. 'DropDownList' + and 'ComboBox' support was added in WordApi 1.9. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/word_1_7/word/word.document.yml b/docs/docs-ref-autogen/word_1_7/word/word.document.yml index a12f01372f..0f23794fdc 100644 --- a/docs/docs-ref-autogen/word_1_7/word/word.document.yml +++ b/docs/docs-ref-autogen/word_1_7/word/word.document.yml @@ -678,15 +678,18 @@ methods: return: type: '' description: '' - - name: importStylesFromJson(stylesJson) + - name: 'importStylesFromJson(stylesJson, importedStylesConflictBehavior)' uid: 'word!Word.Document#importStylesFromJson:member(1)' package: word! - fullName: importStylesFromJson(stylesJson) + fullName: 'importStylesFromJson(stylesJson, importedStylesConflictBehavior)' summary: Import styles from a JSON-formatted string. remarks: >- \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + + #### Examples @@ -710,11 +713,45 @@ methods: isPreview: false isDeprecated: false syntax: - content: 'importStylesFromJson(stylesJson: string): OfficeExtension.ClientResult;' + content: >- + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): + OfficeExtension.ClientResult; parameters: - id: stylesJson description: Required. A JSON-formatted string representing the styles. type: string + - id: importedStylesConflictBehavior + description: >- + Optional. Specifies how to handle any imported styles with the same name as existing styles in the current + document. + type: Word.ImportedStylesConflictBehavior + return: + type: '<string[]>' + description: '' + - name: 'importStylesFromJson(stylesJson, importedStylesConflictBehaviorString)' + uid: 'word!Word.Document#importStylesFromJson:member(2)' + package: word! + fullName: 'importStylesFromJson(stylesJson, importedStylesConflictBehaviorString)' + summary: Import styles from a JSON-formatted string. + remarks: |- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + isPreview: false + isDeprecated: false + syntax: + content: >- + importStylesFromJson(stylesJson: string, importedStylesConflictBehaviorString?: "Ignore" | "Overwrite" | + "CreateNew"): OfficeExtension.ClientResult; + parameters: + - id: stylesJson + description: Required. A JSON-formatted string representing the styles. + type: string + - id: importedStylesConflictBehaviorString + description: >- + Optional. Specifies how to handle any imported styles with the same name as existing styles in the current + document. + type: '"Ignore" | "Overwrite" | "CreateNew"' return: type: '<string[]>' description: '' diff --git a/docs/docs-ref-autogen/word_1_7/word/word.interfaces.comboboxcontentcontroldata.yml b/docs/docs-ref-autogen/word_1_7/word/word.interfaces.comboboxcontentcontroldata.yml new file mode 100644 index 0000000000..6032dbb944 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_7/word/word.interfaces.comboboxcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ComboBoxContentControlData +uid: 'word!Word.Interfaces.ComboBoxContentControlData:interface' +package: word! +fullName: Word.Interfaces.ComboBoxContentControlData +summary: An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrolcollectionloadoptions.yml b/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrolcollectionloadoptions.yml index e4d5e7eb32..91ad1b9984 100644 --- a/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrolcollectionloadoptions.yml +++ b/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrolcollectionloadoptions.yml @@ -74,8 +74,8 @@ properties: package: word! fullName: checkboxContentControl summary: >- - For EACH ITEM in the collection: Specifies the checkbox-related data if the content control's type is 'CheckBox'. - It's `null` otherwise. + For EACH ITEM in the collection: Gets the data of the content control when its type is 'CheckBox'. It's `null` + otherwise. remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontroldata.yml b/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontroldata.yml index 70ba44c6e0..dc4b96ea8d 100644 --- a/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontroldata.yml +++ b/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontroldata.yml @@ -51,7 +51,7 @@ properties: uid: 'word!Word.Interfaces.ContentControlData#checkboxContentControl:member' package: word! fullName: checkboxContentControl - summary: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + summary: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrollistitemcollectiondata.yml b/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrollistitemcollectiondata.yml new file mode 100644 index 0000000000..75af720340 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrollistitemcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionData +summary: An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml new file mode 100644 index 0000000000..e22526b0d5 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionUpdateData +summary: >- + An interface for updating data on the `ContentControlListItemCollection` object, for use in + `contentControlListItemCollection.set({ ... })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrollistitemdata.yml b/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrollistitemdata.yml new file mode 100644 index 0000000000..b14d4ec6c2 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrollistitemdata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemData +uid: 'word!Word.Interfaces.ContentControlListItemData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemData +summary: An interface describing the data returned by calling `contentControlListItem.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrollistitemupdatedata.yml b/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrollistitemupdatedata.yml new file mode 100644 index 0000000000..94e73591c6 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrollistitemupdatedata.yml @@ -0,0 +1,12 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemUpdateData +summary: >- + An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... + })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrolloadoptions.yml b/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrolloadoptions.yml index 781dc0c5f9..2b497a9074 100644 --- a/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrolloadoptions.yml +++ b/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrolloadoptions.yml @@ -68,7 +68,7 @@ properties: uid: 'word!Word.Interfaces.ContentControlLoadOptions#checkboxContentControl:member' package: word! fullName: checkboxContentControl - summary: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + summary: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrolupdatedata.yml b/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrolupdatedata.yml index cb78a93109..001ea1bf3d 100644 --- a/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrolupdatedata.yml +++ b/docs/docs-ref-autogen/word_1_7/word/word.interfaces.contentcontrolupdatedata.yml @@ -51,7 +51,7 @@ properties: uid: 'word!Word.Interfaces.ContentControlUpdateData#checkboxContentControl:member' package: word! fullName: checkboxContentControl - summary: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + summary: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/word_1_7/word/word.interfaces.dropdownlistcontentcontroldata.yml b/docs/docs-ref-autogen/word_1_7/word/word.interfaces.dropdownlistcontentcontroldata.yml new file mode 100644 index 0000000000..0802e15d92 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_7/word/word.interfaces.dropdownlistcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.DropDownListContentControlData +uid: 'word!Word.Interfaces.DropDownListContentControlData:interface' +package: word! +fullName: Word.Interfaces.DropDownListContentControlData +summary: An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_7/word/word.paragraph.yml b/docs/docs-ref-autogen/word_1_7/word/word.paragraph.yml index f9ef7a17be..e4b6d672c6 100644 --- a/docs/docs-ref-autogen/word_1_7/word/word.paragraph.yml +++ b/docs/docs-ref-autogen/word_1_7/word/word.paragraph.yml @@ -1509,7 +1509,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1580,16 +1580,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_7/word/word.range.yml b/docs/docs-ref-autogen/word_1_7/word/word.range.yml index de6a5ce7ea..1d4a39bab9 100644 --- a/docs/docs-ref-autogen/word_1_7/word/word.range.yml +++ b/docs/docs-ref-autogen/word_1_7/word/word.range.yml @@ -998,7 +998,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Places a dropdown list content control at the end of the selection. @@ -1292,7 +1292,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1338,16 +1338,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_8/toc.yml b/docs/docs-ref-autogen/word_1_8/toc.yml index 915b8d6a1e..5a5dc8e765 100644 --- a/docs/docs-ref-autogen/word_1_8/toc.yml +++ b/docs/docs-ref-autogen/word_1_8/toc.yml @@ -1071,6 +1071,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/word_1_8/word.yml b/docs/docs-ref-autogen/word_1_8/word.yml index 8459d72509..8b672ae280 100644 --- a/docs/docs-ref-autogen/word_1_8/word.yml +++ b/docs/docs-ref-autogen/word_1_8/word.yml @@ -130,6 +130,7 @@ interfaces: - 'word!Word.Interfaces.CheckboxContentControlLoadOptions:interface' - 'word!Word.Interfaces.CheckboxContentControlUpdateData:interface' - 'word!Word.Interfaces.CollectionLoadOptions:interface' + - 'word!Word.Interfaces.ComboBoxContentControlData:interface' - 'word!Word.Interfaces.CommentCollectionData:interface' - 'word!Word.Interfaces.CommentCollectionLoadOptions:interface' - 'word!Word.Interfaces.CommentCollectionUpdateData:interface' @@ -149,6 +150,10 @@ interfaces: - 'word!Word.Interfaces.ContentControlCollectionLoadOptions:interface' - 'word!Word.Interfaces.ContentControlCollectionUpdateData:interface' - 'word!Word.Interfaces.ContentControlData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' + - 'word!Word.Interfaces.ContentControlListItemData:interface' + - 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' - 'word!Word.Interfaces.ContentControlLoadOptions:interface' - 'word!Word.Interfaces.ContentControlUpdateData:interface' - 'word!Word.Interfaces.CritiqueAnnotationData:interface' @@ -176,6 +181,7 @@ interfaces: - 'word!Word.Interfaces.DocumentPropertiesLoadOptions:interface' - 'word!Word.Interfaces.DocumentPropertiesUpdateData:interface' - 'word!Word.Interfaces.DocumentUpdateData:interface' + - 'word!Word.Interfaces.DropDownListContentControlData:interface' - 'word!Word.Interfaces.FieldCollectionData:interface' - 'word!Word.Interfaces.FieldCollectionLoadOptions:interface' - 'word!Word.Interfaces.FieldCollectionUpdateData:interface' diff --git a/docs/docs-ref-autogen/word_1_8/word/word.body.yml b/docs/docs-ref-autogen/word_1_8/word/word.body.yml index da8819a964..f47a299085 100644 --- a/docs/docs-ref-autogen/word_1_8/word/word.body.yml +++ b/docs/docs-ref-autogen/word_1_8/word/word.body.yml @@ -1037,7 +1037,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1072,16 +1072,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_8/word/word.contentcontrol.yml b/docs/docs-ref-autogen/word_1_8/word/word.contentcontrol.yml index c060655104..abef410a0f 100644 --- a/docs/docs-ref-autogen/word_1_8/word/word.contentcontrol.yml +++ b/docs/docs-ref-autogen/word_1_8/word/word.contentcontrol.yml @@ -114,7 +114,7 @@ properties: uid: 'word!Word.ContentControl#checkboxContentControl:member' package: word! fullName: checkboxContentControl - summary: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + summary: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. remarks: >- \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] diff --git a/docs/docs-ref-autogen/word_1_8/word/word.contentcontroloptions.yml b/docs/docs-ref-autogen/word_1_8/word/word.contentcontroloptions.yml index 6378ac8d30..d7b0a8acd7 100644 --- a/docs/docs-ref-autogen/word_1_8/word/word.contentcontroloptions.yml +++ b/docs/docs-ref-autogen/word_1_8/word/word.contentcontroloptions.yml @@ -64,11 +64,15 @@ properties: uid: 'word!Word.ContentControlOptions#types:member' package: word! fullName: types - summary: 'An array of content control types, item must be ''RichText'', ''PlainText'', or ''CheckBox''.' - remarks: |- + summary: >- + An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. + remarks: >- \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] - Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + + Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. 'DropDownList' + and 'ComboBox' support was added in WordApi 1.9. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/word_1_8/word/word.document.yml b/docs/docs-ref-autogen/word_1_8/word/word.document.yml index 58ca71af8e..cad19f3ca9 100644 --- a/docs/docs-ref-autogen/word_1_8/word/word.document.yml +++ b/docs/docs-ref-autogen/word_1_8/word/word.document.yml @@ -678,15 +678,18 @@ methods: return: type: '' description: '' - - name: importStylesFromJson(stylesJson) + - name: 'importStylesFromJson(stylesJson, importedStylesConflictBehavior)' uid: 'word!Word.Document#importStylesFromJson:member(1)' package: word! - fullName: importStylesFromJson(stylesJson) + fullName: 'importStylesFromJson(stylesJson, importedStylesConflictBehavior)' summary: Import styles from a JSON-formatted string. remarks: >- \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + + #### Examples @@ -710,11 +713,45 @@ methods: isPreview: false isDeprecated: false syntax: - content: 'importStylesFromJson(stylesJson: string): OfficeExtension.ClientResult;' + content: >- + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): + OfficeExtension.ClientResult; parameters: - id: stylesJson description: Required. A JSON-formatted string representing the styles. type: string + - id: importedStylesConflictBehavior + description: >- + Optional. Specifies how to handle any imported styles with the same name as existing styles in the current + document. + type: Word.ImportedStylesConflictBehavior + return: + type: '<string[]>' + description: '' + - name: 'importStylesFromJson(stylesJson, importedStylesConflictBehaviorString)' + uid: 'word!Word.Document#importStylesFromJson:member(2)' + package: word! + fullName: 'importStylesFromJson(stylesJson, importedStylesConflictBehaviorString)' + summary: Import styles from a JSON-formatted string. + remarks: |- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + isPreview: false + isDeprecated: false + syntax: + content: >- + importStylesFromJson(stylesJson: string, importedStylesConflictBehaviorString?: "Ignore" | "Overwrite" | + "CreateNew"): OfficeExtension.ClientResult; + parameters: + - id: stylesJson + description: Required. A JSON-formatted string representing the styles. + type: string + - id: importedStylesConflictBehaviorString + description: >- + Optional. Specifies how to handle any imported styles with the same name as existing styles in the current + document. + type: '"Ignore" | "Overwrite" | "CreateNew"' return: type: '<string[]>' description: '' diff --git a/docs/docs-ref-autogen/word_1_8/word/word.interfaces.comboboxcontentcontroldata.yml b/docs/docs-ref-autogen/word_1_8/word/word.interfaces.comboboxcontentcontroldata.yml new file mode 100644 index 0000000000..6032dbb944 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_8/word/word.interfaces.comboboxcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ComboBoxContentControlData +uid: 'word!Word.Interfaces.ComboBoxContentControlData:interface' +package: word! +fullName: Word.Interfaces.ComboBoxContentControlData +summary: An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrolcollectionloadoptions.yml b/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrolcollectionloadoptions.yml index e4d5e7eb32..91ad1b9984 100644 --- a/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrolcollectionloadoptions.yml +++ b/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrolcollectionloadoptions.yml @@ -74,8 +74,8 @@ properties: package: word! fullName: checkboxContentControl summary: >- - For EACH ITEM in the collection: Specifies the checkbox-related data if the content control's type is 'CheckBox'. - It's `null` otherwise. + For EACH ITEM in the collection: Gets the data of the content control when its type is 'CheckBox'. It's `null` + otherwise. remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontroldata.yml b/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontroldata.yml index 70ba44c6e0..dc4b96ea8d 100644 --- a/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontroldata.yml +++ b/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontroldata.yml @@ -51,7 +51,7 @@ properties: uid: 'word!Word.Interfaces.ContentControlData#checkboxContentControl:member' package: word! fullName: checkboxContentControl - summary: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + summary: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrollistitemcollectiondata.yml b/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrollistitemcollectiondata.yml new file mode 100644 index 0000000000..75af720340 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrollistitemcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionData +summary: An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml new file mode 100644 index 0000000000..e22526b0d5 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionUpdateData +summary: >- + An interface for updating data on the `ContentControlListItemCollection` object, for use in + `contentControlListItemCollection.set({ ... })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrollistitemdata.yml b/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrollistitemdata.yml new file mode 100644 index 0000000000..b14d4ec6c2 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrollistitemdata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemData +uid: 'word!Word.Interfaces.ContentControlListItemData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemData +summary: An interface describing the data returned by calling `contentControlListItem.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrollistitemupdatedata.yml b/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrollistitemupdatedata.yml new file mode 100644 index 0000000000..94e73591c6 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrollistitemupdatedata.yml @@ -0,0 +1,12 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemUpdateData +summary: >- + An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... + })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrolloadoptions.yml b/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrolloadoptions.yml index 781dc0c5f9..2b497a9074 100644 --- a/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrolloadoptions.yml +++ b/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrolloadoptions.yml @@ -68,7 +68,7 @@ properties: uid: 'word!Word.Interfaces.ContentControlLoadOptions#checkboxContentControl:member' package: word! fullName: checkboxContentControl - summary: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + summary: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrolupdatedata.yml b/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrolupdatedata.yml index cb78a93109..001ea1bf3d 100644 --- a/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrolupdatedata.yml +++ b/docs/docs-ref-autogen/word_1_8/word/word.interfaces.contentcontrolupdatedata.yml @@ -51,7 +51,7 @@ properties: uid: 'word!Word.Interfaces.ContentControlUpdateData#checkboxContentControl:member' package: word! fullName: checkboxContentControl - summary: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + summary: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/word_1_8/word/word.interfaces.dropdownlistcontentcontroldata.yml b/docs/docs-ref-autogen/word_1_8/word/word.interfaces.dropdownlistcontentcontroldata.yml new file mode 100644 index 0000000000..0802e15d92 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_8/word/word.interfaces.dropdownlistcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.DropDownListContentControlData +uid: 'word!Word.Interfaces.DropDownListContentControlData:interface' +package: word! +fullName: Word.Interfaces.DropDownListContentControlData +summary: An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_8/word/word.paragraph.yml b/docs/docs-ref-autogen/word_1_8/word/word.paragraph.yml index f9ef7a17be..e4b6d672c6 100644 --- a/docs/docs-ref-autogen/word_1_8/word/word.paragraph.yml +++ b/docs/docs-ref-autogen/word_1_8/word/word.paragraph.yml @@ -1509,7 +1509,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1580,16 +1580,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_8/word/word.range.yml b/docs/docs-ref-autogen/word_1_8/word/word.range.yml index 2e34aeb8b1..bc9e7dfb54 100644 --- a/docs/docs-ref-autogen/word_1_8/word/word.range.yml +++ b/docs/docs-ref-autogen/word_1_8/word/word.range.yml @@ -998,7 +998,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Places a dropdown list content control at the end of the selection. @@ -1307,7 +1307,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1353,16 +1353,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_1_9/toc.yml b/docs/docs-ref-autogen/word_1_9/toc.yml new file mode 100644 index 0000000000..ffece68a0f --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/toc.yml @@ -0,0 +1,1137 @@ +items: + - name: API reference + items: + - name: API reference overview + href: ../overview/overview.md + - name: Excel + href: /javascript/api/excel + - name: OneNote + href: /javascript/api/onenote + - name: Outlook + href: /javascript/api/outlook + - name: PowerPoint + href: /javascript/api/powerpoint + - name: Visio + href: /javascript/api/visio + - name: Word + uid: word! + items: + - name: Enums + uid: '' + items: + - name: Alignment + uid: 'word!Word.Alignment:enum' + - name: AnnotationState + uid: 'word!Word.AnnotationState:enum' + - name: BodyType + uid: 'word!Word.BodyType:enum' + - name: BorderLocation + uid: 'word!Word.BorderLocation:enum' + - name: BorderType + uid: 'word!Word.BorderType:enum' + - name: BreakType + uid: 'word!Word.BreakType:enum' + - name: BuiltInStyleName + uid: 'word!Word.BuiltInStyleName:enum' + - name: CellPaddingLocation + uid: 'word!Word.CellPaddingLocation:enum' + - name: ChangeTrackingMode + uid: 'word!Word.ChangeTrackingMode:enum' + - name: ChangeTrackingState + uid: 'word!Word.ChangeTrackingState:enum' + - name: ChangeTrackingVersion + uid: 'word!Word.ChangeTrackingVersion:enum' + - name: CloseBehavior + uid: 'word!Word.CloseBehavior:enum' + - name: ContentControlAppearance + uid: 'word!Word.ContentControlAppearance:enum' + - name: ContentControlType + uid: 'word!Word.ContentControlType:enum' + - name: CritiqueColorScheme + uid: 'word!Word.CritiqueColorScheme:enum' + - name: DocumentPropertyType + uid: 'word!Word.DocumentPropertyType:enum' + - name: ErrorCodes + uid: 'word!Word.ErrorCodes:enum' + - name: EventSource + uid: 'word!Word.EventSource:enum' + - name: EventType + uid: 'word!Word.EventType:enum' + - name: FieldKind + uid: 'word!Word.FieldKind:enum' + - name: FieldType + uid: 'word!Word.FieldType:enum' + - name: HeaderFooterType + uid: 'word!Word.HeaderFooterType:enum' + - name: InsertLocation + uid: 'word!Word.InsertLocation:enum' + - name: ListBullet + uid: 'word!Word.ListBullet:enum' + - name: ListLevelType + uid: 'word!Word.ListLevelType:enum' + - name: ListNumbering + uid: 'word!Word.ListNumbering:enum' + - name: LocationRelation + uid: 'word!Word.LocationRelation:enum' + - name: NoteItemType + uid: 'word!Word.NoteItemType:enum' + - name: OutlineLevel + uid: 'word!Word.OutlineLevel:enum' + - name: RangeLocation + uid: 'word!Word.RangeLocation:enum' + - name: SaveBehavior + uid: 'word!Word.SaveBehavior:enum' + - name: SelectionMode + uid: 'word!Word.SelectionMode:enum' + - name: StyleType + uid: 'word!Word.StyleType:enum' + - name: TrackedChangeType + uid: 'word!Word.TrackedChangeType:enum' + - name: UnderlineType + uid: 'word!Word.UnderlineType:enum' + - name: VerticalAlignment + uid: 'word!Word.VerticalAlignment:enum' + - name: Annotation + uid: 'word!Word.Annotation:class' + - name: AnnotationClickedEventArgs + uid: 'word!Word.AnnotationClickedEventArgs:interface' + - name: AnnotationCollection + uid: 'word!Word.AnnotationCollection:class' + - name: AnnotationHoveredEventArgs + uid: 'word!Word.AnnotationHoveredEventArgs:interface' + - name: AnnotationInsertedEventArgs + uid: 'word!Word.AnnotationInsertedEventArgs:interface' + - name: AnnotationPopupActionEventArgs + uid: 'word!Word.AnnotationPopupActionEventArgs:interface' + - name: AnnotationRemovedEventArgs + uid: 'word!Word.AnnotationRemovedEventArgs:interface' + - name: AnnotationSet + uid: 'word!Word.AnnotationSet:interface' + - name: Application + uid: 'word!Word.Application:class' + - name: Body + uid: 'word!Word.Body:class' + - name: CheckboxContentControl + uid: 'word!Word.CheckboxContentControl:class' + - name: ComboBoxContentControl + uid: 'word!Word.ComboBoxContentControl:class' + - name: Comment + uid: 'word!Word.Comment:class' + - name: CommentCollection + uid: 'word!Word.CommentCollection:class' + - name: CommentContentRange + uid: 'word!Word.CommentContentRange:class' + - name: CommentReply + uid: 'word!Word.CommentReply:class' + - name: CommentReplyCollection + uid: 'word!Word.CommentReplyCollection:class' + - name: ContentControl + uid: 'word!Word.ContentControl:class' + - name: ContentControlAddedEventArgs + uid: 'word!Word.ContentControlAddedEventArgs:interface' + - name: ContentControlCollection + uid: 'word!Word.ContentControlCollection:class' + - name: ContentControlDataChangedEventArgs + uid: 'word!Word.ContentControlDataChangedEventArgs:interface' + - name: ContentControlDeletedEventArgs + uid: 'word!Word.ContentControlDeletedEventArgs:interface' + - name: ContentControlEnteredEventArgs + uid: 'word!Word.ContentControlEnteredEventArgs:interface' + - name: ContentControlExitedEventArgs + uid: 'word!Word.ContentControlExitedEventArgs:interface' + - name: ContentControlListItem + uid: 'word!Word.ContentControlListItem:class' + - name: ContentControlListItemCollection + uid: 'word!Word.ContentControlListItemCollection:class' + - name: ContentControlOptions + uid: 'word!Word.ContentControlOptions:interface' + - name: ContentControlSelectionChangedEventArgs + uid: 'word!Word.ContentControlSelectionChangedEventArgs:interface' + - name: Critique + uid: 'word!Word.Critique:interface' + - name: CritiqueAnnotation + uid: 'word!Word.CritiqueAnnotation:class' + - name: CritiquePopupOptions + uid: 'word!Word.CritiquePopupOptions:interface' + - name: CustomProperty + uid: 'word!Word.CustomProperty:class' + - name: CustomPropertyCollection + uid: 'word!Word.CustomPropertyCollection:class' + - name: CustomXmlPart + uid: 'word!Word.CustomXmlPart:class' + - name: CustomXmlPartCollection + uid: 'word!Word.CustomXmlPartCollection:class' + - name: CustomXmlPartScopedCollection + uid: 'word!Word.CustomXmlPartScopedCollection:class' + - name: Document + uid: 'word!Word.Document:class' + - name: DocumentCreated + uid: 'word!Word.DocumentCreated:class' + - name: DocumentProperties + uid: 'word!Word.DocumentProperties:class' + - name: DropDownListContentControl + uid: 'word!Word.DropDownListContentControl:class' + - name: Field + uid: 'word!Word.Field:class' + - name: FieldCollection + uid: 'word!Word.FieldCollection:class' + - name: Font + uid: 'word!Word.Font:class' + - name: GetTextOptions + uid: 'word!Word.GetTextOptions:interface' + - name: InlinePicture + uid: 'word!Word.InlinePicture:class' + - name: InlinePictureCollection + uid: 'word!Word.InlinePictureCollection:class' + - name: InsertFileOptions + uid: 'word!Word.InsertFileOptions:interface' + - name: List + uid: 'word!Word.List:class' + - name: ListCollection + uid: 'word!Word.ListCollection:class' + - name: ListItem + uid: 'word!Word.ListItem:class' + - name: NoteItem + uid: 'word!Word.NoteItem:class' + - name: NoteItemCollection + uid: 'word!Word.NoteItemCollection:class' + - name: Paragraph + uid: 'word!Word.Paragraph:class' + - name: ParagraphAddedEventArgs + uid: 'word!Word.ParagraphAddedEventArgs:interface' + - name: ParagraphChangedEventArgs + uid: 'word!Word.ParagraphChangedEventArgs:interface' + - name: ParagraphCollection + uid: 'word!Word.ParagraphCollection:class' + - name: ParagraphDeletedEventArgs + uid: 'word!Word.ParagraphDeletedEventArgs:interface' + - name: ParagraphFormat + uid: 'word!Word.ParagraphFormat:class' + - name: Range + uid: 'word!Word.Range:class' + - name: RangeCollection + uid: 'word!Word.RangeCollection:class' + - name: RequestContext + uid: 'word!Word.RequestContext:class' + - name: SearchOptions + uid: 'word!Word.SearchOptions:class' + - name: Section + uid: 'word!Word.Section:class' + - name: SectionCollection + uid: 'word!Word.SectionCollection:class' + - name: Setting + uid: 'word!Word.Setting:class' + - name: SettingCollection + uid: 'word!Word.SettingCollection:class' + - name: Shading + uid: 'word!Word.Shading:class' + - name: Style + uid: 'word!Word.Style:class' + - name: StyleCollection + uid: 'word!Word.StyleCollection:class' + - name: Table + uid: 'word!Word.Table:class' + - name: TableBorder + uid: 'word!Word.TableBorder:class' + - name: TableCell + uid: 'word!Word.TableCell:class' + - name: TableCellCollection + uid: 'word!Word.TableCellCollection:class' + - name: TableCollection + uid: 'word!Word.TableCollection:class' + - name: TableRow + uid: 'word!Word.TableRow:class' + - name: TableRowCollection + uid: 'word!Word.TableRowCollection:class' + - name: TableStyle + uid: 'word!Word.TableStyle:class' + - name: TrackedChange + uid: 'word!Word.TrackedChange:class' + - name: TrackedChangeCollection + uid: 'word!Word.TrackedChangeCollection:class' + - name: Common APIs + uid: office! + items: + - name: Office + uid: office! + items: + - name: Enums + uid: '' + items: + - name: ActiveView + uid: 'office!Office.ActiveView:enum' + - name: AsyncResultStatus + uid: 'office!Office.AsyncResultStatus:enum' + - name: BindingType + uid: 'office!Office.BindingType:enum' + - name: CoercionType + uid: 'office!Office.CoercionType:enum' + - name: CustomXMLNodeType + uid: 'office!Office.CustomXMLNodeType:enum' + - name: DevicePermissionType + uid: 'office!Office.DevicePermissionType:enum' + - name: DocumentMode + uid: 'office!Office.DocumentMode:enum' + - name: EventType + uid: 'office!Office.EventType:enum' + - name: FileType + uid: 'office!Office.FileType:enum' + - name: FilterType + uid: 'office!Office.FilterType:enum' + - name: GoToType + uid: 'office!Office.GoToType:enum' + - name: HostType + uid: 'office!Office.HostType:enum' + - name: Index + uid: 'office!Office.Index:enum' + - name: InitializationReason + uid: 'office!Office.InitializationReason:enum' + - name: PlatformType + uid: 'office!Office.PlatformType:enum' + - name: ProjectProjectFields + uid: 'office!Office.ProjectProjectFields:enum' + - name: ProjectResourceFields + uid: 'office!Office.ProjectResourceFields:enum' + - name: ProjectTaskFields + uid: 'office!Office.ProjectTaskFields:enum' + - name: ProjectViewTypes + uid: 'office!Office.ProjectViewTypes:enum' + - name: SelectionMode + uid: 'office!Office.SelectionMode:enum' + - name: StartupBehavior + uid: 'office!Office.StartupBehavior:enum' + - name: Table + uid: 'office!Office.Table:enum' + - name: ThemeId + uid: 'office!Office.ThemeId:enum' + - name: ValueFormat + uid: 'office!Office.ValueFormat:enum' + - name: VisibilityMode + uid: 'office!Office.VisibilityMode:enum' + - name: Actions + uid: 'office!Office.Actions:interface' + - name: AddBindingFromNamedItemOptions + uid: 'office!Office.AddBindingFromNamedItemOptions:interface' + - name: AddBindingFromPromptOptions + uid: 'office!Office.AddBindingFromPromptOptions:interface' + - name: AddBindingFromSelectionOptions + uid: 'office!Office.AddBindingFromSelectionOptions:interface' + - name: Addin + uid: 'office!Office.Addin:interface' + - name: AddinCommands.Event + uid: 'office!Office.AddinCommands.Event:interface' + - name: AddinCommands.EventCompletedOptions + uid: 'office!Office.AddinCommands.EventCompletedOptions:interface' + - name: AddinCommands.Source + uid: 'office!Office.AddinCommands.Source:interface' + - name: AsyncContextOptions + uid: 'office!Office.AsyncContextOptions:interface' + - name: AsyncResult + uid: 'office!Office.AsyncResult:interface' + - name: Auth + uid: 'office!Office.Auth:interface' + - name: AuthOptions + uid: 'office!Office.AuthOptions:interface' + - name: BeforeDocumentCloseNotification + uid: 'office!Office.BeforeDocumentCloseNotification:interface' + - name: Binding + uid: 'office!Office.Binding:interface' + - name: BindingDataChangedEventArgs + uid: 'office!Office.BindingDataChangedEventArgs:interface' + - name: Bindings + uid: 'office!Office.Bindings:interface' + - name: BindingSelectionChangedEventArgs + uid: 'office!Office.BindingSelectionChangedEventArgs:interface' + - name: Context + uid: 'office!Office.Context:interface' + - name: ContextInformation + uid: 'office!Office.ContextInformation:interface' + - name: Control + uid: 'office!Office.Control:interface' + - name: CustomXmlNode + uid: 'office!Office.CustomXmlNode:interface' + - name: CustomXmlPart + uid: 'office!Office.CustomXmlPart:interface' + - name: CustomXmlParts + uid: 'office!Office.CustomXmlParts:interface' + - name: CustomXmlPrefixMappings + uid: 'office!Office.CustomXmlPrefixMappings:interface' + - name: DevicePermission + uid: 'office!Office.DevicePermission:interface' + - name: Dialog + uid: 'office!Office.Dialog:interface' + - name: DialogMessageOptions + uid: 'office!Office.DialogMessageOptions:interface' + - name: DialogOptions + uid: 'office!Office.DialogOptions:interface' + - name: DialogParentMessageReceivedEventArgs + uid: 'office!Office.DialogParentMessageReceivedEventArgs:interface' + - name: Document + uid: 'office!Office.Document:interface' + - name: DocumentSelectionChangedEventArgs + uid: 'office!Office.DocumentSelectionChangedEventArgs:interface' + - name: Error + uid: 'office!Office.Error:interface' + - name: File + uid: 'office!Office.File:interface' + - name: FileProperties + uid: 'office!Office.FileProperties:interface' + - name: GetBindingDataOptions + uid: 'office!Office.GetBindingDataOptions:interface' + - name: GetFileOptions + uid: 'office!Office.GetFileOptions:interface' + - name: GetSelectedDataOptions + uid: 'office!Office.GetSelectedDataOptions:interface' + - name: GoToByIdOptions + uid: 'office!Office.GoToByIdOptions:interface' + - name: Group + uid: 'office!Office.Group:interface' + - name: IPromiseConstructor + uid: 'office!Office.IPromiseConstructor:interface' + - name: MatrixBinding + uid: 'office!Office.MatrixBinding:interface' + - name: NodeDeletedEventArgs + uid: 'office!Office.NodeDeletedEventArgs:interface' + - name: NodeInsertedEventArgs + uid: 'office!Office.NodeInsertedEventArgs:interface' + - name: NodeReplacedEventArgs + uid: 'office!Office.NodeReplacedEventArgs:interface' + - name: OfficeTheme + uid: 'office!Office.OfficeTheme:interface' + - name: RangeCoordinates + uid: 'office!Office.RangeCoordinates:interface' + - name: RangeFormatConfiguration + uid: 'office!Office.RangeFormatConfiguration:interface' + - name: RemoveHandlerOptions + uid: 'office!Office.RemoveHandlerOptions:interface' + - name: RequirementSetSupport + uid: 'office!Office.RequirementSetSupport:interface' + - name: Ribbon + uid: 'office!Office.Ribbon:interface' + - name: RibbonUpdaterData + uid: 'office!Office.RibbonUpdaterData:interface' + - name: SaveSettingsOptions + uid: 'office!Office.SaveSettingsOptions:interface' + - name: SetBindingDataOptions + uid: 'office!Office.SetBindingDataOptions:interface' + - name: SetSelectedDataOptions + uid: 'office!Office.SetSelectedDataOptions:interface' + - name: Settings + uid: 'office!Office.Settings:interface' + - name: SettingsChangedEventArgs + uid: 'office!Office.SettingsChangedEventArgs:interface' + - name: Slice + uid: 'office!Office.Slice:interface' + - name: Tab + uid: 'office!Office.Tab:interface' + - name: TableBinding + uid: 'office!Office.TableBinding:interface' + - name: TableData + uid: 'office!Office.TableData:class' + - name: TextBinding + uid: 'office!Office.TextBinding:interface' + - name: UI + uid: 'office!Office.UI:interface' + - name: Urls + uid: 'office!Office.Urls:interface' + - name: VisibilityModeChangedMessage + uid: 'office!Office.VisibilityModeChangedMessage:interface' + - name: OfficeExtension + items: + - name: ClientObject + uid: 'office!OfficeExtension.ClientObject:class' + - name: ClientRequestContext + uid: 'office!OfficeExtension.ClientRequestContext:class' + - name: ClientResult + uid: 'office!OfficeExtension.ClientResult:class' + - name: DebugInfo + uid: 'office!OfficeExtension.DebugInfo:interface' + - name: EmbeddedOptions + uid: 'office!OfficeExtension.EmbeddedOptions:interface' + - name: EmbeddedSession + uid: 'office!OfficeExtension.EmbeddedSession:class' + - name: Error + uid: 'office!OfficeExtension.Error:class' + - name: ErrorCodes + uid: 'office!OfficeExtension.ErrorCodes:class' + - name: EventHandlerResult + uid: 'office!OfficeExtension.EventHandlerResult:class' + - name: EventHandlers + uid: 'office!OfficeExtension.EventHandlers:class' + - name: EventInfo + uid: 'office!OfficeExtension.EventInfo:interface' + - name: IPromise + uid: 'office!OfficeExtension.IPromise:type' + - name: LoadOption + uid: 'office!OfficeExtension.LoadOption:interface' + - name: RequestContextDebugInfo + uid: 'office!OfficeExtension.RequestContextDebugInfo:interface' + - name: RequestUrlAndHeaderInfo + uid: 'office!OfficeExtension.RequestUrlAndHeaderInfo:interface' + - name: RunOptions + uid: 'office!OfficeExtension.RunOptions:interface' + - name: TrackedObjects + uid: 'office!OfficeExtension.TrackedObjects:class' + - name: UpdateOptions + uid: 'office!OfficeExtension.UpdateOptions:interface' + - name: OfficeRuntime + uid: office-runtime! + items: + - name: ApiInformation + uid: 'office-runtime!OfficeRuntime.ApiInformation:interface' + - name: Auth + uid: 'office-runtime!OfficeRuntime.Auth:interface' + - name: AuthOptions + uid: 'office-runtime!OfficeRuntime.AuthOptions:interface' + - name: Dialog + uid: 'office-runtime!OfficeRuntime.Dialog:interface' + - name: DisplayWebDialogOptions + uid: 'office-runtime!OfficeRuntime.DisplayWebDialogOptions:interface' + - name: Storage + uid: 'office-runtime!OfficeRuntime.Storage:interface' + - name: Add-in only manifest reference + items: + - name: Add-in only manifest overview + href: ../../manifest/manifest.md + - name: AllowSnapshot + href: ../../manifest/allowsnapshot.md + - name: AlternateId + href: ../../manifest/alternateid.md + - name: AppDomain + href: ../../manifest/appdomain.md + - name: AppDomains + href: ../../manifest/appdomains.md + - name: CitationText + href: ../../manifest/citationtext.md + - name: DefaultLocale + href: ../../manifest/defaultlocale.md + - name: DefaultSettings + href: ../../manifest/defaultsettings.md + - name: Description + href: ../../manifest/description.md + - name: DesktopSettings + href: ../../manifest/desktopsettings.md + - name: Dictionary + href: ../../manifest/dictionary.md + - name: DictionaryHomePage + href: ../../manifest/dictionaryhomepage.md + - name: DisableEntityHighlighting + href: ../../manifest/disableentityhighlighting.md + - name: DisplayName + href: ../../manifest/displayname.md + - name: EquivalentAddin + href: ../../manifest/equivalentaddin.md + - name: EquivalentAddins + href: ../../manifest/equivalentaddins.md + - name: ExtendedOverrides + href: ../../manifest/extendedoverrides.md + - name: FileName + href: ../../manifest/filename.md + - name: Form + href: ../../manifest/form.md + - name: FormSettings + href: ../../manifest/formsettings.md + - name: HighResolutionIconUrl + href: ../../manifest/highresolutioniconurl.md + - name: Host + href: ../../manifest/host.md + - name: Hosts + href: ../../manifest/hosts.md + - name: IconUrl + href: ../../manifest/iconurl.md + - name: Id + href: ../../manifest/id.md + - name: Metadata + href: ../../manifest/metadata.md + - name: Method + href: ../../manifest/method.md + - name: Methods + href: ../../manifest/methods.md + - name: Namespace + href: ../../manifest/namespace.md + - name: OfficeApp + href: ../../manifest/officeapp.md + - name: Override + href: ../../manifest/override.md + - name: Permissions + href: ../../manifest/permissions.md + - name: PhoneSettings + href: ../../manifest/phonesettings.md + - name: ProgId + href: ../../manifest/progid.md + - name: ProviderName + href: ../../manifest/providername.md + - name: QueryUri + href: ../../manifest/queryuri.md + - name: RequestedHeight + href: ../../manifest/requestedheight.md + - name: RequestedWidth + href: ../../manifest/requestedwidth.md + - name: Requirements + href: ../../manifest/requirements.md + - name: Rule + href: ../../manifest/rule.md + - name: Set + href: ../../manifest/set.md + - name: Sets + href: ../../manifest/sets.md + - name: SourceLocation + href: ../../manifest/sourcelocation.md + - name: SupportUrl + href: ../../manifest/supporturl.md + - name: TabletSettings + href: ../../manifest/tabletsettings.md + - name: TargetDialect + href: ../../manifest/targetdialect.md + - name: TargetDialects + href: ../../manifest/targetdialects.md + - name: Tokens + href: ../../manifest/tokens.md + - name: Token + href: ../../manifest/token.md + - name: Type + href: ../../manifest/type.md + - name: Version + href: ../../manifest/version.md + - name: VersionOverrides + items: + - name: VersionOverrides Overview + href: ../../manifest/versionoverrides.md + - name: VersionOverrides 1.0 TaskPane + href: ../../manifest/versionoverrides-1-0-taskpane.md + - name: VersionOverrides 1.0 Content + href: ../../manifest/versionoverrides-1-0-content.md + - name: VersionOverrides 1.0 Mail + href: ../../manifest/versionoverrides-1-0-mail.md + - name: VersionOverrides 1.1 Mail + href: ../../manifest/versionoverrides-1-1-mail.md + - name: Action + href: ../../manifest/action.md + - name: AllFormFactors + href: ../../manifest/allformfactors.md + - name: Control + href: ../../manifest/control.md + - name: Control (Button) + href: ../../manifest/control-button.md + - name: Control (Menu) + href: ../../manifest/control-menu.md + - name: Control (MobileButton) + href: ../../manifest/control-mobilebutton.md + - name: CustomTab + href: ../../manifest/customtab.md + - name: DesktopFormFactor + href: ../../manifest/desktopformfactor.md + - name: Enabled + href: ../../manifest/enabled.md + - name: EquivalentAddin + href: ../../manifest/equivalentaddin.md + - name: EquivalentAddins + href: ../../manifest/equivalentaddins.md + - name: Event + href: ../../manifest/event.md + - name: ExtendedPermission + href: ../../manifest/extendedpermission.md + - name: ExtendedPermissions + href: ../../manifest/extendedpermissions.md + - name: ExtensionPoint + href: ../../manifest/extensionpoint.md + - name: FunctionFile + href: ../../manifest/functionfile.md + - name: GetStarted + href: ../../manifest/getstarted.md + - name: Group + href: ../../manifest/group.md + - name: Host + href: ../../manifest/host.md + - name: Hosts + href: ../../manifest/hosts.md + - name: Icon + href: ../../manifest/icon.md + - name: Image + href: ../../manifest/image.md + - name: Images + href: ../../manifest/images.md + - name: Item + href: ../../manifest/item.md + - name: Items + href: ../../manifest/items.md + - name: LaunchEvent + href: ../../manifest/launchevent.md + - name: LaunchEvents + href: ../../manifest/launchevents.md + - name: LongStrings + href: ../../manifest/longstrings.md + - name: MessageAttachment + href: ../../manifest/messageattachment.md + - name: MessageAttachments + href: ../../manifest/messageattachments.md + - name: MobileFormFactor + href: ../../manifest/mobileformfactor.md + - name: MoreInfo + href: ../../manifest/moreinfo.md + - name: OfficeMenu + href: ../../manifest/officemenu.md + - name: OfficeTab + href: ../../manifest/officetab.md + - name: Override + href: ../../manifest/override.md + - name: OverriddenByRibbonApi + href: ../../manifest/overriddenbyribbonapi.md + - name: Page + href: ../../manifest/page.md + - name: PreProcessingDialog + href: ../../manifest/preprocessingdialog.md + - name: ReportPhishingCustomization + href: ../../manifest/reportphishingcustomization.md + - name: ReportingOptions + href: ../../manifest/reportingoptions.md + - name: Resources + href: ../../manifest/resources.md + - name: Runtime + href: ../../manifest/runtime.md + - name: Runtimes + href: ../../manifest/runtimes.md + - name: Scopes + href: ../../manifest/scopes.md + - name: Script + href: ../../manifest/script.md + - name: ShortStrings + href: ../../manifest/shortstrings.md + - name: SourceLocation (version overrides) + href: ../../manifest/customfunctionssourcelocation.md + - name: String + href: ../../manifest/string.md + - name: Supertip + href: ../../manifest/supertip.md + - name: SupportsSharedFolders + href: ../../manifest/supportssharedfolders.md + - name: Url + href: ../../manifest/url.md + - name: Urls + href: ../../manifest/urls.md + - name: WebApplicationInfo + href: ../../manifest/webapplicationinfo.md + - name: Requirement sets + items: + - name: Application and platform availability + href: ../../requirement-sets/requirement-sets.md + - name: Excel requirement sets + items: + - name: Overview + href: ../../requirement-sets/excel/excel-api-requirement-sets.md + displayName: Excel + - name: CustomFunctionsRuntime API requirement sets + href: ../../requirement-sets/excel/custom-functions-requirement-sets.md + displayName: 'Excel, Custom Functions' + - name: Excel preview APIs + href: ../../requirement-sets/excel/excel-preview-apis.md + displayName: Excel + - name: ExcelApi online-only requirement set + href: ../../requirement-sets/excel/excel-api-online-requirement-set.md + displayName: Excel + - name: ExcelApi 1.17 requirement set + href: ../../requirement-sets/excel/excel-api-1-17-requirement-set.md + displayName: Excel + - name: ExcelApi 1.16 requirement set + href: ../../requirement-sets/excel/excel-api-1-16-requirement-set.md + displayName: Excel + - name: ExcelApi 1.15 requirement set + href: ../../requirement-sets/excel/excel-api-1-15-requirement-set.md + displayName: Excel + - name: ExcelApi 1.14 requirement set + href: ../../requirement-sets/excel/excel-api-1-14-requirement-set.md + displayName: Excel + - name: ExcelApi 1.13 requirement set + href: ../../requirement-sets/excel/excel-api-1-13-requirement-set.md + displayName: Excel + - name: ExcelApi 1.12 requirement set + href: ../../requirement-sets/excel/excel-api-1-12-requirement-set.md + displayName: Excel + - name: ExcelApi 1.11 requirement set + href: ../../requirement-sets/excel/excel-api-1-11-requirement-set.md + displayName: Excel + - name: ExcelApi 1.10 requirement set + href: ../../requirement-sets/excel/excel-api-1-10-requirement-set.md + displayName: Excel + - name: ExcelApi 1.9 requirement set + href: ../../requirement-sets/excel/excel-api-1-9-requirement-set.md + displayName: Excel + - name: ExcelApi 1.8 requirement set + href: ../../requirement-sets/excel/excel-api-1-8-requirement-set.md + displayName: Excel + - name: ExcelApi 1.7 requirement set + href: ../../requirement-sets/excel/excel-api-1-7-requirement-set.md + displayName: Excel + - name: ExcelApi 1.6 requirement set + href: ../../requirement-sets/excel/excel-api-1-6-requirement-set.md + displayName: Excel + - name: ExcelApi 1.5 requirement set + href: ../../requirement-sets/excel/excel-api-1-5-requirement-set.md + displayName: Excel + - name: ExcelApi 1.4 requirement set + href: ../../requirement-sets/excel/excel-api-1-4-requirement-set.md + displayName: Excel + - name: ExcelApi 1.3 requirement set + href: ../../requirement-sets/excel/excel-api-1-3-requirement-set.md + displayName: Excel + - name: ExcelApi 1.2 requirement set + href: ../../requirement-sets/excel/excel-api-1-2-requirement-set.md + displayName: Excel + - name: ExcelApi 1.1 requirement set + href: ../../requirement-sets/excel/excel-api-1-1-requirement-set.md + displayName: Excel + - name: OneNote requirement sets + items: + - name: API requirement sets + href: ../../requirement-sets/onenote/onenote-api-requirement-sets.md + displayName: OneNote + - name: Outlook requirement sets + items: + - name: Overview + href: ../../requirement-sets/outlook/outlook-api-requirement-sets.md + displayName: Outlook + - name: Mailbox preview requirement set + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/preview-requirement-set/outlook-requirement-set-preview.md + - name: Office + href: >- + ../../requirement-sets/outlook/preview-requirement-set/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/preview-requirement-set/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.14 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.14/outlook-requirement-set-1.14.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.14/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.14/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.14/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.14/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.13 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.13/outlook-requirement-set-1.13.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.13/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.13/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.13/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.13/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.12 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.12/outlook-requirement-set-1.12.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.12/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.12/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.12/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.12/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.11 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.11/outlook-requirement-set-1.11.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.11/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.11/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.11/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.11/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.10 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.10/outlook-requirement-set-1.10.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.10/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.10/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.10/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.10/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.9 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.9/outlook-requirement-set-1.9.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.9/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.9/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.9/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.9/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.8 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.8/outlook-requirement-set-1.8.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.8/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.8/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.8/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.8/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.7 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.7/outlook-requirement-set-1.7.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.7/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.7/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.7/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.7/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.6 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.6/outlook-requirement-set-1.6.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.6/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.6/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.6/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.6/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.5 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.5/outlook-requirement-set-1.5.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.5/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.5/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.5/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.5/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.4 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.4/outlook-requirement-set-1.4.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.4/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.4/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.4/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.4/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.3 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.3/outlook-requirement-set-1.3.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.3/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.3/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.3/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.3/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.2 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.2/outlook-requirement-set-1.2.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.2/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.2/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.2/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.2/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.1 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.1/outlook-requirement-set-1.1.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.1/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.1/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.1/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.1/Office.context.mailbox.item.md + - name: PowerPoint requirement sets + items: + - name: Overview + href: >- + ../../requirement-sets/powerpoint/powerpoint-api-requirement-sets.md + displayName: PowerPoint + - name: PowerPoint preview APIs + href: ../../requirement-sets/powerpoint/powerpoint-preview-apis.md + displayName: PowerPoint + - name: PowerPointApi 1.6 requirement set + href: >- + ../../requirement-sets/powerpoint/powerpoint-api-1-6-requirement-set.md + displayName: PowerPoint + - name: PowerPointApi 1.5 requirement set + href: >- + ../../requirement-sets/powerpoint/powerpoint-api-1-5-requirement-set.md + displayName: PowerPoint + - name: PowerPointApi 1.4 requirement set + href: >- + ../../requirement-sets/powerpoint/powerpoint-api-1-4-requirement-set.md + displayName: PowerPoint + - name: PowerPointApi 1.3 requirement set + href: >- + ../../requirement-sets/powerpoint/powerpoint-api-1-3-requirement-set.md + displayName: PowerPoint + - name: PowerPointApi 1.2 requirement set + href: >- + ../../requirement-sets/powerpoint/powerpoint-api-1-2-requirement-set.md + displayName: PowerPoint + - name: PowerPointApi 1.1 requirement set + href: >- + ../../requirement-sets/powerpoint/powerpoint-api-1-1-requirement-set.md + displayName: PowerPoint + - name: Word requirement sets + items: + - name: Overview + href: ../../requirement-sets/word/word-api-requirement-sets.md + displayName: Word + - name: Word preview APIs + href: ../../requirement-sets/word/word-preview-apis.md + displayName: Word + - name: WordApi online-only requirement set + href: ../../requirement-sets/word/word-api-online-requirement-set.md + displayName: Word + - name: WordApiDesktop 1.1 requirement set + href: >- + ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md + displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word + - name: WordApi 1.8 requirement set + href: ../../requirement-sets/word/word-api-1-8-requirement-set.md + displayName: Word + - name: WordApi 1.7 requirement set + href: ../../requirement-sets/word/word-api-1-7-requirement-set.md + displayName: Word + - name: WordApi 1.6 requirement set + href: ../../requirement-sets/word/word-api-1-6-requirement-set.md + displayName: Word + - name: WordApi 1.5 requirement set + href: ../../requirement-sets/word/word-api-1-5-requirement-set.md + displayName: Word + - name: WordApi 1.4 requirement set + href: ../../requirement-sets/word/word-api-1-4-requirement-set.md + displayName: Word + - name: WordApi 1.3 requirement set + href: ../../requirement-sets/word/word-api-1-3-requirement-set.md + displayName: Word + - name: WordApi 1.2 requirement set + href: ../../requirement-sets/word/word-api-1-2-requirement-set.md + displayName: Word + - name: WordApi 1.1 requirement set + href: ../../requirement-sets/word/word-api-1-1-requirement-set.md + displayName: Word + - name: Common API requirement sets + items: + - name: Overview + href: ../../requirement-sets/common/office-add-in-requirement-sets.md + - name: Add-in commands requirement sets + href: ../../requirement-sets/common/add-in-commands-requirement-sets.md + - name: Device Permission Service requirement sets + href: >- + ../../requirement-sets/common/device-permission-service-requirement-sets.md + - name: Dialog API requirement sets + href: ../../requirement-sets/common/dialog-api-requirement-sets.md + - name: Dialog Origin requirement sets + href: ../../requirement-sets/common/dialog-origin-requirement-sets.md + - name: Identity API requirement sets + href: ../../requirement-sets/common/identity-api-requirement-sets.md + - name: Image Coercion requirement sets + href: ../../requirement-sets/common/image-coercion-requirement-sets.md + - name: Keyboard Shortcuts requirement sets + href: >- + ../../requirement-sets/common/keyboard-shortcuts-requirement-sets.md + - name: Nested App Auth requirement sets + href: ../../requirement-sets/common/nested-app-auth-requirement-sets.md + - name: Open Browser Window requirement sets + href: >- + ../../requirement-sets/common/open-browser-window-api-requirement-sets.md + - name: Ribbon API requirement sets + href: ../../requirement-sets/common/ribbon-api-requirement-sets.md + - name: Shared Runtime requirement sets + href: ../../requirement-sets/common/shared-runtime-requirement-sets.md diff --git a/docs/docs-ref-autogen/word_1_9/word.yml b/docs/docs-ref-autogen/word_1_9/word.yml new file mode 100644 index 0000000000..ed3b1b45e3 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word.yml @@ -0,0 +1,379 @@ +### YamlMime:TSPackage +uid: word! +name: word +type: package +summary: '' +enums: + - 'word!Word.Alignment:enum' + - 'word!Word.AnnotationState:enum' + - 'word!Word.BodyType:enum' + - 'word!Word.BorderLocation:enum' + - 'word!Word.BorderType:enum' + - 'word!Word.BreakType:enum' + - 'word!Word.BuiltInStyleName:enum' + - 'word!Word.CellPaddingLocation:enum' + - 'word!Word.ChangeTrackingMode:enum' + - 'word!Word.ChangeTrackingState:enum' + - 'word!Word.ChangeTrackingVersion:enum' + - 'word!Word.CloseBehavior:enum' + - 'word!Word.ContentControlAppearance:enum' + - 'word!Word.ContentControlType:enum' + - 'word!Word.CritiqueColorScheme:enum' + - 'word!Word.DocumentPropertyType:enum' + - 'word!Word.ErrorCodes:enum' + - 'word!Word.EventSource:enum' + - 'word!Word.EventType:enum' + - 'word!Word.FieldKind:enum' + - 'word!Word.FieldType:enum' + - 'word!Word.HeaderFooterType:enum' + - 'word!Word.InsertLocation:enum' + - 'word!Word.ListBullet:enum' + - 'word!Word.ListLevelType:enum' + - 'word!Word.ListNumbering:enum' + - 'word!Word.LocationRelation:enum' + - 'word!Word.NoteItemType:enum' + - 'word!Word.OutlineLevel:enum' + - 'word!Word.RangeLocation:enum' + - 'word!Word.SaveBehavior:enum' + - 'word!Word.SelectionMode:enum' + - 'word!Word.StyleType:enum' + - 'word!Word.TrackedChangeType:enum' + - 'word!Word.UnderlineType:enum' + - 'word!Word.VerticalAlignment:enum' +classes: + - 'word!Word.Annotation:class' + - 'word!Word.AnnotationCollection:class' + - 'word!Word.Application:class' + - 'word!Word.Body:class' + - 'word!Word.CheckboxContentControl:class' + - 'word!Word.ComboBoxContentControl:class' + - 'word!Word.Comment:class' + - 'word!Word.CommentCollection:class' + - 'word!Word.CommentContentRange:class' + - 'word!Word.CommentReply:class' + - 'word!Word.CommentReplyCollection:class' + - 'word!Word.ContentControl:class' + - 'word!Word.ContentControlCollection:class' + - 'word!Word.ContentControlListItem:class' + - 'word!Word.ContentControlListItemCollection:class' + - 'word!Word.CritiqueAnnotation:class' + - 'word!Word.CustomProperty:class' + - 'word!Word.CustomPropertyCollection:class' + - 'word!Word.CustomXmlPart:class' + - 'word!Word.CustomXmlPartCollection:class' + - 'word!Word.CustomXmlPartScopedCollection:class' + - 'word!Word.Document:class' + - 'word!Word.DocumentCreated:class' + - 'word!Word.DocumentProperties:class' + - 'word!Word.DropDownListContentControl:class' + - 'word!Word.Field:class' + - 'word!Word.FieldCollection:class' + - 'word!Word.Font:class' + - 'word!Word.InlinePicture:class' + - 'word!Word.InlinePictureCollection:class' + - 'word!Word.List:class' + - 'word!Word.ListCollection:class' + - 'word!Word.ListItem:class' + - 'word!Word.NoteItem:class' + - 'word!Word.NoteItemCollection:class' + - 'word!Word.Paragraph:class' + - 'word!Word.ParagraphCollection:class' + - 'word!Word.ParagraphFormat:class' + - 'word!Word.Range:class' + - 'word!Word.RangeCollection:class' + - 'word!Word.RequestContext:class' + - 'word!Word.SearchOptions:class' + - 'word!Word.Section:class' + - 'word!Word.SectionCollection:class' + - 'word!Word.Setting:class' + - 'word!Word.SettingCollection:class' + - 'word!Word.Shading:class' + - 'word!Word.Style:class' + - 'word!Word.StyleCollection:class' + - 'word!Word.Table:class' + - 'word!Word.TableBorder:class' + - 'word!Word.TableCell:class' + - 'word!Word.TableCellCollection:class' + - 'word!Word.TableCollection:class' + - 'word!Word.TableRow:class' + - 'word!Word.TableRowCollection:class' + - 'word!Word.TableStyle:class' + - 'word!Word.TrackedChange:class' + - 'word!Word.TrackedChangeCollection:class' +interfaces: + - 'word!Word.AnnotationClickedEventArgs:interface' + - 'word!Word.AnnotationHoveredEventArgs:interface' + - 'word!Word.AnnotationInsertedEventArgs:interface' + - 'word!Word.AnnotationPopupActionEventArgs:interface' + - 'word!Word.AnnotationRemovedEventArgs:interface' + - 'word!Word.AnnotationSet:interface' + - 'word!Word.ContentControlAddedEventArgs:interface' + - 'word!Word.ContentControlDataChangedEventArgs:interface' + - 'word!Word.ContentControlDeletedEventArgs:interface' + - 'word!Word.ContentControlEnteredEventArgs:interface' + - 'word!Word.ContentControlExitedEventArgs:interface' + - 'word!Word.ContentControlOptions:interface' + - 'word!Word.ContentControlSelectionChangedEventArgs:interface' + - 'word!Word.Critique:interface' + - 'word!Word.CritiquePopupOptions:interface' + - 'word!Word.GetTextOptions:interface' + - 'word!Word.InsertFileOptions:interface' + - 'word!Word.Interfaces.AnnotationCollectionData:interface' + - 'word!Word.Interfaces.AnnotationCollectionLoadOptions:interface' + - 'word!Word.Interfaces.AnnotationCollectionUpdateData:interface' + - 'word!Word.Interfaces.AnnotationData:interface' + - 'word!Word.Interfaces.AnnotationLoadOptions:interface' + - 'word!Word.Interfaces.BodyData:interface' + - 'word!Word.Interfaces.BodyLoadOptions:interface' + - 'word!Word.Interfaces.BodyUpdateData:interface' + - 'word!Word.Interfaces.BorderCollectionData:interface' + - 'word!Word.Interfaces.BorderCollectionUpdateData:interface' + - 'word!Word.Interfaces.BorderData:interface' + - 'word!Word.Interfaces.BorderUpdateData:interface' + - 'word!Word.Interfaces.CheckboxContentControlData:interface' + - 'word!Word.Interfaces.CheckboxContentControlLoadOptions:interface' + - 'word!Word.Interfaces.CheckboxContentControlUpdateData:interface' + - 'word!Word.Interfaces.CollectionLoadOptions:interface' + - 'word!Word.Interfaces.ComboBoxContentControlData:interface' + - 'word!Word.Interfaces.CommentCollectionData:interface' + - 'word!Word.Interfaces.CommentCollectionLoadOptions:interface' + - 'word!Word.Interfaces.CommentCollectionUpdateData:interface' + - 'word!Word.Interfaces.CommentContentRangeData:interface' + - 'word!Word.Interfaces.CommentContentRangeLoadOptions:interface' + - 'word!Word.Interfaces.CommentContentRangeUpdateData:interface' + - 'word!Word.Interfaces.CommentData:interface' + - 'word!Word.Interfaces.CommentLoadOptions:interface' + - 'word!Word.Interfaces.CommentReplyCollectionData:interface' + - 'word!Word.Interfaces.CommentReplyCollectionLoadOptions:interface' + - 'word!Word.Interfaces.CommentReplyCollectionUpdateData:interface' + - 'word!Word.Interfaces.CommentReplyData:interface' + - 'word!Word.Interfaces.CommentReplyLoadOptions:interface' + - 'word!Word.Interfaces.CommentReplyUpdateData:interface' + - 'word!Word.Interfaces.CommentUpdateData:interface' + - 'word!Word.Interfaces.ContentControlCollectionData:interface' + - 'word!Word.Interfaces.ContentControlCollectionLoadOptions:interface' + - 'word!Word.Interfaces.ContentControlCollectionUpdateData:interface' + - 'word!Word.Interfaces.ContentControlData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionLoadOptions:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' + - 'word!Word.Interfaces.ContentControlListItemData:interface' + - 'word!Word.Interfaces.ContentControlListItemLoadOptions:interface' + - 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' + - 'word!Word.Interfaces.ContentControlLoadOptions:interface' + - 'word!Word.Interfaces.ContentControlUpdateData:interface' + - 'word!Word.Interfaces.CritiqueAnnotationData:interface' + - 'word!Word.Interfaces.CritiqueAnnotationLoadOptions:interface' + - 'word!Word.Interfaces.CustomPropertyCollectionData:interface' + - 'word!Word.Interfaces.CustomPropertyCollectionLoadOptions:interface' + - 'word!Word.Interfaces.CustomPropertyCollectionUpdateData:interface' + - 'word!Word.Interfaces.CustomPropertyData:interface' + - 'word!Word.Interfaces.CustomPropertyLoadOptions:interface' + - 'word!Word.Interfaces.CustomPropertyUpdateData:interface' + - 'word!Word.Interfaces.CustomXmlPartCollectionData:interface' + - 'word!Word.Interfaces.CustomXmlPartCollectionLoadOptions:interface' + - 'word!Word.Interfaces.CustomXmlPartCollectionUpdateData:interface' + - 'word!Word.Interfaces.CustomXmlPartData:interface' + - 'word!Word.Interfaces.CustomXmlPartLoadOptions:interface' + - 'word!Word.Interfaces.CustomXmlPartScopedCollectionData:interface' + - 'word!Word.Interfaces.CustomXmlPartScopedCollectionLoadOptions:interface' + - 'word!Word.Interfaces.CustomXmlPartScopedCollectionUpdateData:interface' + - 'word!Word.Interfaces.DocumentCreatedData:interface' + - 'word!Word.Interfaces.DocumentCreatedLoadOptions:interface' + - 'word!Word.Interfaces.DocumentCreatedUpdateData:interface' + - 'word!Word.Interfaces.DocumentData:interface' + - 'word!Word.Interfaces.DocumentLoadOptions:interface' + - 'word!Word.Interfaces.DocumentPropertiesData:interface' + - 'word!Word.Interfaces.DocumentPropertiesLoadOptions:interface' + - 'word!Word.Interfaces.DocumentPropertiesUpdateData:interface' + - 'word!Word.Interfaces.DocumentUpdateData:interface' + - 'word!Word.Interfaces.DropDownListContentControlData:interface' + - 'word!Word.Interfaces.FieldCollectionData:interface' + - 'word!Word.Interfaces.FieldCollectionLoadOptions:interface' + - 'word!Word.Interfaces.FieldCollectionUpdateData:interface' + - 'word!Word.Interfaces.FieldData:interface' + - 'word!Word.Interfaces.FieldLoadOptions:interface' + - 'word!Word.Interfaces.FieldUpdateData:interface' + - 'word!Word.Interfaces.FontData:interface' + - 'word!Word.Interfaces.FontLoadOptions:interface' + - 'word!Word.Interfaces.FontUpdateData:interface' + - 'word!Word.Interfaces.InlinePictureCollectionData:interface' + - 'word!Word.Interfaces.InlinePictureCollectionLoadOptions:interface' + - 'word!Word.Interfaces.InlinePictureCollectionUpdateData:interface' + - 'word!Word.Interfaces.InlinePictureData:interface' + - 'word!Word.Interfaces.InlinePictureLoadOptions:interface' + - 'word!Word.Interfaces.InlinePictureUpdateData:interface' + - 'word!Word.Interfaces.ListCollectionData:interface' + - 'word!Word.Interfaces.ListCollectionLoadOptions:interface' + - 'word!Word.Interfaces.ListCollectionUpdateData:interface' + - 'word!Word.Interfaces.ListData:interface' + - 'word!Word.Interfaces.ListItemData:interface' + - 'word!Word.Interfaces.ListItemLoadOptions:interface' + - 'word!Word.Interfaces.ListItemUpdateData:interface' + - 'word!Word.Interfaces.ListLevelCollectionData:interface' + - 'word!Word.Interfaces.ListLevelCollectionUpdateData:interface' + - 'word!Word.Interfaces.ListLevelData:interface' + - 'word!Word.Interfaces.ListLevelUpdateData:interface' + - 'word!Word.Interfaces.ListLoadOptions:interface' + - 'word!Word.Interfaces.ListTemplateData:interface' + - 'word!Word.Interfaces.ListTemplateUpdateData:interface' + - 'word!Word.Interfaces.NoteItemCollectionData:interface' + - 'word!Word.Interfaces.NoteItemCollectionLoadOptions:interface' + - 'word!Word.Interfaces.NoteItemCollectionUpdateData:interface' + - 'word!Word.Interfaces.NoteItemData:interface' + - 'word!Word.Interfaces.NoteItemLoadOptions:interface' + - 'word!Word.Interfaces.NoteItemUpdateData:interface' + - 'word!Word.Interfaces.ParagraphCollectionData:interface' + - 'word!Word.Interfaces.ParagraphCollectionLoadOptions:interface' + - 'word!Word.Interfaces.ParagraphCollectionUpdateData:interface' + - 'word!Word.Interfaces.ParagraphData:interface' + - 'word!Word.Interfaces.ParagraphFormatData:interface' + - 'word!Word.Interfaces.ParagraphFormatLoadOptions:interface' + - 'word!Word.Interfaces.ParagraphFormatUpdateData:interface' + - 'word!Word.Interfaces.ParagraphLoadOptions:interface' + - 'word!Word.Interfaces.ParagraphUpdateData:interface' + - 'word!Word.Interfaces.RangeCollectionData:interface' + - 'word!Word.Interfaces.RangeCollectionLoadOptions:interface' + - 'word!Word.Interfaces.RangeCollectionUpdateData:interface' + - 'word!Word.Interfaces.RangeData:interface' + - 'word!Word.Interfaces.RangeLoadOptions:interface' + - 'word!Word.Interfaces.RangeUpdateData:interface' + - 'word!Word.Interfaces.SearchOptionsData:interface' + - 'word!Word.Interfaces.SearchOptionsLoadOptions:interface' + - 'word!Word.Interfaces.SearchOptionsUpdateData:interface' + - 'word!Word.Interfaces.SectionCollectionData:interface' + - 'word!Word.Interfaces.SectionCollectionLoadOptions:interface' + - 'word!Word.Interfaces.SectionCollectionUpdateData:interface' + - 'word!Word.Interfaces.SectionData:interface' + - 'word!Word.Interfaces.SectionLoadOptions:interface' + - 'word!Word.Interfaces.SectionUpdateData:interface' + - 'word!Word.Interfaces.SettingCollectionData:interface' + - 'word!Word.Interfaces.SettingCollectionLoadOptions:interface' + - 'word!Word.Interfaces.SettingCollectionUpdateData:interface' + - 'word!Word.Interfaces.SettingData:interface' + - 'word!Word.Interfaces.SettingLoadOptions:interface' + - 'word!Word.Interfaces.SettingUpdateData:interface' + - 'word!Word.Interfaces.ShadingData:interface' + - 'word!Word.Interfaces.ShadingLoadOptions:interface' + - 'word!Word.Interfaces.ShadingUpdateData:interface' + - 'word!Word.Interfaces.StyleCollectionData:interface' + - 'word!Word.Interfaces.StyleCollectionLoadOptions:interface' + - 'word!Word.Interfaces.StyleCollectionUpdateData:interface' + - 'word!Word.Interfaces.StyleData:interface' + - 'word!Word.Interfaces.StyleLoadOptions:interface' + - 'word!Word.Interfaces.StyleUpdateData:interface' + - 'word!Word.Interfaces.TableBorderData:interface' + - 'word!Word.Interfaces.TableBorderLoadOptions:interface' + - 'word!Word.Interfaces.TableBorderUpdateData:interface' + - 'word!Word.Interfaces.TableCellCollectionData:interface' + - 'word!Word.Interfaces.TableCellCollectionLoadOptions:interface' + - 'word!Word.Interfaces.TableCellCollectionUpdateData:interface' + - 'word!Word.Interfaces.TableCellData:interface' + - 'word!Word.Interfaces.TableCellLoadOptions:interface' + - 'word!Word.Interfaces.TableCellUpdateData:interface' + - 'word!Word.Interfaces.TableCollectionData:interface' + - 'word!Word.Interfaces.TableCollectionLoadOptions:interface' + - 'word!Word.Interfaces.TableCollectionUpdateData:interface' + - 'word!Word.Interfaces.TableData:interface' + - 'word!Word.Interfaces.TableLoadOptions:interface' + - 'word!Word.Interfaces.TableRowCollectionData:interface' + - 'word!Word.Interfaces.TableRowCollectionLoadOptions:interface' + - 'word!Word.Interfaces.TableRowCollectionUpdateData:interface' + - 'word!Word.Interfaces.TableRowData:interface' + - 'word!Word.Interfaces.TableRowLoadOptions:interface' + - 'word!Word.Interfaces.TableRowUpdateData:interface' + - 'word!Word.Interfaces.TableStyleData:interface' + - 'word!Word.Interfaces.TableStyleLoadOptions:interface' + - 'word!Word.Interfaces.TableStyleUpdateData:interface' + - 'word!Word.Interfaces.TableUpdateData:interface' + - 'word!Word.Interfaces.TrackedChangeCollectionData:interface' + - 'word!Word.Interfaces.TrackedChangeCollectionLoadOptions:interface' + - 'word!Word.Interfaces.TrackedChangeCollectionUpdateData:interface' + - 'word!Word.Interfaces.TrackedChangeData:interface' + - 'word!Word.Interfaces.TrackedChangeLoadOptions:interface' + - 'word!Word.ParagraphAddedEventArgs:interface' + - 'word!Word.ParagraphChangedEventArgs:interface' + - 'word!Word.ParagraphDeletedEventArgs:interface' +functions: + - name: 'Word.run(objects, batch)' + uid: 'word!Word.run:function(1)' + package: word! + summary: >- + Executes a batch script that performs actions on the Word object model, using the RequestContext of previously + created API objects. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: >- + export function run(objects: OfficeExtension.ClientObject[], batch: (context: Word.RequestContext) => + Promise): Promise; + parameters: + - id: objects + description: >- + An array of previously created API objects. The array will be validated to make sure that all of the objects + share the same context. The batch will use this shared RequestContext, which means that any changes applied + to these objects will be picked up by `context.sync()`. + type: '[]' + - id: batch + description: >- + A function that takes in a RequestContext and returns a promise (typically, just the result of + `context.sync()`). The context parameter facilitates requests to the Word application. Since the + Office add-in and the Word application run in two different processes, the RequestContext is required to get + access to the Word object model from the add-in. + type: '(context: ) => Promise<T>' + return: + type: Promise<T> + description: '' + - name: 'Word.run(object, batch)' + uid: 'word!Word.run:function(2)' + package: word! + summary: >- + Executes a batch script that performs actions on the Word object model, using the RequestContext of a previously + created API object. When the promise is resolved, any tracked objects that were automatically allocated during + execution will be released. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: >- + export function run(object: OfficeExtension.ClientObject, batch: (context: Word.RequestContext) => + Promise): Promise; + parameters: + - id: object + description: >- + A previously created API object. The batch will use the same RequestContext as the passed-in object, which + means that any changes applied to the object will be picked up by `context.sync()`. + type: '' + - id: batch + description: >- + A function that takes in a RequestContext and returns a promise (typically, just the result of + `context.sync()`). The context parameter facilitates requests to the Word application. Since the + Office add-in and the Word application run in two different processes, the RequestContext is required to get + access to the Word object model from the add-in. + type: '(context: ) => Promise<T>' + return: + type: Promise<T> + description: '' + - name: Word.run(batch) + uid: 'word!Word.run:function(3)' + package: word! + summary: >- + Executes a batch script that performs actions on the Word object model, using a new RequestContext. When the + promise is resolved, any tracked objects that were automatically allocated during execution will be released. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'export function run(batch: (context: Word.RequestContext) => Promise): Promise;' + parameters: + - id: batch + description: >- + A function that takes in a RequestContext and returns a promise (typically, just the result of + `context.sync()`). The context parameter facilitates requests to the Word application. Since the + Office add-in and the Word application run in two different processes, the RequestContext is required to get + access to the Word object model from the add-in. + type: '(context: ) => Promise<T>' + return: + type: Promise<T> + description: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.alignment.yml b/docs/docs-ref-autogen/word_1_9/word/word.alignment.yml new file mode 100644 index 0000000000..a37283b647 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.alignment.yml @@ -0,0 +1,85 @@ +### YamlMime:TSEnum +name: Word.Alignment +uid: 'word!Word.Alignment:enum' +package: word! +fullName: Word.Alignment +summary: '' +remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/paragraph-properties.yaml + + + await Word.run(async (context) => { + const body: Word.Body = context.document.body; + body.clear(); + body.insertParagraph( + "Do you want to create a solution that extends the functionality of Word? You can use the Office Add-ins platform to extend Word clients running on the web, on a Windows desktop, or on a Mac.", + "Start" + ); + body.paragraphs + .getLast() + .insertText( + "Use add-in commands to extend the Word UI and launch task panes that run JavaScript that interacts with the content in a Word document. Any code that you can run in a browser can run in a Word add-in. Add-ins that interact with content in a Word document create requests to act on Word objects and synchronize object state.", + "Replace" + ); + body.paragraphs.getFirst().alignment = "Left"; + body.paragraphs.getLast().alignment = Word.Alignment.left; + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: centered + uid: 'word!Word.Alignment.centered:member' + package: word! + summary: |- + Alignment to the center. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Centered"' + - name: justified + uid: 'word!Word.Alignment.justified:member' + package: word! + summary: |- + Fully justified alignment. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Justified"' + - name: left + uid: 'word!Word.Alignment.left:member' + package: word! + summary: |- + Alignment to the left. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Left"' + - name: mixed + uid: 'word!Word.Alignment.mixed:member' + package: word! + summary: '* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Mixed"' + - name: right + uid: 'word!Word.Alignment.right:member' + package: word! + summary: |- + Alignment to the right. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Right"' + - name: unknown + uid: 'word!Word.Alignment.unknown:member' + package: word! + summary: |- + Unknown alignment. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Unknown"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.annotation.yml b/docs/docs-ref-autogen/word_1_9/word/word.annotation.yml new file mode 100644 index 0000000000..52932abf8d --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.annotation.yml @@ -0,0 +1,369 @@ +### YamlMime:TSType +name: Word.Annotation +uid: 'word!Word.Annotation:class' +package: word! +fullName: Word.Annotation +summary: Represents an annotation attached to a paragraph. +remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Accepts the first annotation found in the selected paragraph. + + await Word.run(async (context) => { + const paragraph: Word.Paragraph = context.document.getSelection().paragraphs.getFirst(); + const annotations: Word.AnnotationCollection = paragraph.getAnnotations(); + annotations.load("id,state,critiqueAnnotation"); + + await context.sync(); + + for (let i = 0; i < annotations.items.length; i++) { + const annotation: Word.Annotation = annotations.items[i]; + + if (annotation.state === Word.AnnotationState.created) { + console.log(`Accepting ID ${annotation.id}...`); + annotation.critiqueAnnotation.accept(); + + await context.sync(); + break; + } + } + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.Annotation#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: critiqueAnnotation + uid: 'word!Word.Annotation#critiqueAnnotation:member' + package: word! + fullName: critiqueAnnotation + summary: Gets the critique annotation object. + remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Gets annotations found in the selected paragraph. + + await Word.run(async (context) => { + const paragraph: Word.Paragraph = context.document.getSelection().paragraphs.getFirst(); + const annotations: Word.AnnotationCollection = paragraph.getAnnotations(); + annotations.load("id,state,critiqueAnnotation"); + + await context.sync(); + + console.log("Annotations found:"); + + for (let i = 0; i < annotations.items.length; i++) { + const annotation: Word.Annotation = annotations.items[i]; + + console.log(`ID ${annotation.id} - state '${annotation.state}':`, annotation.critiqueAnnotation.critique); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly critiqueAnnotation: Word.CritiqueAnnotation;' + return: + type: '' + - name: id + uid: 'word!Word.Annotation#id:member' + package: word! + fullName: id + summary: 'Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects.' + remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Accepts the first annotation found in the selected paragraph. + + await Word.run(async (context) => { + const paragraph: Word.Paragraph = context.document.getSelection().paragraphs.getFirst(); + const annotations: Word.AnnotationCollection = paragraph.getAnnotations(); + annotations.load("id,state,critiqueAnnotation"); + + await context.sync(); + + for (let i = 0; i < annotations.items.length; i++) { + const annotation: Word.Annotation = annotations.items[i]; + + if (annotation.state === Word.AnnotationState.created) { + console.log(`Accepting ID ${annotation.id}...`); + annotation.critiqueAnnotation.accept(); + + await context.sync(); + break; + } + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly id: string;' + return: + type: string + - name: state + uid: 'word!Word.Annotation#state:member' + package: word! + fullName: state + summary: Gets the state of the annotation. + remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Rejects the last annotation found in the selected paragraph. + + await Word.run(async (context) => { + const paragraph: Word.Paragraph = context.document.getSelection().paragraphs.getFirst(); + const annotations: Word.AnnotationCollection = paragraph.getAnnotations(); + annotations.load("id,state,critiqueAnnotation"); + + await context.sync(); + + for (let i = annotations.items.length - 1; i >= 0; i--) { + const annotation: Word.Annotation = annotations.items[i]; + + if (annotation.state === Word.AnnotationState.created) { + console.log(`Rejecting ID ${annotation.id}...`); + annotation.critiqueAnnotation.reject(); + + await context.sync(); + break; + } + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly state: Word.AnnotationState | "Created" | "Accepted" | "Rejected";' + return: + type: ' | "Created" | "Accepted" | "Rejected"' +methods: + - name: delete() + uid: 'word!Word.Annotation#delete:member(1)' + package: word! + fullName: delete() + summary: Deletes the annotation. + remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Deletes all annotations found in the selected paragraph. + + await Word.run(async (context) => { + const paragraph: Word.Paragraph = context.document.getSelection().paragraphs.getFirst(); + const annotations: Word.AnnotationCollection = paragraph.getAnnotations(); + annotations.load("id"); + + await context.sync(); + + const ids = []; + for (let i = 0; i < annotations.items.length; i++) { + const annotation: Word.Annotation = annotations.items[i]; + + ids.push(annotation.id); + annotation.delete(); + } + + await context.sync(); + + console.log("Annotations deleted:", ids); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'delete(): void;' + return: + type: void + description: '' + - name: load(options) + uid: 'word!Word.Annotation#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.AnnotationLoadOptions): Word.Annotation;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.Annotation#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.Annotation;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.Annotation#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Annotation; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.Annotation#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is + passed to it.) Whereas the original `Word.Annotation` object is an API object, the `toJSON` method returns a plain + JavaScript object (typed as `Word.Interfaces.AnnotationData`) that contains shallow copies of any loaded + child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.AnnotationData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.Annotation#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.Annotation;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.Annotation#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.Annotation;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.annotationclickedeventargs.yml b/docs/docs-ref-autogen/word_1_9/word/word.annotationclickedeventargs.yml new file mode 100644 index 0000000000..0b5a8c21ab --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.annotationclickedeventargs.yml @@ -0,0 +1,68 @@ +### YamlMime:TSType +name: Word.AnnotationClickedEventArgs +uid: 'word!Word.AnnotationClickedEventArgs:interface' +package: word! +fullName: Word.AnnotationClickedEventArgs +summary: Holds annotation information that is passed back on annotation inserted event. +remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Registers event handlers. + + await Word.run(async (context) => { + eventContexts[0] = context.document.onParagraphAdded.add(paragraphChanged); + eventContexts[1] = context.document.onParagraphChanged.add(paragraphChanged); + + eventContexts[2] = context.document.onAnnotationClicked.add(onClickedHandler); + eventContexts[3] = context.document.onAnnotationHovered.add(onHoveredHandler); + eventContexts[4] = context.document.onAnnotationInserted.add(onInsertedHandler); + eventContexts[5] = context.document.onAnnotationRemoved.add(onRemovedHandler); + eventContexts[6] = context.document.onAnnotationPopupAction.add(onPopupActionHandler); + + await context.sync(); + + console.log("Event handlers registered."); + }); + + + ... + + + async function onClickedHandler(args: Word.AnnotationClickedEventArgs) { + await Word.run(async (context) => { + const annotation: Word.Annotation = context.document.getAnnotationById(args.id); + annotation.load("critiqueAnnotation"); + + await context.sync(); + + console.log(`AnnotationClicked: ID ${args.id}:`, annotation.critiqueAnnotation.critique); + }); + } + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: id + uid: 'word!Word.AnnotationClickedEventArgs#id:member' + package: word! + fullName: id + summary: Specifies the annotation ID for which the event was fired. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'id: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/word_1_9/word/word.annotationcollection.yml b/docs/docs-ref-autogen/word_1_9/word/word.annotationcollection.yml new file mode 100644 index 0000000000..d471be3465 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.annotationcollection.yml @@ -0,0 +1,218 @@ +### YamlMime:TSType +name: Word.AnnotationCollection +uid: 'word!Word.AnnotationCollection:class' +package: word! +fullName: Word.AnnotationCollection +summary: 'Contains a collection of [Word.Annotation](xref:word!Word.Annotation:class) objects.' +remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Gets annotations found in the selected paragraph. + + await Word.run(async (context) => { + const paragraph: Word.Paragraph = context.document.getSelection().paragraphs.getFirst(); + const annotations: Word.AnnotationCollection = paragraph.getAnnotations(); + annotations.load("id,state,critiqueAnnotation"); + + await context.sync(); + + console.log("Annotations found:"); + + for (let i = 0; i < annotations.items.length; i++) { + const annotation: Word.Annotation = annotations.items[i]; + + console.log(`ID ${annotation.id} - state '${annotation.state}':`, annotation.critiqueAnnotation.critique); + } + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.AnnotationCollection#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: items + uid: 'word!Word.AnnotationCollection#items:member' + package: word! + fullName: items + summary: Gets the loaded child items in this collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly items: Word.Annotation[];' + return: + type: '[]' +methods: + - name: getFirst() + uid: 'word!Word.AnnotationCollection#getFirst:member(1)' + package: word! + fullName: getFirst() + summary: Gets the first annotation in this collection. Throws an `ItemNotFound` error if this collection is empty. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFirst(): Word.Annotation;' + return: + type: '' + description: '' + - name: getFirstOrNullObject() + uid: 'word!Word.AnnotationCollection#getFirstOrNullObject:member(1)' + package: word! + fullName: getFirstOrNullObject() + summary: >- + Gets the first annotation in this collection. If this collection is empty, then this method will return an object + with its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFirstOrNullObject(): Word.Annotation;' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.AnnotationCollection#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: >- + load(options?: Word.Interfaces.AnnotationCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): + Word.AnnotationCollection; + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: >- + & + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.AnnotationCollection#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.AnnotationCollection;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.AnnotationCollection#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.AnnotationCollection;' + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: '' + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.AnnotationCollection#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.AnnotationCollection` object is an API object, the `toJSON` method + returns a plain JavaScript object (typed as `Word.Interfaces.AnnotationCollectionData`) that contains an + "items" array with shallow copies of any loaded properties from the collection's items. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.AnnotationCollectionData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.AnnotationCollection#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.AnnotationCollection;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.AnnotationCollection#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.AnnotationCollection;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.annotationhoveredeventargs.yml b/docs/docs-ref-autogen/word_1_9/word/word.annotationhoveredeventargs.yml new file mode 100644 index 0000000000..93d87db1a9 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.annotationhoveredeventargs.yml @@ -0,0 +1,68 @@ +### YamlMime:TSType +name: Word.AnnotationHoveredEventArgs +uid: 'word!Word.AnnotationHoveredEventArgs:interface' +package: word! +fullName: Word.AnnotationHoveredEventArgs +summary: Holds annotation information that is passed back on annotation hovered event. +remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Registers event handlers. + + await Word.run(async (context) => { + eventContexts[0] = context.document.onParagraphAdded.add(paragraphChanged); + eventContexts[1] = context.document.onParagraphChanged.add(paragraphChanged); + + eventContexts[2] = context.document.onAnnotationClicked.add(onClickedHandler); + eventContexts[3] = context.document.onAnnotationHovered.add(onHoveredHandler); + eventContexts[4] = context.document.onAnnotationInserted.add(onInsertedHandler); + eventContexts[5] = context.document.onAnnotationRemoved.add(onRemovedHandler); + eventContexts[6] = context.document.onAnnotationPopupAction.add(onPopupActionHandler); + + await context.sync(); + + console.log("Event handlers registered."); + }); + + + ... + + + async function onHoveredHandler(args: Word.AnnotationHoveredEventArgs) { + await Word.run(async (context) => { + const annotation: Word.Annotation = context.document.getAnnotationById(args.id); + annotation.load("critiqueAnnotation"); + + await context.sync(); + + console.log(`AnnotationHovered: ID ${args.id}:`, annotation.critiqueAnnotation.critique); + }); + } + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: id + uid: 'word!Word.AnnotationHoveredEventArgs#id:member' + package: word! + fullName: id + summary: Specifies the annotation ID for which the event was fired. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'id: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/word_1_9/word/word.annotationinsertedeventargs.yml b/docs/docs-ref-autogen/word_1_9/word/word.annotationinsertedeventargs.yml new file mode 100644 index 0000000000..5759d8a891 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.annotationinsertedeventargs.yml @@ -0,0 +1,75 @@ +### YamlMime:TSType +name: Word.AnnotationInsertedEventArgs +uid: 'word!Word.AnnotationInsertedEventArgs:interface' +package: word! +fullName: Word.AnnotationInsertedEventArgs +summary: Holds annotation information that is passed back on annotation added event. +remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Registers event handlers. + + await Word.run(async (context) => { + eventContexts[0] = context.document.onParagraphAdded.add(paragraphChanged); + eventContexts[1] = context.document.onParagraphChanged.add(paragraphChanged); + + eventContexts[2] = context.document.onAnnotationClicked.add(onClickedHandler); + eventContexts[3] = context.document.onAnnotationHovered.add(onHoveredHandler); + eventContexts[4] = context.document.onAnnotationInserted.add(onInsertedHandler); + eventContexts[5] = context.document.onAnnotationRemoved.add(onRemovedHandler); + eventContexts[6] = context.document.onAnnotationPopupAction.add(onPopupActionHandler); + + await context.sync(); + + console.log("Event handlers registered."); + }); + + + ... + + + async function onInsertedHandler(args: Word.AnnotationInsertedEventArgs) { + await Word.run(async (context) => { + const annotations = []; + for (let i = 0; i < args.ids.length; i++) { + let annotation: Word.Annotation = context.document.getAnnotationById(args.ids[i]); + annotation.load("id,critiqueAnnotation"); + + annotations.push(annotation); + } + + await context.sync(); + + for (let annotation of annotations) { + console.log(`AnnotationInserted: ID ${annotation.id}:`, annotation.critiqueAnnotation.critique); + } + }); + } + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: ids + uid: 'word!Word.AnnotationInsertedEventArgs#ids:member' + package: word! + fullName: ids + summary: Specifies the annotation IDs for which the event was fired. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'ids: string[];' + return: + type: 'string[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.annotationpopupactioneventargs.yml b/docs/docs-ref-autogen/word_1_9/word/word.annotationpopupactioneventargs.yml new file mode 100644 index 0000000000..fd91a89369 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.annotationpopupactioneventargs.yml @@ -0,0 +1,94 @@ +### YamlMime:TSType +name: Word.AnnotationPopupActionEventArgs +uid: 'word!Word.AnnotationPopupActionEventArgs:interface' +package: word! +fullName: Word.AnnotationPopupActionEventArgs +summary: Represents action information that's passed back on annotation pop-up action event. +remarks: >- + \[ [API set: WordApi 1.8](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Registers event handlers. + + await Word.run(async (context) => { + eventContexts[0] = context.document.onParagraphAdded.add(paragraphChanged); + eventContexts[1] = context.document.onParagraphChanged.add(paragraphChanged); + + eventContexts[2] = context.document.onAnnotationClicked.add(onClickedHandler); + eventContexts[3] = context.document.onAnnotationHovered.add(onHoveredHandler); + eventContexts[4] = context.document.onAnnotationInserted.add(onInsertedHandler); + eventContexts[5] = context.document.onAnnotationRemoved.add(onRemovedHandler); + eventContexts[6] = context.document.onAnnotationPopupAction.add(onPopupActionHandler); + + await context.sync(); + + console.log("Event handlers registered."); + }); + + + ... + + + async function onPopupActionHandler(args: Word.AnnotationPopupActionEventArgs) { + await Word.run(async (context) => { + let message = `AnnotationPopupAction: ID ${args.id} = `; + if (args.action === "Accept") { + message += `Accepted: ${args.critiqueSuggestion}`; + } else { + message += "Rejected"; + } + + console.log(message); + }); + } + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: action + uid: 'word!Word.AnnotationPopupActionEventArgs#action:member' + package: word! + fullName: action + summary: Specifies the chosen action in the pop-up menu. + remarks: '\[ [API set: WordApi 1.8](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'action: string;' + return: + type: string + - name: critiqueSuggestion + uid: 'word!Word.AnnotationPopupActionEventArgs#critiqueSuggestion:member' + package: word! + fullName: critiqueSuggestion + summary: Specifies the accepted suggestion (only populated when accepting a critique suggestion). + remarks: '\[ [API set: WordApi 1.8](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'critiqueSuggestion: string;' + return: + type: string + - name: id + uid: 'word!Word.AnnotationPopupActionEventArgs#id:member' + package: word! + fullName: id + summary: Specifies the annotation ID for which the event was fired. + remarks: '\[ [API set: WordApi 1.8](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'id: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/word_1_9/word/word.annotationremovedeventargs.yml b/docs/docs-ref-autogen/word_1_9/word/word.annotationremovedeventargs.yml new file mode 100644 index 0000000000..c8ae66f729 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.annotationremovedeventargs.yml @@ -0,0 +1,65 @@ +### YamlMime:TSType +name: Word.AnnotationRemovedEventArgs +uid: 'word!Word.AnnotationRemovedEventArgs:interface' +package: word! +fullName: Word.AnnotationRemovedEventArgs +summary: Holds annotation information that is passed back on annotation removed event. +remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Registers event handlers. + + await Word.run(async (context) => { + eventContexts[0] = context.document.onParagraphAdded.add(paragraphChanged); + eventContexts[1] = context.document.onParagraphChanged.add(paragraphChanged); + + eventContexts[2] = context.document.onAnnotationClicked.add(onClickedHandler); + eventContexts[3] = context.document.onAnnotationHovered.add(onHoveredHandler); + eventContexts[4] = context.document.onAnnotationInserted.add(onInsertedHandler); + eventContexts[5] = context.document.onAnnotationRemoved.add(onRemovedHandler); + eventContexts[6] = context.document.onAnnotationPopupAction.add(onPopupActionHandler); + + await context.sync(); + + console.log("Event handlers registered."); + }); + + + ... + + + async function onRemovedHandler(args: Word.AnnotationRemovedEventArgs) { + await Word.run(async (context) => { + for (let id of args.ids) { + console.log(`AnnotationRemoved: ID ${id}`); + } + }); + } + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: ids + uid: 'word!Word.AnnotationRemovedEventArgs#ids:member' + package: word! + fullName: ids + summary: Specifies the annotation IDs for which the event was fired. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'ids: string[];' + return: + type: 'string[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.annotationset.yml b/docs/docs-ref-autogen/word_1_9/word/word.annotationset.yml new file mode 100644 index 0000000000..31a3fa75a7 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.annotationset.yml @@ -0,0 +1,87 @@ +### YamlMime:TSType +name: Word.AnnotationSet +uid: 'word!Word.AnnotationSet:interface' +package: word! +fullName: Word.AnnotationSet +summary: Annotations set produced by the add-in. Currently supporting only critiques. +remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Adds annotations to the selected paragraph. + + await Word.run(async (context) => { + const paragraph: Word.Paragraph = context.document.getSelection().paragraphs.getFirst(); + const options: Word.CritiquePopupOptions = { + brandingTextResourceId: "PG.TabLabel", + subtitleResourceId: "PG.HelpCommand.TipTitle", + titleResourceId: "PG.HelpCommand.Label", + suggestions: ["suggestion 1", "suggestion 2", "suggestion 3"] + }; + const critique1: Word.Critique = { + colorScheme: Word.CritiqueColorScheme.red, + start: 1, + length: 3, + popupOptions: options + }; + const critique2: Word.Critique = { + colorScheme: Word.CritiqueColorScheme.green, + start: 6, + length: 1, + popupOptions: options + }; + const critique3: Word.Critique = { + colorScheme: Word.CritiqueColorScheme.blue, + start: 10, + length: 3, + popupOptions: options + }; + const critique4: Word.Critique = { + colorScheme: Word.CritiqueColorScheme.lavender, + start: 14, + length: 3, + popupOptions: options + }; + const critique5: Word.Critique = { + colorScheme: Word.CritiqueColorScheme.berry, + start: 18, + length: 10, + popupOptions: options + }; + const annotationSet: Word.AnnotationSet = { + critiques: [critique1, critique2, critique3, critique4, critique5] + }; + + const annotationIds = paragraph.insertAnnotations(annotationSet); + + await context.sync(); + + console.log("Annotations inserted:", annotationIds.value); + }); + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: critiques + uid: 'word!Word.AnnotationSet#critiques:member' + package: word! + fullName: critiques + summary: Critiques. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'critiques: Word.Critique[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.annotationstate.yml b/docs/docs-ref-autogen/word_1_9/word/word.annotationstate.yml new file mode 100644 index 0000000000..53b7575571 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.annotationstate.yml @@ -0,0 +1,69 @@ +### YamlMime:TSEnum +name: Word.AnnotationState +uid: 'word!Word.AnnotationState:enum' +package: word! +fullName: Word.AnnotationState +summary: Represents the state of the annotation. +remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Accepts the first annotation found in the selected paragraph. + + await Word.run(async (context) => { + const paragraph: Word.Paragraph = context.document.getSelection().paragraphs.getFirst(); + const annotations: Word.AnnotationCollection = paragraph.getAnnotations(); + annotations.load("id,state,critiqueAnnotation"); + + await context.sync(); + + for (let i = 0; i < annotations.items.length; i++) { + const annotation: Word.Annotation = annotations.items[i]; + + if (annotation.state === Word.AnnotationState.created) { + console.log(`Accepting ID ${annotation.id}...`); + annotation.critiqueAnnotation.accept(); + + await context.sync(); + break; + } + } + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: accepted + uid: 'word!Word.AnnotationState.accepted:member' + package: word! + summary: |- + Accepted. + + * \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Accepted"' + - name: created + uid: 'word!Word.AnnotationState.created:member' + package: word! + summary: |- + Created. + + * \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Created"' + - name: rejected + uid: 'word!Word.AnnotationState.rejected:member' + package: word! + summary: |- + Rejected. + + * \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Rejected"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.application.yml b/docs/docs-ref-autogen/word_1_9/word/word.application.yml new file mode 100644 index 0000000000..6609949dc8 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.application.yml @@ -0,0 +1,218 @@ +### YamlMime:TSType +name: Word.Application +uid: 'word!Word.Application:class' +package: word! +fullName: Word.Application +summary: Represents the application object. +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/insert-external-document.yaml + + + // Updates the text of the current document with the text from another document passed in as a Base64-encoded string. + + await Word.run(async (context) => { + // Use the Base64-encoded string representation of the selected .docx file. + const externalDoc: Word.DocumentCreated = context.application.createDocument(externalDocument); + await context.sync(); + + const externalDocBody: Word.Body = externalDoc.body; + externalDocBody.load("text"); + await context.sync(); + + // Insert the external document's text at the beginning of the current document's body. + const externalDocBodyText = externalDocBody.text; + const currentDocBody: Word.Body = context.document.body; + currentDocBody.insertText(externalDocBodyText, Word.InsertLocation.start); + await context.sync(); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.Application#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' +methods: + - name: createDocument(base64File) + uid: 'word!Word.Application#createDocument:member(1)' + package: word! + fullName: createDocument(base64File) + summary: Creates a new document by using an optional Base64-encoded .docx file. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/insert-external-document.yaml + + + // Updates the text of the current document with the text from another document passed in as a Base64-encoded + string. + + await Word.run(async (context) => { + // Use the Base64-encoded string representation of the selected .docx file. + const externalDoc: Word.DocumentCreated = context.application.createDocument(externalDocument); + await context.sync(); + + const externalDocBody: Word.Body = externalDoc.body; + externalDocBody.load("text"); + await context.sync(); + + // Insert the external document's text at the beginning of the current document's body. + const externalDocBodyText = externalDocBody.text; + const currentDocBody: Word.Body = context.document.body; + currentDocBody.insertText(externalDocBodyText, Word.InsertLocation.start); + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'createDocument(base64File?: string): Word.DocumentCreated;' + parameters: + - id: base64File + description: Optional. The Base64-encoded .docx file. The default value is null. + type: string + return: + type: '' + description: '' + - name: newObject(context) + uid: 'word!Word.Application.newObject:member(1)' + package: word! + fullName: newObject(context) + summary: Create a new instance of the `Word.Application` object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'static newObject(context: OfficeExtension.ClientRequestContext): Word.Application;' + parameters: + - id: context + description: '' + type: '' + return: + type: '' + description: '' + - name: openDocument(filePath) + uid: 'word!Word.Application#openDocument:member(1)' + package: word! + fullName: openDocument(filePath) + summary: >- + Opens a document and displays it in a new tab or window. The following are examples for the various supported + clients and platforms. + + + - Remote or cloud location example: `https://microsoft.sharepoint.com/some/path/Document.docx` + + + - Local location examples for Windows: `C:\\Users\\Someone\\Documents\\Document.docx` (includes required escaped + backslashes), `file://mycomputer/myfolder/Document.docx` + + + - Local location example for Mac and iOS: `/User/someone/document.docx` + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'openDocument(filePath: string): void;' + parameters: + - id: filePath + description: >- + Required. The absolute path of the .docx file. Word on the web only supports remote (cloud) locations, while + Word on Windows, on Mac, and on iOS support local and remote locations. + type: string + return: + type: void + description: '' + - name: retrieveStylesFromBase64(base64File) + uid: 'word!Word.Application#retrieveStylesFromBase64:member(1)' + package: word! + fullName: retrieveStylesFromBase64(base64File) + summary: Parse styles from template Base64 file and return JSON format of retrieved styles as a string. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/get-external-styles.yaml + + + // Gets style info from another document passed in as a Base64-encoded string. + + await Word.run(async (context) => { + const retrievedStyles = context.application.retrieveStylesFromBase64(externalDocument); + await context.sync(); + + console.log("Styles from the other document:", retrievedStyles.value); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'retrieveStylesFromBase64(base64File: string): OfficeExtension.ClientResult;' + parameters: + - id: base64File + description: Required. The template file. + type: string + return: + type: '<string>' + description: '' + - name: toJSON() + uid: 'word!Word.Application#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.Application` object is an API object, the `toJSON` method returns a + plain JavaScript object (typed as `Word.Interfaces.ApplicationData`) that contains shallow copies of any + loaded child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + toJSON(): { + [key: string]: string; + }; + return: + type: |- + { + [key: string]: string; + } + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.body.yml b/docs/docs-ref-autogen/word_1_9/word/word.body.yml new file mode 100644 index 0000000000..f47a299085 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.body.yml @@ -0,0 +1,1809 @@ +### YamlMime:TSType +name: Word.Body +uid: 'word!Word.Body:class' +package: word! +fullName: Word.Body +summary: Represents the body of a document or a section. +remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Get the body object and read its font size. + await Word.run(async (context) => { + // Create a proxy object for the document body. + const body = context.document.body; + body.load("font/size"); + + await context.sync(); + + console.log("Font size: " + body.font.size); + }); + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: contentControls + uid: 'word!Word.Body#contentControls:member' + package: word! + fullName: contentControls + summary: Gets the collection of rich text content control objects in the body. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly contentControls: Word.ContentControlCollection;' + return: + type: '' + - name: context + uid: 'word!Word.Body#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: endnotes + uid: 'word!Word.Body#endnotes:member' + package: word! + fullName: endnotes + summary: Gets the collection of endnotes in the body. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly endnotes: Word.NoteItemCollection;' + return: + type: '' + - name: fields + uid: 'word!Word.Body#fields:member' + package: word! + fullName: fields + summary: Gets the collection of field objects in the body. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-fields.yaml + + + // Gets all fields in the document body. + + await Word.run(async (context) => { + const fields: Word.FieldCollection = context.document.body.fields.load("items"); + + await context.sync(); + + if (fields.items.length === 0) { + console.log("No fields in this document."); + } else { + fields.load(["code", "result"]); + await context.sync(); + + for (let i = 0; i < fields.items.length; i++) { + console.log(`Field ${i + 1}'s code: ${fields.items[i].code}`, `Field ${i + 1}'s result: ${JSON.stringify(fields.items[i].result)}`); + } + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly fields: Word.FieldCollection;' + return: + type: '' + - name: font + uid: 'word!Word.Body#font:member' + package: word! + fullName: font + summary: 'Gets the text format of the body. Use this to get and set font name, size, color and other properties.' + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-body.yaml + + + // Gets the style and the font size, font name, and font color properties on the body object. + + // Run a batch operation against the Word object model. + + await Word.run(async (context) => { + // Create a proxy object for the document body. + const body: Word.Body = context.document.body; + + // Queue a command to load font and style information for the document body. + body.load("font/size, font/name, font/color, style"); + + // Synchronize the document state by executing the queued commands, and return a promise to indicate task completion. + await context.sync(); + + // Show font-related property values on the body object. + const results = + "Font size: " + + body.font.size + + "; Font name: " + + body.font.name + + "; Font color: " + + body.font.color + + "; Body style: " + + body.style; + + console.log(results); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly font: Word.Font;' + return: + type: '' + - name: footnotes + uid: 'word!Word.Body#footnotes:member' + package: word! + fullName: footnotes + summary: Gets the collection of footnotes in the body. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-footnotes.yaml + + + // Gets the footnotes in the document body. + + await Word.run(async (context) => { + const footnotes: Word.NoteItemCollection = context.document.body.footnotes; + footnotes.load("length"); + await context.sync(); + + console.log("Number of footnotes in the document body: " + footnotes.items.length); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly footnotes: Word.NoteItemCollection;' + return: + type: '' + - name: inlinePictures + uid: 'word!Word.Body#inlinePictures:member' + package: word! + fullName: inlinePictures + summary: Gets the collection of InlinePicture objects in the body. The collection doesn't include floating images. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/15-images/insert-and-get-pictures.yaml + + + // Gets the first image in the document. + + await Word.run(async (context) => { + const firstPicture: Word.InlinePicture = context.document.body.inlinePictures.getFirst(); + firstPicture.load("width, height, imageFormat"); + + await context.sync(); + console.log(`Image dimensions: ${firstPicture.width} x ${firstPicture.height}`, `Image format: ${firstPicture.imageFormat}`); + // Get the image encoded as Base64. + const base64 = firstPicture.getBase64ImageSrc(); + + await context.sync(); + console.log(base64.value); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly inlinePictures: Word.InlinePictureCollection;' + return: + type: '' + - name: lists + uid: 'word!Word.Body#lists:member' + package: word! + fullName: lists + summary: Gets the collection of list objects in the body. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/20-lists/organize-list.yaml + + + // Gets information about the first list in the document. + + await Word.run(async (context) => { + const lists: Word.ListCollection = context.document.body.lists; + lists.load("items"); + + await context.sync(); + + if (lists.items.length === 0) { + console.warn("There are no lists in this document."); + return; + } + + // Get the first list. + const list: Word.List = lists.getFirst(); + list.load("levelTypes,levelExistences"); + + await context.sync(); + + const levelTypes = list.levelTypes; + console.log("Level types of the first list:"); + for (let i = 0; i < levelTypes.length; i++) { + console.log(`- Level ${i + 1} (index ${i}): ${levelTypes[i]}`); + } + + const levelExistences = list.levelExistences; + console.log("Level existences of the first list:"); + for (let i = 0; i < levelExistences.length; i++) { + console.log(`- Level ${i + 1} (index ${i}): ${levelExistences[i]}`); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly lists: Word.ListCollection;' + return: + type: '' + - name: paragraphs + uid: 'word!Word.Body#paragraphs:member' + package: word! + fullName: paragraphs + summary: Gets the collection of paragraph objects in the body. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Important: Paragraphs in tables aren't returned for requirement sets 1.1 and 1.2. From requirement set 1.3, + paragraphs in tables are also returned. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/get-word-count.yaml + + + // Counts how many times each term appears in the document. + + await Word.run(async (context) => { + const paragraphs: Word.ParagraphCollection = context.document.body.paragraphs; + paragraphs.load("text"); + await context.sync(); + + // Split up the document text using existing spaces as the delimiter. + let text = []; + paragraphs.items.forEach((item) => { + let paragraph = item.text.trim(); + if (paragraph) { + paragraph.split(" ").forEach((term) => { + let currentTerm = term.trim(); + if (currentTerm) { + text.push(currentTerm); + } + }); + } + }); + + // Determine the list of unique terms. + let makeTextDistinct = new Set(text); + let distinctText = Array.from(makeTextDistinct); + let allSearchResults = []; + + for (let i = 0; i < distinctText.length; i++) { + let results = context.document.body.search(distinctText[i], { matchCase: true, matchWholeWord: true }); + results.load("text"); + + // Map each search term with its results. + let correlatedResults = { + searchTerm: distinctText[i], + hits: results + }; + + allSearchResults.push(correlatedResults); + } + + await context.sync(); + + // Display the count for each search term. + allSearchResults.forEach((result) => { + let length = result.hits.items.length; + + console.log("Search term: " + result.searchTerm + " => Count: " + length); + }); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly paragraphs: Word.ParagraphCollection;' + return: + type: '' + - name: parentBody + uid: 'word!Word.Body#parentBody:member' + package: word! + fullName: parentBody + summary: >- + Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws an + `ItemNotFound` error if there isn't a parent body. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentBody: Word.Body;' + return: + type: '' + - name: parentBodyOrNullObject + uid: 'word!Word.Body#parentBodyOrNullObject:member' + package: word! + fullName: parentBodyOrNullObject + summary: >- + Gets the parent body of the body. For example, a table cell body's parent body could be a header. If there isn't a + parent body, then this method will return an object with its `isNullObject` property set to `true`. For + further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentBodyOrNullObject: Word.Body;' + return: + type: '' + - name: parentContentControl + uid: 'word!Word.Body#parentContentControl:member' + package: word! + fullName: parentContentControl + summary: >- + Gets the content control that contains the body. Throws an `ItemNotFound` error if there isn't a parent content + control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentContentControl: Word.ContentControl;' + return: + type: '' + - name: parentContentControlOrNullObject + uid: 'word!Word.Body#parentContentControlOrNullObject:member' + package: word! + fullName: parentContentControlOrNullObject + summary: >- + Gets the content control that contains the body. If there isn't a parent content control, then this method will + return an object with its `isNullObject` property set to `true`. For further information, see + [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentContentControlOrNullObject: Word.ContentControl;' + return: + type: '' + - name: parentSection + uid: 'word!Word.Body#parentSection:member' + package: word! + fullName: parentSection + summary: Gets the parent section of the body. Throws an `ItemNotFound` error if there isn't a parent section. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentSection: Word.Section;' + return: + type: '' + - name: parentSectionOrNullObject + uid: 'word!Word.Body#parentSectionOrNullObject:member' + package: word! + fullName: parentSectionOrNullObject + summary: >- + Gets the parent section of the body. If there isn't a parent section, then this method will return an object with + its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentSectionOrNullObject: Word.Section;' + return: + type: '' + - name: style + uid: 'word!Word.Body#style:member' + package: word! + fullName: style + summary: >- + Specifies the style name for the body. Use this property for custom styles and localized style names. To use the + built-in styles that are portable between locales, see the "styleBuiltIn" property. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'style: string;' + return: + type: string + - name: styleBuiltIn + uid: 'word!Word.Body#styleBuiltIn:member' + package: word! + fullName: styleBuiltIn + summary: >- + Specifies the built-in style name for the body. Use this property for built-in styles that are portable between + locales. To use custom styles or localized style names, see the "style" property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | + "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | + "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | + "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | + "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | + "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | + "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" + | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" + | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" + | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | + "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" + | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | + "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | + "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | + "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | + "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" + | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | + "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | + "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | + "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | + "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | + "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | + "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | + "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + return: + type: >- + | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | + "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | + "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | + "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | + "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | + "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | + "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | + "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | + "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | + "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | + "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | + "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | + "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" + | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" + | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | + "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | + "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | + "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | + "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | + "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | + "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | + "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | + "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | + "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | + "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6" + - name: tables + uid: 'word!Word.Body#tables:member' + package: word! + fullName: tables + summary: Gets the collection of table objects in the body. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/table-cell-access.yaml + + + // Gets the content of the first cell in the first table. + + await Word.run(async (context) => { + const firstCell: Word.Body = context.document.body.tables.getFirst().getCell(0, 0).body; + firstCell.load("text"); + + await context.sync(); + console.log("First cell's text is: " + firstCell.text); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly tables: Word.TableCollection;' + return: + type: '' + - name: text + uid: 'word!Word.Body#text:member' + package: word! + fullName: text + summary: Gets the text of the body. Use the insertText method to insert text. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-body.yaml + + + // Gets the text content of the body. + + // Run a batch operation against the Word object model. + + await Word.run(async (context) => { + // Create a proxy object for the document body. + const body: Word.Body = context.document.body; + + // Queue a command to load the text in document body. + body.load("text"); + + // Synchronize the document state by executing the queued commands, and return a promise to indicate task completion. + await context.sync(); + + console.log("Body contents (text): " + body.text); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly text: string;' + return: + type: string + - name: type + uid: 'word!Word.Body#type:member' + package: word! + fullName: type + summary: >- + Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional + types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordAPIOnline 1.1 and later. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-footnotes.yaml + + + // Gets the referenced note's item type and body type, which are both "Footnote". + + await Word.run(async (context) => { + const footnotes: Word.NoteItemCollection = context.document.body.footnotes; + footnotes.load("items"); + await context.sync(); + + const referenceNumber = $("#input-reference").val(); + const mark = (referenceNumber as number) - 1; + const item: Word.NoteItem = footnotes.items[mark]; + console.log(`Note type of footnote ${referenceNumber}: ${item.type}`); + + item.body.load("type"); + await context.sync(); + + console.log(`Body type of note: ${item.body.type}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + readonly type: Word.BodyType | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell" | + "Footnote" | "Endnote" | "NoteItem"; + return: + type: >- + | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell" + | "Footnote" | "Endnote" | "NoteItem" +methods: + - name: clear() + uid: 'word!Word.Body#clear:member(1)' + package: word! + fullName: clear() + summary: Clears the contents of the body object. The user can perform the undo operation on the cleared content. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-body.yaml + + + // Clears out the content from the document body. + + // Run a batch operation against the Word object model. + + await Word.run(async (context) => { + // Create a proxy object for the document body. + const body: Word.Body = context.document.body; + + // Queue a command to clear the contents of the body. + body.clear(); + + console.log("Cleared the body contents."); + }); + + + // The Silly stories add-in sample shows how the clear method can be used to clear the contents of a document. + + // https://aka.ms/sillystorywordaddin + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'clear(): void;' + return: + type: void + description: '' + - name: getComments() + uid: 'word!Word.Body#getComments:member(1)' + package: word! + fullName: getComments() + summary: Gets comments associated with the body. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-comments.yaml + + + // Gets the comments in the document body. + + await Word.run(async (context) => { + const comments: Word.CommentCollection = context.document.body.getComments(); + + // Load objects to log in the console. + comments.load(); + await context.sync(); + + console.log("All comments:", comments); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getComments(): Word.CommentCollection;' + return: + type: '' + description: '' + - name: getContentControls(options) + uid: 'word!Word.Body#getContentControls:member(1)' + package: word! + fullName: getContentControls(options) + summary: Gets the currently supported content controls in the body. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Important: If specific types are provided in the options parameter, only content controls of supported types are + returned. Be aware that an exception will be thrown on using methods of a generic + [Word.ContentControl](xref:word!Word.ContentControl:class) that aren't relevant for the specific type. With time, + additional types of content controls may be supported. Therefore, your add-in should request and handle specific + types of content controls. + isPreview: false + isDeprecated: false + syntax: + content: 'getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection;' + parameters: + - id: options + description: Optional. Options that define which content controls are returned. + type: '' + return: + type: '' + description: '' + - name: getHtml() + uid: 'word!Word.Body#getHtml:member(1)' + package: word! + fullName: getHtml() + summary: >- + Gets an HTML representation of the body object. When rendered in a web page or HTML viewer, the formatting will be + a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same + HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact + fidelity, or consistency across platforms, use `Body.getOoxml()` and convert the returned XML to HTML. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-body.yaml + + + // Gets the HTML that represents the content of the body. + + // Run a batch operation against the Word object model. + + await Word.run(async (context) => { + // Create a proxy object for the document body. + const body: Word.Body = context.document.body; + + // Queue a command to get the HTML contents of the body. + const bodyHTML = body.getHtml(); + + // Synchronize the document state by executing the queued commands, and return a promise to indicate task completion. + await context.sync(); + + console.log("Body contents (HTML): " + bodyHTML.value); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getHtml(): OfficeExtension.ClientResult;' + return: + type: '<string>' + description: '' + - name: getOoxml() + uid: 'word!Word.Body#getOoxml:member(1)' + package: word! + fullName: getOoxml() + summary: Gets the OOXML (Office Open XML) representation of the body object. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-body.yaml + + + // Gets the OOXML that represents the content of the body. + + // Run a batch operation against the Word object model. + + await Word.run(async (context) => { + // Create a proxy object for the document body. + const body: Word.Body = context.document.body; + + // Queue a command to get the OOXML contents of the body. + const bodyOOXML = body.getOoxml(); + + // Synchronize the document state by executing the queued commands, and return a promise to indicate task completion. + await context.sync(); + + console.log("Body contents (OOXML): " + bodyOOXML.value); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getOoxml(): OfficeExtension.ClientResult;' + return: + type: '<string>' + description: '' + - name: getRange(rangeLocation) + uid: 'word!Word.Body#getRange:member(1)' + package: word! + fullName: getRange(rangeLocation) + summary: 'Gets the whole body, or the starting or ending point of the body, as a range.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | + Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): + Word.Range; + parameters: + - id: rangeLocation + description: 'Optional. The range location must be ''Whole'', ''Start'', ''End'', ''After'', or ''Content''.' + type: >- + | | + | | + | "Whole" | "Start" | "End" | "After" | "Content" + return: + type: '' + description: '' + - name: getReviewedText(changeTrackingVersion) + uid: 'word!Word.Body#getReviewedText:member(1)' + package: word! + fullName: getReviewedText(changeTrackingVersion) + summary: Gets reviewed text based on ChangeTrackingVersion selection. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult;' + parameters: + - id: changeTrackingVersion + description: Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + type: '' + return: + type: '<string>' + description: '' + - name: getReviewedText(changeTrackingVersionString) + uid: 'word!Word.Body#getReviewedText:member(2)' + package: word! + fullName: getReviewedText(changeTrackingVersionString) + summary: Gets reviewed text based on ChangeTrackingVersion selection. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getReviewedText(changeTrackingVersionString?: "Original" | "Current"): OfficeExtension.ClientResult;' + parameters: + - id: changeTrackingVersionString + description: Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + type: '"Original" | "Current"' + return: + type: '<string>' + description: '' + - name: getTrackedChanges() + uid: 'word!Word.Body#getTrackedChanges:member(1)' + package: word! + fullName: getTrackedChanges() + summary: Gets the collection of the TrackedChange objects in the body. + remarks: >- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-tracked-changes.yaml + + + // Gets all tracked changes. + + await Word.run(async (context) => { + const body: Word.Body = context.document.body; + const trackedChanges: Word.TrackedChangeCollection = body.getTrackedChanges(); + trackedChanges.load(); + await context.sync(); + + console.log(trackedChanges); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getTrackedChanges(): Word.TrackedChangeCollection;' + return: + type: '' + description: '' + - name: 'insertBreak(breakType, insertLocation)' + uid: 'word!Word.Body#insertBreak:member(1)' + package: word! + fullName: 'insertBreak(breakType, insertLocation)' + summary: Inserts a break at the specified location in the main document. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-body.yaml + + + // Inserts a page break at the beginning of the document. + + // Run a batch operation against the Word object model. + + await Word.run(async (context) => { + // Create a proxy object for the document body. + const body: Word.Body = context.document.body; + + // Queue a command to insert a page break at the start of the document body. + body.insertBreak(Word.BreakType.page, Word.InsertLocation.start); + + // Synchronize the document state by executing the queued commands, and return a promise to indicate task completion. + await context.sync(); + + console.log("Added a page break at the start of the document body."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | + "SectionOdd" | "Line", insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): + void; + parameters: + - id: breakType + description: Required. The break type to add to the body. + type: >- + | "Page" | "Next" | "SectionNext" | "SectionContinuous" | + "SectionEven" | "SectionOdd" | "Line" + - id: insertLocation + description: Required. The value must be 'Start' or 'End'. + type: >- + | | + "Start" | "End" + return: + type: void + description: '' + - name: insertContentControl(contentControlType) + uid: 'word!Word.Body#insertContentControl:member(1)' + package: word! + fullName: insertContentControl(contentControlType) + summary: Wraps the Body object with a content control. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-body.yaml + + + // Creates a content control using the document body. + + // Run a batch operation against the Word object model. + + await Word.run(async (context) => { + // Create a proxy object for the document body. + const body: Word.Body = context.document.body; + + // Queue a command to wrap the body in a content control. + body.insertContentControl(); + + // Synchronize the document state by executing the queued commands, and return a promise to indicate task completion. + await context.sync(); + + console.log("Wrapped the body in a content control."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; + parameters: + - id: contentControlType + description: >- + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. + type: >- + | | | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" + return: + type: '' + description: '' + - name: 'insertFileFromBase64(base64File, insertLocation)' + uid: 'word!Word.Body#insertFileFromBase64:member(1)' + package: word! + fullName: 'insertFileFromBase64(base64File, insertLocation)' + summary: Inserts a document into the body at the specified location. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form + field). Consider replacing such a form field with a content control or other option appropriate for your scenario. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-body.yaml + + + // Inserts the body from the external document at the beginning of this document. + + // Run a batch operation against the Word object model. + + await Word.run(async (context) => { + // Create a proxy object for the document body. + const body: Word.Body = context.document.body; + + // Queue a command to insert the Base64-encoded string representation of the body of the selected .docx file at the beginning of the current document. + body.insertFileFromBase64(externalDocument, Word.InsertLocation.start); + + // Synchronize the document state by executing the queued commands, and return a promise to indicate task completion. + await context.sync(); + + console.log("Added Base64-encoded text to the beginning of the document body."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start + | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + parameters: + - id: base64File + description: Required. The Base64-encoded content of a .docx file. + type: string + - id: insertLocation + description: 'Required. The value must be ''Replace'', ''Start'', or ''End''.' + type: >- + | | | "Replace" | "Start" | "End" + return: + type: '' + description: '' + - name: 'insertHtml(html, insertLocation)' + uid: 'word!Word.Body#insertHtml:member(1)' + package: word! + fullName: 'insertHtml(html, insertLocation)' + summary: Inserts HTML at the specified location. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-body.yaml + + + // Inserts the HTML at the beginning of this document. + + // Run a batch operation against the Word object model. + + await Word.run(async (context) => { + // Create a proxy object for the document body. + const body: Word.Body = context.document.body; + + // Queue a command to insert HTML at the beginning of the document. + body.insertHtml("This is text inserted with body.insertHtml()", Word.InsertLocation.start); + + // Synchronize the document state by executing the queued commands, and return a promise to indicate task completion. + await context.sync(); + + console.log("HTML added to the beginning of the document body."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | + Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + parameters: + - id: html + description: Required. The HTML to be inserted in the document. + type: string + - id: insertLocation + description: 'Required. The value must be ''Replace'', ''Start'', or ''End''.' + type: >- + | | | "Replace" | "Start" | "End" + return: + type: '' + description: '' + - name: 'insertInlinePictureFromBase64(base64EncodedImage, insertLocation)' + uid: 'word!Word.Body#insertInlinePictureFromBase64:member(1)' + package: word! + fullName: 'insertInlinePictureFromBase64(base64EncodedImage, insertLocation)' + summary: Inserts a picture into the body at the specified location. + remarks: >- + \[ [API set: WordApi 1.2](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-body.yaml + + + // Inserts an image inline at the beginning of this document. + + // Run a batch operation against the Word object model. + + await Word.run(async (context) => { + // Create a proxy object for the document body. + const body: Word.Body = context.document.body; + + // Base64-encoded image to insert inline. + const base64EncodedImg = + "iVBORw0KGgoAAAANSUhEUgAAAB4AAAANCAIAAAAxEEnAAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACFSURBVDhPtY1BEoQwDMP6/0+XgIMTBAeYoTqso9Rkx1zG+tNj1H94jgGzeNSjteO5vtQQuG2seO0av8LzGbe3anzRoJ4ybm/VeKEerAEbAUpW4aWQCmrGFWykRzGBCnYy2ha3oAIq2MloW9yCCqhgJ6NtcQsqoIKdjLbFLaiACnYyf2fODbrjZcXfr2F4AAAAAElFTkSuQmCC"; + + // Queue a command to insert a Base64-encoded image at the beginning of the current document. + body.insertInlinePictureFromBase64(base64EncodedImg, Word.InsertLocation.start); + + // Synchronize the document state by executing the queued commands, and return a promise to indicate task completion. + await context.sync(); + + console.log("Added a Base64-encoded image to the beginning of the document body."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.start | + Word.InsertLocation.end | "Start" | "End"): Word.InlinePicture; + parameters: + - id: base64EncodedImage + description: Required. The Base64-encoded image to be inserted in the body. + type: string + - id: insertLocation + description: Required. The value must be 'Start' or 'End'. + type: >- + | | + "Start" | "End" + return: + type: '' + description: '' + - name: 'insertOoxml(ooxml, insertLocation)' + uid: 'word!Word.Body#insertOoxml:member(1)' + package: word! + fullName: 'insertOoxml(ooxml, insertLocation)' + summary: Inserts OOXML at the specified location. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-body.yaml + + + // Inserts OOXML at the beginning of this document. + + // Run a batch operation against the Word object model. + + await Word.run(async (context) => { + // Create a proxy object for the document body. + const body: Word.Body = context.document.body; + + // Queue a command to insert OOXML at the beginning of the body. + body.insertOoxml( + "This text has formatting directly applied to achieve its font size, color, line spacing, and paragraph spacing.", + Word.InsertLocation.start + ); + + // Synchronize the document state by executing the queued commands, and return a promise to indicate task completion. + await context.sync(); + + console.log("Added OOXML to the beginning of the document body."); + }); + + + // Read "Understand when and how to use Office Open XML in your Word add-in" for guidance on working with OOXML. + + // https://learn.microsoft.com/office/dev/add-ins/word/create-better-add-ins-for-word-with-office-open-xml + + + // The Word-Add-in-DocumentAssembly sample shows how you can use this API to assemble a document. + + // https://github.com/OfficeDev/Word-Add-in-DocumentAssembly + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | + Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + parameters: + - id: ooxml + description: Required. The OOXML to be inserted. + type: string + - id: insertLocation + description: 'Required. The value must be ''Replace'', ''Start'', or ''End''.' + type: >- + | | | "Replace" | "Start" | "End" + return: + type: '' + description: '' + - name: 'insertParagraph(paragraphText, insertLocation)' + uid: 'word!Word.Body#insertParagraph:member(1)' + package: word! + fullName: 'insertParagraph(paragraphText, insertLocation)' + summary: Inserts a paragraph at the specified location. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/insert-formatted-text.yaml + + + await Word.run(async (context) => { + // Second sentence, let's insert it as a paragraph after the previously inserted one. + const secondSentence: Word.Paragraph = context.document.body.insertParagraph( + "This is the first text with a custom style.", + "End" + ); + secondSentence.font.set({ + bold: false, + italic: true, + name: "Berlin Sans FB", + color: "blue", + size: 30 + }); + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | + "Start" | "End"): Word.Paragraph; + parameters: + - id: paragraphText + description: Required. The paragraph text to be inserted. + type: string + - id: insertLocation + description: Required. The value must be 'Start' or 'End'. + type: >- + | | + "Start" | "End" + return: + type: '' + description: '' + - name: 'insertTable(rowCount, columnCount, insertLocation, values)' + uid: 'word!Word.Body#insertTable:member(1)' + package: word! + fullName: 'insertTable(rowCount, columnCount, insertLocation, values)' + summary: Inserts a table with the specified number of rows and columns. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/table-cell-access.yaml + + + await Word.run(async (context) => { + // Use a two-dimensional array to hold the initial table values. + const data = [ + ["Tokyo", "Beijing", "Seattle"], + ["Apple", "Orange", "Pineapple"] + ]; + const table: Word.Table = context.document.body.insertTable(2, 3, "Start", data); + table.styleBuiltIn = Word.BuiltInStyleName.gridTable5Dark_Accent2; + table.styleFirstColumn = false; + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.start | + Word.InsertLocation.end | "Start" | "End", values?: string[][]): Word.Table; + parameters: + - id: rowCount + description: Required. The number of rows in the table. + type: number + - id: columnCount + description: Required. The number of columns in the table. + type: number + - id: insertLocation + description: Required. The value must be 'Start' or 'End'. + type: >- + | | + "Start" | "End" + - id: values + description: Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + type: 'string[][]' + return: + type: '' + description: '' + - name: 'insertText(text, insertLocation)' + uid: 'word!Word.Body#insertText:member(1)' + package: word! + fullName: 'insertText(text, insertLocation)' + summary: Inserts text into the body at the specified location. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-body.yaml + + + // Inserts text at the beginning of this document. + + // Run a batch operation against the Word object model. + + await Word.run(async (context) => { + // Create a proxy object for the document body. + const body: Word.Body = context.document.body; + + // Queue a command to insert text at the beginning of the current document. + body.insertText('This is text inserted with body.insertText()', Word.InsertLocation.start); + + // Synchronize the document state by executing the queued commands, and return a promise to indicate task completion. + await context.sync(); + + console.log("Text added to the beginning of the document body."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | + Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + parameters: + - id: text + description: Required. Text to be inserted. + type: string + - id: insertLocation + description: 'Required. The value must be ''Replace'', ''Start'', or ''End''.' + type: >- + | | | "Replace" | "Start" | "End" + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.Body#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.BodyLoadOptions): Word.Body;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.Body#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.Body;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.Body#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Body; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: 'search(searchText, searchOptions)' + uid: 'word!Word.Body#search:member(1)' + package: word! + fullName: 'search(searchText, searchOptions)' + summary: >- + Performs a search with the specified SearchOptions on the scope of the body object. The search results are a + collection of range objects. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/search.yaml + + + // Does a basic text search and highlights matches in the document. + + await Word.run(async (context) => { + const results : Word.RangeCollection = context.document.body.search("extend"); + results.load("length"); + + await context.sync(); + + // Let's traverse the search results and highlight matches. + for (let i = 0; i < results.items.length; i++) { + results.items[i].font.highlightColor = "yellow"; + } + + await context.sync(); + }); + + + ... + + + // Does a wildcard search and highlights matches in the document. + + await Word.run(async (context) => { + // Construct a wildcard expression and set matchWildcards to true in order to use wildcards. + const results : Word.RangeCollection = context.document.body.search("$*.[0-9][0-9]", { matchWildcards: true }); + results.load("length"); + + await context.sync(); + + // Let's traverse the search results and highlight matches. + for (let i = 0; i < results.items.length; i++) { + results.items[i].font.highlightColor = "red"; + results.items[i].font.color = "white"; + } + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: |- + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + parameters: + - id: searchText + description: Required. The search text. Can be a maximum of 255 characters. + type: string + - id: searchOptions + description: Optional. Options for the search. + type: |- + | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + } + return: + type: '' + description: '' + - name: select(selectionMode) + uid: 'word!Word.Body#select:member(1)' + package: word! + fullName: select(selectionMode) + summary: Selects the body and navigates the Word UI to it. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-body.yaml + + + // Selects the entire body. + + // Run a batch operation against the Word object model. + + await Word.run(async (context) => { + // Create a proxy object for the document body. + const body: Word.Body = context.document.body; + + // Queue a command to select the document body. + // The Word UI will move to the selected document body. + body.select(); + + console.log("Selected the document body."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'select(selectionMode?: Word.SelectionMode): void;' + parameters: + - id: selectionMode + description: 'Optional. The selection mode must be ''Select'', ''Start'', or ''End''. ''Select'' is the default.' + type: '' + return: + type: void + description: '' + - name: select(selectionModeString) + uid: 'word!Word.Body#select:member(2)' + package: word! + fullName: select(selectionModeString) + summary: Selects the body and navigates the Word UI to it. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'select(selectionModeString?: "Select" | "Start" | "End"): void;' + parameters: + - id: selectionModeString + description: 'Optional. The selection mode must be ''Select'', ''Start'', or ''End''. ''Select'' is the default.' + type: '"Select" | "Start" | "End"' + return: + type: void + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.Body#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.BodyUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.Body#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.Body): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.Body#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.Body` object is an API object, the `toJSON` method returns a plain + JavaScript object (typed as `Word.Interfaces.BodyData`) that contains shallow copies of any loaded child + properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.BodyData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.Body#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.Body;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.Body#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.Body;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.bodytype.yml b/docs/docs-ref-autogen/word_1_9/word/word.bodytype.yml new file mode 100644 index 0000000000..d598ce00ba --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.bodytype.yml @@ -0,0 +1,86 @@ +### YamlMime:TSEnum +name: Word.BodyType +uid: 'word!Word.BodyType:enum' +package: word! +fullName: Word.BodyType +summary: '' +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-footnotes.yaml + + + // Gets the referenced note's item type and body type, which are both "Footnote". + + await Word.run(async (context) => { + const footnotes: Word.NoteItemCollection = context.document.body.footnotes; + footnotes.load("items"); + await context.sync(); + + const referenceNumber = $("#input-reference").val(); + const mark = (referenceNumber as number) - 1; + const item: Word.NoteItem = footnotes.items[mark]; + console.log(`Note type of footnote ${referenceNumber}: ${item.type}`); + + item.body.load("type"); + await context.sync(); + + console.log(`Body type of note: ${item.body.type}`); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: endnote + uid: 'word!Word.BodyType.endnote:member' + package: word! + summary: '* \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Endnote"' + - name: footer + uid: 'word!Word.BodyType.footer:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Footer"' + - name: footnote + uid: 'word!Word.BodyType.footnote:member' + package: word! + summary: '* \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Footnote"' + - name: header + uid: 'word!Word.BodyType.header:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Header"' + - name: mainDoc + uid: 'word!Word.BodyType.mainDoc:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"MainDoc"' + - name: noteItem + uid: 'word!Word.BodyType.noteItem:member' + package: word! + summary: '* \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"NoteItem"' + - name: section + uid: 'word!Word.BodyType.section:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Section"' + - name: tableCell + uid: 'word!Word.BodyType.tableCell:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"TableCell"' + - name: unknown + uid: 'word!Word.BodyType.unknown:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Unknown"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.borderlocation.yml b/docs/docs-ref-autogen/word_1_9/word/word.borderlocation.yml new file mode 100644 index 0000000000..f431410eaf --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.borderlocation.yml @@ -0,0 +1,80 @@ +### YamlMime:TSEnum +name: Word.BorderLocation +uid: 'word!Word.BorderLocation:enum' +package: word! +fullName: Word.BorderLocation +summary: '' +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets border details about the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + const borderLocation = Word.BorderLocation.top; + const border: Word.TableBorder = firstTable.getBorder(borderLocation); + border.load(["type", "color", "width"]); + await context.sync(); + + console.log(`Details about the ${borderLocation} border of the first table:`, `- Color: ${border.color}`, `- Type: ${border.type}`, `- Width: ${border.width} points`); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: all + uid: 'word!Word.BorderLocation.all:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"All"' + - name: bottom + uid: 'word!Word.BorderLocation.bottom:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Bottom"' + - name: inside + uid: 'word!Word.BorderLocation.inside:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Inside"' + - name: insideHorizontal + uid: 'word!Word.BorderLocation.insideHorizontal:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"InsideHorizontal"' + - name: insideVertical + uid: 'word!Word.BorderLocation.insideVertical:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"InsideVertical"' + - name: left + uid: 'word!Word.BorderLocation.left:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Left"' + - name: outside + uid: 'word!Word.BorderLocation.outside:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Outside"' + - name: right + uid: 'word!Word.BorderLocation.right:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Right"' + - name: top + uid: 'word!Word.BorderLocation.top:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Top"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.bordertype.yml b/docs/docs-ref-autogen/word_1_9/word/word.bordertype.yml new file mode 100644 index 0000000000..eb1e46ab52 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.bordertype.yml @@ -0,0 +1,156 @@ +### YamlMime:TSEnum +name: Word.BorderType +uid: 'word!Word.BorderType:enum' +package: word! +fullName: Word.BorderType +summary: '' +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets border details about the first of the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + const firstCell: Word.TableCell = firstTable.getCell(0, 0); + const borderLocation = "Left"; + const border: Word.TableBorder = firstCell.getBorder(borderLocation); + border.load(["type", "color", "width"]); + await context.sync(); + + console.log(`Details about the ${borderLocation} border of the first table's first cell:`, `- Color: ${border.color}`, `- Type: ${border.type}`, `- Width: ${border.width} points`); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: dashDotStroked + uid: 'word!Word.BorderType.dashDotStroked:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"DashDotStroked"' + - name: dashed + uid: 'word!Word.BorderType.dashed:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Dashed"' + - name: dashedSmall + uid: 'word!Word.BorderType.dashedSmall:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"DashedSmall"' + - name: dot2Dashed + uid: 'word!Word.BorderType.dot2Dashed:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Dot2Dashed"' + - name: dotDashed + uid: 'word!Word.BorderType.dotDashed:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"DotDashed"' + - name: dotted + uid: 'word!Word.BorderType.dotted:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Dotted"' + - name: double + uid: 'word!Word.BorderType.double:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Double"' + - name: doubleWave + uid: 'word!Word.BorderType.doubleWave:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"DoubleWave"' + - name: mixed + uid: 'word!Word.BorderType.mixed:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Mixed"' + - name: none + uid: 'word!Word.BorderType.none:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"None"' + - name: single + uid: 'word!Word.BorderType.single:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Single"' + - name: thickThinLarge + uid: 'word!Word.BorderType.thickThinLarge:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ThickThinLarge"' + - name: thickThinMed + uid: 'word!Word.BorderType.thickThinMed:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ThickThinMed"' + - name: thickThinSmall + uid: 'word!Word.BorderType.thickThinSmall:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ThickThinSmall"' + - name: thinThickLarge + uid: 'word!Word.BorderType.thinThickLarge:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ThinThickLarge"' + - name: thinThickMed + uid: 'word!Word.BorderType.thinThickMed:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ThinThickMed"' + - name: thinThickSmall + uid: 'word!Word.BorderType.thinThickSmall:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ThinThickSmall"' + - name: thinThickThinLarge + uid: 'word!Word.BorderType.thinThickThinLarge:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ThinThickThinLarge"' + - name: thinThickThinMed + uid: 'word!Word.BorderType.thinThickThinMed:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ThinThickThinMed"' + - name: thinThickThinSmall + uid: 'word!Word.BorderType.thinThickThinSmall:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ThinThickThinSmall"' + - name: threeDEmboss + uid: 'word!Word.BorderType.threeDEmboss:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ThreeDEmboss"' + - name: threeDEngrave + uid: 'word!Word.BorderType.threeDEngrave:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ThreeDEngrave"' + - name: triple + uid: 'word!Word.BorderType.triple:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Triple"' + - name: wave + uid: 'word!Word.BorderType.wave:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Wave"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.breaktype.yml b/docs/docs-ref-autogen/word_1_9/word/word.breaktype.yml new file mode 100644 index 0000000000..20ae153af5 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.breaktype.yml @@ -0,0 +1,90 @@ +### YamlMime:TSEnum +name: Word.BreakType +uid: 'word!Word.BreakType:enum' +package: word! +fullName: Word.BreakType +summary: Specifies the form of a break. +remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/insert-line-and-page-breaks.yaml + + + await Word.run(async (context) => { + context.document.body.paragraphs.getFirst().insertBreak(Word.BreakType.page, "After"); + + await context.sync(); + console.log("success"); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: line + uid: 'word!Word.BreakType.line:member' + package: word! + summary: |- + Line break. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Line"' + - name: next + uid: 'word!Word.BreakType.next:member' + package: word! + summary: |- + Warning: next has been deprecated. Use sectionNext instead. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Next"' + - name: page + uid: 'word!Word.BreakType.page:member' + package: word! + summary: |- + Page break at the insertion point. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Page"' + - name: sectionContinuous + uid: 'word!Word.BreakType.sectionContinuous:member' + package: word! + summary: |- + New section without a corresponding page break. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"SectionContinuous"' + - name: sectionEven + uid: 'word!Word.BreakType.sectionEven:member' + package: word! + summary: >- + Section break with the next section beginning on the next even-numbered page. If the section break falls on an + even-numbered page, Word leaves the next odd-numbered page blank. + + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"SectionEven"' + - name: sectionNext + uid: 'word!Word.BreakType.sectionNext:member' + package: word! + summary: |- + Section break on next page. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"SectionNext"' + - name: sectionOdd + uid: 'word!Word.BreakType.sectionOdd:member' + package: word! + summary: >- + Section break with the next section beginning on the next odd-numbered page. If the section break falls on an + odd-numbered page, Word leaves the next even-numbered page blank. + + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"SectionOdd"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.builtinstylename.yml b/docs/docs-ref-autogen/word_1_9/word/word.builtinstylename.yml new file mode 100644 index 0000000000..afcb2dbf35 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.builtinstylename.yml @@ -0,0 +1,814 @@ +### YamlMime:TSEnum +name: Word.BuiltInStyleName +uid: 'word!Word.BuiltInStyleName:enum' +package: word! +fullName: Word.BuiltInStyleName +summary: Represents the built-in style in a Word document. +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Important: This enum was renamed from `Style` to `BuiltInStyleName` in WordApi 1.5. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/insert-formatted-text.yaml + + + await Word.run(async (context) => { + const sentence: Word.Paragraph = context.document.body.insertParagraph( + "To be or not to be", + "End" + ); + + // Use styleBuiltIn to use an enumeration of existing styles. If your style is custom make sure to use: range.style = "name of your style"; + sentence.styleBuiltIn = Word.BuiltInStyleName.intenseReference; + + await context.sync(); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: bibliography + uid: 'word!Word.BuiltInStyleName.bibliography:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Bibliography"' + - name: bookTitle + uid: 'word!Word.BuiltInStyleName.bookTitle:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"BookTitle"' + - name: caption + uid: 'word!Word.BuiltInStyleName.caption:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Caption"' + - name: emphasis + uid: 'word!Word.BuiltInStyleName.emphasis:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Emphasis"' + - name: endnoteReference + uid: 'word!Word.BuiltInStyleName.endnoteReference:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"EndnoteReference"' + - name: endnoteText + uid: 'word!Word.BuiltInStyleName.endnoteText:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"EndnoteText"' + - name: footer + uid: 'word!Word.BuiltInStyleName.footer:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Footer"' + - name: footnoteReference + uid: 'word!Word.BuiltInStyleName.footnoteReference:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"FootnoteReference"' + - name: footnoteText + uid: 'word!Word.BuiltInStyleName.footnoteText:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"FootnoteText"' + - name: gridTable1Light + uid: 'word!Word.BuiltInStyleName.gridTable1Light:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable1Light"' + - name: gridTable1Light_Accent1 + uid: 'word!Word.BuiltInStyleName.gridTable1Light_Accent1:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable1Light_Accent1"' + - name: gridTable1Light_Accent2 + uid: 'word!Word.BuiltInStyleName.gridTable1Light_Accent2:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable1Light_Accent2"' + - name: gridTable1Light_Accent3 + uid: 'word!Word.BuiltInStyleName.gridTable1Light_Accent3:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable1Light_Accent3"' + - name: gridTable1Light_Accent4 + uid: 'word!Word.BuiltInStyleName.gridTable1Light_Accent4:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable1Light_Accent4"' + - name: gridTable1Light_Accent5 + uid: 'word!Word.BuiltInStyleName.gridTable1Light_Accent5:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable1Light_Accent5"' + - name: gridTable1Light_Accent6 + uid: 'word!Word.BuiltInStyleName.gridTable1Light_Accent6:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable1Light_Accent6"' + - name: gridTable2 + uid: 'word!Word.BuiltInStyleName.gridTable2:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable2"' + - name: gridTable2_Accent1 + uid: 'word!Word.BuiltInStyleName.gridTable2_Accent1:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable2_Accent1"' + - name: gridTable2_Accent2 + uid: 'word!Word.BuiltInStyleName.gridTable2_Accent2:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable2_Accent2"' + - name: gridTable2_Accent3 + uid: 'word!Word.BuiltInStyleName.gridTable2_Accent3:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable2_Accent3"' + - name: gridTable2_Accent4 + uid: 'word!Word.BuiltInStyleName.gridTable2_Accent4:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable2_Accent4"' + - name: gridTable2_Accent5 + uid: 'word!Word.BuiltInStyleName.gridTable2_Accent5:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable2_Accent5"' + - name: gridTable2_Accent6 + uid: 'word!Word.BuiltInStyleName.gridTable2_Accent6:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable2_Accent6"' + - name: gridTable3 + uid: 'word!Word.BuiltInStyleName.gridTable3:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable3"' + - name: gridTable3_Accent1 + uid: 'word!Word.BuiltInStyleName.gridTable3_Accent1:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable3_Accent1"' + - name: gridTable3_Accent2 + uid: 'word!Word.BuiltInStyleName.gridTable3_Accent2:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable3_Accent2"' + - name: gridTable3_Accent3 + uid: 'word!Word.BuiltInStyleName.gridTable3_Accent3:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable3_Accent3"' + - name: gridTable3_Accent4 + uid: 'word!Word.BuiltInStyleName.gridTable3_Accent4:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable3_Accent4"' + - name: gridTable3_Accent5 + uid: 'word!Word.BuiltInStyleName.gridTable3_Accent5:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable3_Accent5"' + - name: gridTable3_Accent6 + uid: 'word!Word.BuiltInStyleName.gridTable3_Accent6:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable3_Accent6"' + - name: gridTable4 + uid: 'word!Word.BuiltInStyleName.gridTable4:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable4"' + - name: gridTable4_Accent1 + uid: 'word!Word.BuiltInStyleName.gridTable4_Accent1:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable4_Accent1"' + - name: gridTable4_Accent2 + uid: 'word!Word.BuiltInStyleName.gridTable4_Accent2:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable4_Accent2"' + - name: gridTable4_Accent3 + uid: 'word!Word.BuiltInStyleName.gridTable4_Accent3:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable4_Accent3"' + - name: gridTable4_Accent4 + uid: 'word!Word.BuiltInStyleName.gridTable4_Accent4:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable4_Accent4"' + - name: gridTable4_Accent5 + uid: 'word!Word.BuiltInStyleName.gridTable4_Accent5:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable4_Accent5"' + - name: gridTable4_Accent6 + uid: 'word!Word.BuiltInStyleName.gridTable4_Accent6:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable4_Accent6"' + - name: gridTable5Dark + uid: 'word!Word.BuiltInStyleName.gridTable5Dark:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable5Dark"' + - name: gridTable5Dark_Accent1 + uid: 'word!Word.BuiltInStyleName.gridTable5Dark_Accent1:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable5Dark_Accent1"' + - name: gridTable5Dark_Accent2 + uid: 'word!Word.BuiltInStyleName.gridTable5Dark_Accent2:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable5Dark_Accent2"' + - name: gridTable5Dark_Accent3 + uid: 'word!Word.BuiltInStyleName.gridTable5Dark_Accent3:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable5Dark_Accent3"' + - name: gridTable5Dark_Accent4 + uid: 'word!Word.BuiltInStyleName.gridTable5Dark_Accent4:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable5Dark_Accent4"' + - name: gridTable5Dark_Accent5 + uid: 'word!Word.BuiltInStyleName.gridTable5Dark_Accent5:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable5Dark_Accent5"' + - name: gridTable5Dark_Accent6 + uid: 'word!Word.BuiltInStyleName.gridTable5Dark_Accent6:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable5Dark_Accent6"' + - name: gridTable6Colorful + uid: 'word!Word.BuiltInStyleName.gridTable6Colorful:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable6Colorful"' + - name: gridTable6Colorful_Accent1 + uid: 'word!Word.BuiltInStyleName.gridTable6Colorful_Accent1:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable6Colorful_Accent1"' + - name: gridTable6Colorful_Accent2 + uid: 'word!Word.BuiltInStyleName.gridTable6Colorful_Accent2:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable6Colorful_Accent2"' + - name: gridTable6Colorful_Accent3 + uid: 'word!Word.BuiltInStyleName.gridTable6Colorful_Accent3:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable6Colorful_Accent3"' + - name: gridTable6Colorful_Accent4 + uid: 'word!Word.BuiltInStyleName.gridTable6Colorful_Accent4:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable6Colorful_Accent4"' + - name: gridTable6Colorful_Accent5 + uid: 'word!Word.BuiltInStyleName.gridTable6Colorful_Accent5:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable6Colorful_Accent5"' + - name: gridTable6Colorful_Accent6 + uid: 'word!Word.BuiltInStyleName.gridTable6Colorful_Accent6:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable6Colorful_Accent6"' + - name: gridTable7Colorful + uid: 'word!Word.BuiltInStyleName.gridTable7Colorful:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable7Colorful"' + - name: gridTable7Colorful_Accent1 + uid: 'word!Word.BuiltInStyleName.gridTable7Colorful_Accent1:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable7Colorful_Accent1"' + - name: gridTable7Colorful_Accent2 + uid: 'word!Word.BuiltInStyleName.gridTable7Colorful_Accent2:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable7Colorful_Accent2"' + - name: gridTable7Colorful_Accent3 + uid: 'word!Word.BuiltInStyleName.gridTable7Colorful_Accent3:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable7Colorful_Accent3"' + - name: gridTable7Colorful_Accent4 + uid: 'word!Word.BuiltInStyleName.gridTable7Colorful_Accent4:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable7Colorful_Accent4"' + - name: gridTable7Colorful_Accent5 + uid: 'word!Word.BuiltInStyleName.gridTable7Colorful_Accent5:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable7Colorful_Accent5"' + - name: gridTable7Colorful_Accent6 + uid: 'word!Word.BuiltInStyleName.gridTable7Colorful_Accent6:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"GridTable7Colorful_Accent6"' + - name: header + uid: 'word!Word.BuiltInStyleName.header:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Header"' + - name: heading1 + uid: 'word!Word.BuiltInStyleName.heading1:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Heading1"' + - name: heading2 + uid: 'word!Word.BuiltInStyleName.heading2:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Heading2"' + - name: heading3 + uid: 'word!Word.BuiltInStyleName.heading3:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Heading3"' + - name: heading4 + uid: 'word!Word.BuiltInStyleName.heading4:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Heading4"' + - name: heading5 + uid: 'word!Word.BuiltInStyleName.heading5:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Heading5"' + - name: heading6 + uid: 'word!Word.BuiltInStyleName.heading6:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Heading6"' + - name: heading7 + uid: 'word!Word.BuiltInStyleName.heading7:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Heading7"' + - name: heading8 + uid: 'word!Word.BuiltInStyleName.heading8:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Heading8"' + - name: heading9 + uid: 'word!Word.BuiltInStyleName.heading9:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Heading9"' + - name: hyperlink + uid: 'word!Word.BuiltInStyleName.hyperlink:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Hyperlink"' + - name: intenseEmphasis + uid: 'word!Word.BuiltInStyleName.intenseEmphasis:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"IntenseEmphasis"' + - name: intenseQuote + uid: 'word!Word.BuiltInStyleName.intenseQuote:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"IntenseQuote"' + - name: intenseReference + uid: 'word!Word.BuiltInStyleName.intenseReference:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"IntenseReference"' + - name: listParagraph + uid: 'word!Word.BuiltInStyleName.listParagraph:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListParagraph"' + - name: listTable1Light + uid: 'word!Word.BuiltInStyleName.listTable1Light:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable1Light"' + - name: listTable1Light_Accent1 + uid: 'word!Word.BuiltInStyleName.listTable1Light_Accent1:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable1Light_Accent1"' + - name: listTable1Light_Accent2 + uid: 'word!Word.BuiltInStyleName.listTable1Light_Accent2:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable1Light_Accent2"' + - name: listTable1Light_Accent3 + uid: 'word!Word.BuiltInStyleName.listTable1Light_Accent3:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable1Light_Accent3"' + - name: listTable1Light_Accent4 + uid: 'word!Word.BuiltInStyleName.listTable1Light_Accent4:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable1Light_Accent4"' + - name: listTable1Light_Accent5 + uid: 'word!Word.BuiltInStyleName.listTable1Light_Accent5:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable1Light_Accent5"' + - name: listTable1Light_Accent6 + uid: 'word!Word.BuiltInStyleName.listTable1Light_Accent6:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable1Light_Accent6"' + - name: listTable2 + uid: 'word!Word.BuiltInStyleName.listTable2:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable2"' + - name: listTable2_Accent1 + uid: 'word!Word.BuiltInStyleName.listTable2_Accent1:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable2_Accent1"' + - name: listTable2_Accent2 + uid: 'word!Word.BuiltInStyleName.listTable2_Accent2:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable2_Accent2"' + - name: listTable2_Accent3 + uid: 'word!Word.BuiltInStyleName.listTable2_Accent3:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable2_Accent3"' + - name: listTable2_Accent4 + uid: 'word!Word.BuiltInStyleName.listTable2_Accent4:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable2_Accent4"' + - name: listTable2_Accent5 + uid: 'word!Word.BuiltInStyleName.listTable2_Accent5:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable2_Accent5"' + - name: listTable2_Accent6 + uid: 'word!Word.BuiltInStyleName.listTable2_Accent6:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable2_Accent6"' + - name: listTable3 + uid: 'word!Word.BuiltInStyleName.listTable3:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable3"' + - name: listTable3_Accent1 + uid: 'word!Word.BuiltInStyleName.listTable3_Accent1:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable3_Accent1"' + - name: listTable3_Accent2 + uid: 'word!Word.BuiltInStyleName.listTable3_Accent2:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable3_Accent2"' + - name: listTable3_Accent3 + uid: 'word!Word.BuiltInStyleName.listTable3_Accent3:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable3_Accent3"' + - name: listTable3_Accent4 + uid: 'word!Word.BuiltInStyleName.listTable3_Accent4:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable3_Accent4"' + - name: listTable3_Accent5 + uid: 'word!Word.BuiltInStyleName.listTable3_Accent5:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable3_Accent5"' + - name: listTable3_Accent6 + uid: 'word!Word.BuiltInStyleName.listTable3_Accent6:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable3_Accent6"' + - name: listTable4 + uid: 'word!Word.BuiltInStyleName.listTable4:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable4"' + - name: listTable4_Accent1 + uid: 'word!Word.BuiltInStyleName.listTable4_Accent1:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable4_Accent1"' + - name: listTable4_Accent2 + uid: 'word!Word.BuiltInStyleName.listTable4_Accent2:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable4_Accent2"' + - name: listTable4_Accent3 + uid: 'word!Word.BuiltInStyleName.listTable4_Accent3:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable4_Accent3"' + - name: listTable4_Accent4 + uid: 'word!Word.BuiltInStyleName.listTable4_Accent4:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable4_Accent4"' + - name: listTable4_Accent5 + uid: 'word!Word.BuiltInStyleName.listTable4_Accent5:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable4_Accent5"' + - name: listTable4_Accent6 + uid: 'word!Word.BuiltInStyleName.listTable4_Accent6:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable4_Accent6"' + - name: listTable5Dark + uid: 'word!Word.BuiltInStyleName.listTable5Dark:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable5Dark"' + - name: listTable5Dark_Accent1 + uid: 'word!Word.BuiltInStyleName.listTable5Dark_Accent1:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable5Dark_Accent1"' + - name: listTable5Dark_Accent2 + uid: 'word!Word.BuiltInStyleName.listTable5Dark_Accent2:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable5Dark_Accent2"' + - name: listTable5Dark_Accent3 + uid: 'word!Word.BuiltInStyleName.listTable5Dark_Accent3:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable5Dark_Accent3"' + - name: listTable5Dark_Accent4 + uid: 'word!Word.BuiltInStyleName.listTable5Dark_Accent4:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable5Dark_Accent4"' + - name: listTable5Dark_Accent5 + uid: 'word!Word.BuiltInStyleName.listTable5Dark_Accent5:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable5Dark_Accent5"' + - name: listTable5Dark_Accent6 + uid: 'word!Word.BuiltInStyleName.listTable5Dark_Accent6:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable5Dark_Accent6"' + - name: listTable6Colorful + uid: 'word!Word.BuiltInStyleName.listTable6Colorful:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable6Colorful"' + - name: listTable6Colorful_Accent1 + uid: 'word!Word.BuiltInStyleName.listTable6Colorful_Accent1:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable6Colorful_Accent1"' + - name: listTable6Colorful_Accent2 + uid: 'word!Word.BuiltInStyleName.listTable6Colorful_Accent2:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable6Colorful_Accent2"' + - name: listTable6Colorful_Accent3 + uid: 'word!Word.BuiltInStyleName.listTable6Colorful_Accent3:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable6Colorful_Accent3"' + - name: listTable6Colorful_Accent4 + uid: 'word!Word.BuiltInStyleName.listTable6Colorful_Accent4:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable6Colorful_Accent4"' + - name: listTable6Colorful_Accent5 + uid: 'word!Word.BuiltInStyleName.listTable6Colorful_Accent5:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable6Colorful_Accent5"' + - name: listTable6Colorful_Accent6 + uid: 'word!Word.BuiltInStyleName.listTable6Colorful_Accent6:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable6Colorful_Accent6"' + - name: listTable7Colorful + uid: 'word!Word.BuiltInStyleName.listTable7Colorful:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable7Colorful"' + - name: listTable7Colorful_Accent1 + uid: 'word!Word.BuiltInStyleName.listTable7Colorful_Accent1:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable7Colorful_Accent1"' + - name: listTable7Colorful_Accent2 + uid: 'word!Word.BuiltInStyleName.listTable7Colorful_Accent2:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable7Colorful_Accent2"' + - name: listTable7Colorful_Accent3 + uid: 'word!Word.BuiltInStyleName.listTable7Colorful_Accent3:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable7Colorful_Accent3"' + - name: listTable7Colorful_Accent4 + uid: 'word!Word.BuiltInStyleName.listTable7Colorful_Accent4:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable7Colorful_Accent4"' + - name: listTable7Colorful_Accent5 + uid: 'word!Word.BuiltInStyleName.listTable7Colorful_Accent5:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable7Colorful_Accent5"' + - name: listTable7Colorful_Accent6 + uid: 'word!Word.BuiltInStyleName.listTable7Colorful_Accent6:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ListTable7Colorful_Accent6"' + - name: normal + uid: 'word!Word.BuiltInStyleName.normal:member' + package: word! + summary: |- + Reset character and paragraph style to default. + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Normal"' + - name: noSpacing + uid: 'word!Word.BuiltInStyleName.noSpacing:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"NoSpacing"' + - name: other + uid: 'word!Word.BuiltInStyleName.other:member' + package: word! + summary: |- + Mixed styles or other style not in this list. + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Other"' + - name: plainTable1 + uid: 'word!Word.BuiltInStyleName.plainTable1:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"PlainTable1"' + - name: plainTable2 + uid: 'word!Word.BuiltInStyleName.plainTable2:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"PlainTable2"' + - name: plainTable3 + uid: 'word!Word.BuiltInStyleName.plainTable3:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"PlainTable3"' + - name: plainTable4 + uid: 'word!Word.BuiltInStyleName.plainTable4:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"PlainTable4"' + - name: plainTable5 + uid: 'word!Word.BuiltInStyleName.plainTable5:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"PlainTable5"' + - name: quote + uid: 'word!Word.BuiltInStyleName.quote:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Quote"' + - name: strong + uid: 'word!Word.BuiltInStyleName.strong:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Strong"' + - name: subtitle + uid: 'word!Word.BuiltInStyleName.subtitle:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Subtitle"' + - name: subtleEmphasis + uid: 'word!Word.BuiltInStyleName.subtleEmphasis:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"SubtleEmphasis"' + - name: subtleReference + uid: 'word!Word.BuiltInStyleName.subtleReference:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"SubtleReference"' + - name: tableGrid + uid: 'word!Word.BuiltInStyleName.tableGrid:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"TableGrid"' + - name: tableGridLight + uid: 'word!Word.BuiltInStyleName.tableGridLight:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"TableGridLight"' + - name: title + uid: 'word!Word.BuiltInStyleName.title:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Title"' + - name: toc1 + uid: 'word!Word.BuiltInStyleName.toc1:member' + package: word! + summary: |- + Table-of-content level 1. + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Toc1"' + - name: toc2 + uid: 'word!Word.BuiltInStyleName.toc2:member' + package: word! + summary: |- + Table-of-content level 2. + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Toc2"' + - name: toc3 + uid: 'word!Word.BuiltInStyleName.toc3:member' + package: word! + summary: |- + Table-of-content level 3. + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Toc3"' + - name: toc4 + uid: 'word!Word.BuiltInStyleName.toc4:member' + package: word! + summary: |- + Table-of-content level 4. + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Toc4"' + - name: toc5 + uid: 'word!Word.BuiltInStyleName.toc5:member' + package: word! + summary: |- + Table-of-content level 5. + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Toc5"' + - name: toc6 + uid: 'word!Word.BuiltInStyleName.toc6:member' + package: word! + summary: |- + Table-of-content level 6. + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Toc6"' + - name: toc7 + uid: 'word!Word.BuiltInStyleName.toc7:member' + package: word! + summary: |- + Table-of-content level 7. + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Toc7"' + - name: toc8 + uid: 'word!Word.BuiltInStyleName.toc8:member' + package: word! + summary: |- + Table-of-content level 8. + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Toc8"' + - name: toc9 + uid: 'word!Word.BuiltInStyleName.toc9:member' + package: word! + summary: |- + Table-of-content level 9. + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Toc9"' + - name: tocHeading + uid: 'word!Word.BuiltInStyleName.tocHeading:member' + package: word! + summary: |- + Table-of-content heading. + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"TocHeading"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.cellpaddinglocation.yml b/docs/docs-ref-autogen/word_1_9/word/word.cellpaddinglocation.yml new file mode 100644 index 0000000000..79bca49988 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.cellpaddinglocation.yml @@ -0,0 +1,56 @@ +### YamlMime:TSEnum +name: Word.CellPaddingLocation +uid: 'word!Word.CellPaddingLocation:enum' +package: word! +fullName: Word.CellPaddingLocation +summary: '' +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets cell padding details about the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + const cellPaddingLocation = Word.CellPaddingLocation.right; + const cellPadding = firstTable.getCellPadding(cellPaddingLocation); + await context.sync(); + + console.log( + `Cell padding details about the ${cellPaddingLocation} border of the first table: ${cellPadding.value} points` + ); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: bottom + uid: 'word!Word.CellPaddingLocation.bottom:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Bottom"' + - name: left + uid: 'word!Word.CellPaddingLocation.left:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Left"' + - name: right + uid: 'word!Word.CellPaddingLocation.right:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Right"' + - name: top + uid: 'word!Word.CellPaddingLocation.top:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Top"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.changetrackingmode.yml b/docs/docs-ref-autogen/word_1_9/word/word.changetrackingmode.yml new file mode 100644 index 0000000000..fbe9541778 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.changetrackingmode.yml @@ -0,0 +1,63 @@ +### YamlMime:TSEnum +name: Word.ChangeTrackingMode +uid: 'word!Word.ChangeTrackingMode:enum' +package: word! +fullName: Word.ChangeTrackingMode +summary: ChangeTracking mode. +remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-change-tracking.yaml + + + // Gets the current change tracking mode. + + await Word.run(async (context) => { + const document: Word.Document = context.document; + document.load("changeTrackingMode"); + await context.sync(); + + if (document.changeTrackingMode === Word.ChangeTrackingMode.trackMineOnly) { + console.log("Only my changes are being tracked."); + } else if (document.changeTrackingMode === Word.ChangeTrackingMode.trackAll) { + console.log("Everyone's changes are being tracked."); + } else { + console.log("No changes are being tracked."); + } + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: 'off' + uid: 'word!Word.ChangeTrackingMode.off:member' + package: word! + summary: |- + ChangeTracking is turned off. + + * \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Off"' + - name: trackAll + uid: 'word!Word.ChangeTrackingMode.trackAll:member' + package: word! + summary: |- + ChangeTracking is turned on for everyone. + + * \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"TrackAll"' + - name: trackMineOnly + uid: 'word!Word.ChangeTrackingMode.trackMineOnly:member' + package: word! + summary: |- + Tracking is turned on for my changes only. + + * \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"TrackMineOnly"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.changetrackingstate.yml b/docs/docs-ref-autogen/word_1_9/word/word.changetrackingstate.yml new file mode 100644 index 0000000000..d978a26114 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.changetrackingstate.yml @@ -0,0 +1,66 @@ +### YamlMime:TSEnum +name: Word.ChangeTrackingState +uid: 'word!Word.ChangeTrackingState:enum' +package: word! +fullName: Word.ChangeTrackingState +summary: Specify the track state when ChangeTracking is on. +remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/get-change-tracking-states.yaml + + + // Logs the current change tracking states of the content controls. + + await Word.run(async (context) => { + let trackAddedArray: Word.ChangeTrackingState[] = [Word.ChangeTrackingState.added]; + let trackDeletedArray: Word.ChangeTrackingState[] = [Word.ChangeTrackingState.deleted]; + let trackNormalArray: Word.ChangeTrackingState[] = [Word.ChangeTrackingState.normal]; + + let addedContentControls = context.document.body.getContentControls().getByChangeTrackingStates(trackAddedArray); + let deletedContentControls = context.document.body + .getContentControls() + .getByChangeTrackingStates(trackDeletedArray); + let normalContentControls = context.document.body.getContentControls().getByChangeTrackingStates(trackNormalArray); + + addedContentControls.load(); + deletedContentControls.load(); + normalContentControls.load(); + await context.sync(); + + console.log(`Number of content controls in Added state: ${addedContentControls.items.length}`); + console.log(`Number of content controls in Deleted state: ${deletedContentControls.items.length}`); + console.log(`Number of content controls in Normal state: ${normalContentControls.items.length}`); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: added + uid: 'word!Word.ChangeTrackingState.added:member' + package: word! + summary: '* \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Added"' + - name: deleted + uid: 'word!Word.ChangeTrackingState.deleted:member' + package: word! + summary: '* \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Deleted"' + - name: normal + uid: 'word!Word.ChangeTrackingState.normal:member' + package: word! + summary: '* \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Normal"' + - name: unknown + uid: 'word!Word.ChangeTrackingState.unknown:member' + package: word! + summary: '* \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Unknown"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.changetrackingversion.yml b/docs/docs-ref-autogen/word_1_9/word/word.changetrackingversion.yml new file mode 100644 index 0000000000..4d6c04c43a --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.changetrackingversion.yml @@ -0,0 +1,45 @@ +### YamlMime:TSEnum +name: Word.ChangeTrackingVersion +uid: 'word!Word.ChangeTrackingVersion:enum' +package: word! +fullName: Word.ChangeTrackingVersion +summary: Specify the current version or the original version of the text. +remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-change-tracking.yaml + + + // Gets the reviewed text. + + await Word.run(async (context) => { + const range: Word.Range = context.document.getSelection(); + const before = range.getReviewedText(Word.ChangeTrackingVersion.original); + const after = range.getReviewedText(Word.ChangeTrackingVersion.current); + + await context.sync(); + + console.log("Reviewed text (before):", before.value, "Reviewed text (after):", after.value); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: current + uid: 'word!Word.ChangeTrackingVersion.current:member' + package: word! + summary: '* \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Current"' + - name: original + uid: 'word!Word.ChangeTrackingVersion.original:member' + package: word! + summary: '* \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Original"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.checkboxcontentcontrol.yml b/docs/docs-ref-autogen/word_1_9/word/word.checkboxcontentcontrol.yml new file mode 100644 index 0000000000..547dca6a8d --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.checkboxcontentcontrol.yml @@ -0,0 +1,264 @@ +### YamlMime:TSType +name: Word.CheckboxContentControl +uid: 'word!Word.CheckboxContentControl:class' +package: word! +fullName: Word.CheckboxContentControl +summary: The data specific to content controls of type CheckBox. +remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-checkbox-content-control.yaml + + + // Toggles the isChecked property on all checkbox content controls. + + await Word.run(async (context) => { + let contentControls = context.document.getContentControls({ + types: [Word.ContentControlType.checkBox] + }); + contentControls.load("items"); + + await context.sync(); + + const length = contentControls.items.length; + console.log(`Number of checkbox content controls: ${length}`); + + if (length <= 0) { + return; + } + + const checkboxContentControls = []; + for (let i = 0; i < length; i++) { + let contentControl = contentControls.items[i]; + contentControl.load("id,checkboxContentControl/isChecked"); + checkboxContentControls.push(contentControl); + } + + await context.sync(); + + console.log("isChecked state before:"); + const updatedCheckboxContentControls = []; + for (let i = 0; i < checkboxContentControls.length; i++) { + const currentCheckboxContentControl = checkboxContentControls[i]; + const isCheckedBefore = currentCheckboxContentControl.checkboxContentControl.isChecked; + console.log(`id: ${currentCheckboxContentControl.id} ... isChecked: ${isCheckedBefore}`); + + currentCheckboxContentControl.checkboxContentControl.isChecked = !isCheckedBefore; + currentCheckboxContentControl.load("id,checkboxContentControl/isChecked"); + updatedCheckboxContentControls.push(currentCheckboxContentControl); + } + + await context.sync(); + + console.log("isChecked state after:"); + for (let i = 0; i < updatedCheckboxContentControls.length; i++) { + const currentCheckboxContentControl = updatedCheckboxContentControls[i]; + console.log( + `id: ${currentCheckboxContentControl.id} ... isChecked: ${currentCheckboxContentControl.checkboxContentControl.isChecked}` + ); + } + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.CheckboxContentControl#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: isChecked + uid: 'word!Word.CheckboxContentControl#isChecked:member' + package: word! + fullName: isChecked + summary: Specifies the current state of the checkbox. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'isChecked: boolean;' + return: + type: boolean +methods: + - name: load(options) + uid: 'word!Word.CheckboxContentControl#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.CheckboxContentControlLoadOptions): Word.CheckboxContentControl;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.CheckboxContentControl#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.CheckboxContentControl;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.CheckboxContentControl#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.CheckboxContentControl; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.CheckboxContentControl#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.CheckboxContentControlUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.CheckboxContentControl#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.CheckboxContentControl): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.CheckboxContentControl#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.CheckboxContentControl` object is an API object, the `toJSON` method + returns a plain JavaScript object (typed as `Word.Interfaces.CheckboxContentControlData`) that contains + shallow copies of any loaded child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.CheckboxContentControlData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.CheckboxContentControl#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.CheckboxContentControl;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.CheckboxContentControl#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.CheckboxContentControl;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.closebehavior.yml b/docs/docs-ref-autogen/word_1_9/word/word.closebehavior.yml new file mode 100644 index 0000000000..5a3fd012c6 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.closebehavior.yml @@ -0,0 +1,45 @@ +### YamlMime:TSEnum +name: Word.CloseBehavior +uid: 'word!Word.CloseBehavior:enum' +package: word! +fullName: Word.CloseBehavior +summary: Specifies the close behavior for `Document.close`. +remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/save-close.yaml + + + // Closes the document after saving. + + await Word.run(async (context) => { + context.document.close(Word.CloseBehavior.save); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: save + uid: 'word!Word.CloseBehavior.save:member' + package: word! + summary: |- + Saves the changes before closing the document. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Save"' + - name: skipSave + uid: 'word!Word.CloseBehavior.skipSave:member' + package: word! + summary: |- + Discard the possible changes when closing the document. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"SkipSave"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.comboboxcontentcontrol.yml b/docs/docs-ref-autogen/word_1_9/word/word.comboboxcontentcontrol.yml new file mode 100644 index 0000000000..0424349a8c --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.comboboxcontentcontrol.yml @@ -0,0 +1,357 @@ +### YamlMime:TSType +name: Word.ComboBoxContentControl +uid: 'word!Word.ComboBoxContentControl:class' +package: word! +fullName: Word.ComboBoxContentControl +summary: The data specific to content controls of type 'ComboBox'. +remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml + + + // Places a combo box content control at the end of the selection. + + await Word.run(async (context) => { + let selection = context.document.getSelection(); + selection.getRange(Word.RangeLocation.end).insertContentControl(Word.ContentControlType.comboBox); + await context.sync(); + + console.log("Combo box content control inserted at the end of the selection."); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.ComboBoxContentControl#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: listItems + uid: 'word!Word.ComboBoxContentControl#listItems:member' + package: word! + fullName: listItems + summary: Gets the collection of list items in the combo box content control. + remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml + + + // Deletes the provided list item from the first combo box content control in the selection. + + await Word.run(async (context) => { + const listItemText = $("#item-to-delete") + .val() + .toString() + .trim(); + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.comboBox] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,comboBoxContentControl"); + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,comboBoxContentControl"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.comboBox) { + console.warn("No combo box content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + let selectedComboBox: Word.ComboBoxContentControl = selectedContentControl.comboBoxContentControl; + selectedComboBox.listItems.load("items/*"); + await context.sync(); + + let listItems: Word.ContentControlListItemCollection = selectedContentControl.comboBoxContentControl.listItems; + let itemToDelete: Word.ContentControlListItem = listItems.items.find((item) => item.displayText === listItemText); + if (!itemToDelete) { + console.warn(`List item doesn't exist in control with ID ${selectedContentControl.id}: ${listItemText}`); + return; + } + + itemToDelete.delete(); + await context.sync(); + + console.log(`List item deleted from control with ID ${selectedContentControl.id}: ${listItemText}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly listItems: Word.ContentControlListItemCollection;' + return: + type: '' +methods: + - name: 'addListItem(displayText, value, index)' + uid: 'word!Word.ComboBoxContentControl#addListItem:member(1)' + package: word! + fullName: 'addListItem(displayText, value, index)' + summary: >- + Adds a new list item to this combo box content control and returns a + [Word.ContentControlListItem](xref:word!Word.ContentControlListItem:class) object. + remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml + + + // Adds the provided list item to the first combo box content control in the selection. + + await Word.run(async (context) => { + const listItemText = $("#item-to-add") + .val() + .toString() + .trim(); + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.comboBox] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,comboBoxContentControl"); + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,comboBoxContentControl"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.comboBox) { + console.warn("No combo box content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + selectedContentControl.comboBoxContentControl.addListItem(listItemText); + await context.sync(); + + console.log(`List item added to control with ID ${selectedContentControl.id}: ${listItemText}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem;' + parameters: + - id: displayText + description: Required. Display text of the list item. + type: string + - id: value + description: Optional. Value of the list item. + type: string + - id: index + description: >- + Optional. Index location of the new item in the list. If an item exists at the position specified, the + existing item is pushed down in the list. If omitted, the new item is added to the end of the list. + type: number + return: + type: '' + description: '' + - name: deleteAllListItems() + uid: 'word!Word.ComboBoxContentControl#deleteAllListItems:member(1)' + package: word! + fullName: deleteAllListItems() + summary: Deletes all list items in this combo box content control. + remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml + + + // Deletes the list items from first combo box content control found in the selection. + + await Word.run(async (context) => { + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.comboBox] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,comboBoxContentControl"); + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,comboBoxContentControl"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.comboBox) { + console.warn("No combo box content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + console.log(`About to delete the list from the combo box content control with ID ${selectedContentControl.id}`); + selectedContentControl.comboBoxContentControl.deleteAllListItems(); + await context.sync(); + + console.log("Deleted the list from the combo box content control."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'deleteAllListItems(): void;' + return: + type: void + description: '' + - name: load(propertyNames) + uid: 'word!Word.ComboBoxContentControl#load:member(1)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.ComboBoxContentControl;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.ComboBoxContentControl#load:member(2)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ComboBoxContentControl; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.ComboBoxContentControl#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is + passed to it.) Whereas the original `Word.ComboBoxContentControl` object is an API object, the `toJSON` method + returns a plain JavaScript object (typed as `Word.Interfaces.ComboBoxContentControlData`) that contains + shallow copies of any loaded child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.ComboBoxContentControlData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.ComboBoxContentControl#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.ComboBoxContentControl;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.ComboBoxContentControl#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.ComboBoxContentControl;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.comment.yml b/docs/docs-ref-autogen/word_1_9/word/word.comment.yml new file mode 100644 index 0000000000..144bab12c7 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.comment.yml @@ -0,0 +1,590 @@ +### YamlMime:TSType +name: Word.Comment +uid: 'word!Word.Comment:class' +package: word! +fullName: Word.Comment +summary: Represents a comment in the document. +remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-comments.yaml + + + // Sets a comment on the selected content. + + await Word.run(async (context) => { + const text = $("#comment-text") + .val() + .toString(); + const comment: Word.Comment = context.document.getSelection().insertComment(text); + + // Load object to log in the console. + comment.load(); + await context.sync(); + + console.log("Comment inserted:", comment); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: authorEmail + uid: 'word!Word.Comment#authorEmail:member' + package: word! + fullName: authorEmail + summary: Gets the email of the comment's author. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly authorEmail: string;' + return: + type: string + - name: authorName + uid: 'word!Word.Comment#authorName:member' + package: word! + fullName: authorName + summary: Gets the name of the comment's author. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly authorName: string;' + return: + type: string + - name: content + uid: 'word!Word.Comment#content:member' + package: word! + fullName: content + summary: Specifies the comment's content as plain text. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-comments.yaml + + + // Edits the first active comment in the selected content. + + await Word.run(async (context) => { + const text = $("#edit-comment-text") + .val() + .toString(); + const comments: Word.CommentCollection = context.document.getSelection().getComments(); + comments.load("items"); + await context.sync(); + + const firstActiveComment: Word.Comment = comments.items.find((item) => item.resolved !== true); + if (!firstActiveComment) { + console.warn("No active comment was found in the selection, so couldn't edit."); + return; + } + + firstActiveComment.content = text; + + // Load object to log in the console. + firstActiveComment.load(); + await context.sync(); + + console.log("Comment content changed:", firstActiveComment); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'content: string;' + return: + type: string + - name: contentRange + uid: 'word!Word.Comment#contentRange:member' + package: word! + fullName: contentRange + summary: Specifies the comment's content range. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-comments.yaml + + + // Gets the range of the first comment in the selected content. + + await Word.run(async (context) => { + const comment: Word.Comment = context.document.getSelection().getComments().getFirstOrNullObject(); + comment.load("contentRange"); + const range: Word.Range = comment.getRange(); + range.load("text"); + await context.sync(); + + if (comment.isNullObject) { + console.warn("No comments in the selection, so no range to get."); + return; + } + + console.log(`Comment location: ${range.text}`); + const contentRange: Word.CommentContentRange = comment.contentRange; + console.log("Comment content range:", contentRange); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'contentRange: Word.CommentContentRange;' + return: + type: '' + - name: context + uid: 'word!Word.Comment#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: creationDate + uid: 'word!Word.Comment#creationDate:member' + package: word! + fullName: creationDate + summary: Gets the creation date of the comment. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly creationDate: Date;' + return: + type: Date + - name: id + uid: 'word!Word.Comment#id:member' + package: word! + fullName: id + summary: Gets the ID of the comment. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly id: string;' + return: + type: string + - name: replies + uid: 'word!Word.Comment#replies:member' + package: word! + fullName: replies + summary: Gets the collection of reply objects associated with the comment. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-comments.yaml + + + // Gets the replies to the first comment in the selected content. + + await Word.run(async (context) => { + const comment: Word.Comment = context.document.getSelection().getComments().getFirstOrNullObject(); + comment.load("replies"); + await context.sync(); + + if (comment.isNullObject) { + console.warn("No comments in the selection, so no replies to get."); + return; + } + + const replies: Word.CommentReplyCollection = comment.replies; + console.log("Replies to the first comment:", replies); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly replies: Word.CommentReplyCollection;' + return: + type: '' + - name: resolved + uid: 'word!Word.Comment#resolved:member' + package: word! + fullName: resolved + summary: >- + Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means + that the comment thread is resolved. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-comments.yaml + + + // Toggles Resolved status of the first comment in the selected content. + + await Word.run(async (context) => { + const comment: Word.Comment = context.document + .getSelection() + .getComments() + .getFirstOrNullObject(); + comment.load("resolved"); + await context.sync(); + + if (comment.isNullObject) { + console.warn("No comments in the selection, so nothing to toggle."); + return; + } + + // Toggle resolved status. + // If the comment is active, set as resolved. + // If it's resolved, set resolved to false. + const resolvedBefore = comment.resolved; + console.log(`Comment Resolved status (before): ${resolvedBefore}`); + comment.resolved = !resolvedBefore; + comment.load("resolved"); + await context.sync(); + + console.log(`Comment Resolved status (after): ${comment.resolved}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'resolved: boolean;' + return: + type: boolean +methods: + - name: delete() + uid: 'word!Word.Comment#delete:member(1)' + package: word! + fullName: delete() + summary: Deletes the comment and its replies. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-comments.yaml + + + // Deletes the first comment in the selected content. + + await Word.run(async (context) => { + const comment: Word.Comment = context.document.getSelection().getComments().getFirstOrNullObject(); + comment.delete(); + await context.sync(); + + if (comment.isNullObject) { + console.warn("No comments in the selection, so nothing to delete."); + return; + } + + console.log("Comment deleted."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'delete(): void;' + return: + type: void + description: '' + - name: getRange() + uid: 'word!Word.Comment#getRange:member(1)' + package: word! + fullName: getRange() + summary: Gets the range in the main document where the comment is on. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-comments.yaml + + + // Gets the range of the first comment in the selected content. + + await Word.run(async (context) => { + const comment: Word.Comment = context.document.getSelection().getComments().getFirstOrNullObject(); + comment.load("contentRange"); + const range: Word.Range = comment.getRange(); + range.load("text"); + await context.sync(); + + if (comment.isNullObject) { + console.warn("No comments in the selection, so no range to get."); + return; + } + + console.log(`Comment location: ${range.text}`); + const contentRange: Word.CommentContentRange = comment.contentRange; + console.log("Comment content range:", contentRange); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getRange(): Word.Range;' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.Comment#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.CommentLoadOptions): Word.Comment;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.Comment#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.Comment;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.Comment#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Comment; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: reply(replyText) + uid: 'word!Word.Comment#reply:member(1)' + package: word! + fullName: reply(replyText) + summary: Adds a new reply to the end of the comment thread. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-comments.yaml + + + // Replies to the first active comment in the selected content. + + await Word.run(async (context) => { + const text = $("#reply-text") + .val() + .toString(); + const comments: Word.CommentCollection = context.document.getSelection().getComments(); + comments.load("items"); + await context.sync(); + + const firstActiveComment: Word.Comment = comments.items.find((item) => item.resolved !== true); + if (firstActiveComment) { + const reply: Word.CommentReply = firstActiveComment.reply(text); + console.log("Reply added."); + } else { + console.warn("No active comment was found in the selection, so couldn't reply."); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'reply(replyText: string): Word.CommentReply;' + parameters: + - id: replyText + description: Required. Reply text. + type: string + return: + type: '' + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.Comment#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.CommentUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.Comment#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.Comment): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.Comment#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.Comment` object is an API object, the `toJSON` method returns a plain + JavaScript object (typed as `Word.Interfaces.CommentData`) that contains shallow copies of any loaded + child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.CommentData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.Comment#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.Comment;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.Comment#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.Comment;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.commentcollection.yml b/docs/docs-ref-autogen/word_1_9/word/word.commentcollection.yml new file mode 100644 index 0000000000..54c5c0a57e --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.commentcollection.yml @@ -0,0 +1,283 @@ +### YamlMime:TSType +name: Word.CommentCollection +uid: 'word!Word.CommentCollection:class' +package: word! +fullName: Word.CommentCollection +summary: 'Contains a collection of [Word.Comment](xref:word!Word.Comment:class) objects.' +remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-comments.yaml + + + // Replies to the first active comment in the selected content. + + await Word.run(async (context) => { + const text = $("#reply-text") + .val() + .toString(); + const comments: Word.CommentCollection = context.document.getSelection().getComments(); + comments.load("items"); + await context.sync(); + + const firstActiveComment: Word.Comment = comments.items.find((item) => item.resolved !== true); + if (firstActiveComment) { + const reply: Word.CommentReply = firstActiveComment.reply(text); + console.log("Reply added."); + } else { + console.warn("No active comment was found in the selection, so couldn't reply."); + } + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.CommentCollection#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: items + uid: 'word!Word.CommentCollection#items:member' + package: word! + fullName: items + summary: Gets the loaded child items in this collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly items: Word.Comment[];' + return: + type: '[]' + description: >- + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-comments.yaml + + + // Replies to the first active comment in the selected content. + + await Word.run(async (context) => { + const text = $("#reply-text") + .val() + .toString(); + const comments: Word.CommentCollection = context.document.getSelection().getComments(); + comments.load("items"); + await context.sync(); + + const firstActiveComment: Word.Comment = comments.items.find((item) => item.resolved !== true); + if (firstActiveComment) { + const reply: Word.CommentReply = firstActiveComment.reply(text); + console.log("Reply added."); + } else { + console.warn("No active comment was found in the selection, so couldn't reply."); + } + }); + + ``` +methods: + - name: getFirst() + uid: 'word!Word.CommentCollection#getFirst:member(1)' + package: word! + fullName: getFirst() + summary: Gets the first comment in the collection. Throws an `ItemNotFound` error if this collection is empty. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFirst(): Word.Comment;' + return: + type: '' + description: '' + - name: getFirstOrNullObject() + uid: 'word!Word.CommentCollection#getFirstOrNullObject:member(1)' + package: word! + fullName: getFirstOrNullObject() + summary: >- + Gets the first comment in the collection. If the collection is empty, then this method will return an object with + its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-comments.yaml + + + // Gets the range of the first comment in the selected content. + + await Word.run(async (context) => { + const comment: Word.Comment = context.document.getSelection().getComments().getFirstOrNullObject(); + comment.load("contentRange"); + const range: Word.Range = comment.getRange(); + range.load("text"); + await context.sync(); + + if (comment.isNullObject) { + console.warn("No comments in the selection, so no range to get."); + return; + } + + console.log(`Comment location: ${range.text}`); + const contentRange: Word.CommentContentRange = comment.contentRange; + console.log("Comment content range:", contentRange); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getFirstOrNullObject(): Word.Comment;' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.CommentCollection#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: >- + load(options?: Word.Interfaces.CommentCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): + Word.CommentCollection; + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: >- + & + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.CommentCollection#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.CommentCollection;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.CommentCollection#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CommentCollection;' + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: '' + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.CommentCollection#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.CommentCollection` object is an API object, the `toJSON` method returns + a plain JavaScript object (typed as `Word.Interfaces.CommentCollectionData`) that contains an "items" + array with shallow copies of any loaded properties from the collection's items. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.CommentCollectionData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.CommentCollection#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.CommentCollection;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.CommentCollection#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.CommentCollection;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.commentcontentrange.yml b/docs/docs-ref-autogen/word_1_9/word/word.commentcontentrange.yml new file mode 100644 index 0000000000..da3a43af80 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.commentcontentrange.yml @@ -0,0 +1,339 @@ +### YamlMime:TSType +name: Word.CommentContentRange +uid: 'word!Word.CommentContentRange:class' +package: word! +fullName: Word.CommentContentRange +summary: '' +remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-comments.yaml + + + // Gets the range of the first comment in the selected content. + + await Word.run(async (context) => { + const comment: Word.Comment = context.document.getSelection().getComments().getFirstOrNullObject(); + comment.load("contentRange"); + const range: Word.Range = comment.getRange(); + range.load("text"); + await context.sync(); + + if (comment.isNullObject) { + console.warn("No comments in the selection, so no range to get."); + return; + } + + console.log(`Comment location: ${range.text}`); + const contentRange: Word.CommentContentRange = comment.contentRange; + console.log("Comment content range:", contentRange); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: bold + uid: 'word!Word.CommentContentRange#bold:member' + package: word! + fullName: bold + summary: Specifies a value that indicates whether the comment text is bold. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'bold: boolean;' + return: + type: boolean + - name: context + uid: 'word!Word.CommentContentRange#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: hyperlink + uid: 'word!Word.CommentContentRange#hyperlink:member' + package: word! + fullName: hyperlink + summary: >- + Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted + when you set a new hyperlink on the range. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'hyperlink: string;' + return: + type: string + - name: isEmpty + uid: 'word!Word.CommentContentRange#isEmpty:member' + package: word! + fullName: isEmpty + summary: Checks whether the range length is zero. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly isEmpty: boolean;' + return: + type: boolean + - name: italic + uid: 'word!Word.CommentContentRange#italic:member' + package: word! + fullName: italic + summary: Specifies a value that indicates whether the comment text is italicized. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'italic: boolean;' + return: + type: boolean + - name: strikeThrough + uid: 'word!Word.CommentContentRange#strikeThrough:member' + package: word! + fullName: strikeThrough + summary: Specifies a value that indicates whether the comment text has a strikethrough. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'strikeThrough: boolean;' + return: + type: boolean + - name: text + uid: 'word!Word.CommentContentRange#text:member' + package: word! + fullName: text + summary: Gets the text of the comment range. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly text: string;' + return: + type: string + - name: underline + uid: 'word!Word.CommentContentRange#underline:member' + package: word! + fullName: underline + summary: Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + underline: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" + | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" + | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; + return: + type: >- + | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | + "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | + "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | + "WaveHeavy" | "WaveDouble" +methods: + - name: 'insertText(text, insertLocation)' + uid: 'word!Word.CommentContentRange#insertText:member(1)' + package: word! + fullName: 'insertText(text, insertLocation)' + summary: >- + Inserts text into at the specified location. **Note**: For the modern comment, the content range tracked + across context turns to empty if any revision to the comment is posted through the UI. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + insertText(text: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | + "After"): Word.CommentContentRange; + parameters: + - id: text + description: Required. The text to be inserted in to the CommentContentRange. + type: string + - id: insertLocation + description: 'Required. The value must be ''Replace'', ''Start'', ''End'', ''Before'', or ''After''.' + type: ' | "Replace" | "Start" | "End" | "Before" | "After"' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.CommentContentRange#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.CommentContentRangeLoadOptions): Word.CommentContentRange;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.CommentContentRange#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.CommentContentRange;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.CommentContentRange#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.CommentContentRange; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.CommentContentRange#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.CommentContentRangeUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.CommentContentRange#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.CommentContentRange): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.CommentContentRange#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.CommentContentRange` object is an API object, the `toJSON` method + returns a plain JavaScript object (typed as `Word.Interfaces.CommentContentRangeData`) that contains + shallow copies of any loaded child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.CommentContentRangeData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.CommentContentRange#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.CommentContentRange;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.CommentContentRange#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.CommentContentRange;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.commentreply.yml b/docs/docs-ref-autogen/word_1_9/word/word.commentreply.yml new file mode 100644 index 0000000000..21c4faa2bb --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.commentreply.yml @@ -0,0 +1,319 @@ +### YamlMime:TSType +name: Word.CommentReply +uid: 'word!Word.CommentReply:class' +package: word! +fullName: Word.CommentReply +summary: Represents a comment reply in the document. +remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-comments.yaml + + + // Replies to the first active comment in the selected content. + + await Word.run(async (context) => { + const text = $("#reply-text") + .val() + .toString(); + const comments: Word.CommentCollection = context.document.getSelection().getComments(); + comments.load("items"); + await context.sync(); + + const firstActiveComment: Word.Comment = comments.items.find((item) => item.resolved !== true); + if (firstActiveComment) { + const reply: Word.CommentReply = firstActiveComment.reply(text); + console.log("Reply added."); + } else { + console.warn("No active comment was found in the selection, so couldn't reply."); + } + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: authorEmail + uid: 'word!Word.CommentReply#authorEmail:member' + package: word! + fullName: authorEmail + summary: Gets the email of the comment reply's author. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly authorEmail: string;' + return: + type: string + - name: authorName + uid: 'word!Word.CommentReply#authorName:member' + package: word! + fullName: authorName + summary: Gets the name of the comment reply's author. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly authorName: string;' + return: + type: string + - name: content + uid: 'word!Word.CommentReply#content:member' + package: word! + fullName: content + summary: Specifies the comment reply's content. The string is plain text. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'content: string;' + return: + type: string + - name: contentRange + uid: 'word!Word.CommentReply#contentRange:member' + package: word! + fullName: contentRange + summary: Specifies the commentReply's content range. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'contentRange: Word.CommentContentRange;' + return: + type: '' + - name: context + uid: 'word!Word.CommentReply#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: creationDate + uid: 'word!Word.CommentReply#creationDate:member' + package: word! + fullName: creationDate + summary: Gets the creation date of the comment reply. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly creationDate: Date;' + return: + type: Date + - name: id + uid: 'word!Word.CommentReply#id:member' + package: word! + fullName: id + summary: Gets the ID of the comment reply. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly id: string;' + return: + type: string + - name: parentComment + uid: 'word!Word.CommentReply#parentComment:member' + package: word! + fullName: parentComment + summary: Gets the parent comment of this reply. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentComment: Word.Comment;' + return: + type: '' +methods: + - name: delete() + uid: 'word!Word.CommentReply#delete:member(1)' + package: word! + fullName: delete() + summary: Deletes the comment reply. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'delete(): void;' + return: + type: void + description: '' + - name: load(options) + uid: 'word!Word.CommentReply#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.CommentReplyLoadOptions): Word.CommentReply;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.CommentReply#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.CommentReply;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.CommentReply#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.CommentReply; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.CommentReply#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.CommentReplyUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.CommentReply#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.CommentReply): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.CommentReply#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.CommentReply` object is an API object, the `toJSON` method returns a + plain JavaScript object (typed as `Word.Interfaces.CommentReplyData`) that contains shallow copies of any + loaded child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.CommentReplyData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.CommentReply#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.CommentReply;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.CommentReply#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.CommentReply;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.commentreplycollection.yml b/docs/docs-ref-autogen/word_1_9/word/word.commentreplycollection.yml new file mode 100644 index 0000000000..1e0101e2ba --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.commentreplycollection.yml @@ -0,0 +1,218 @@ +### YamlMime:TSType +name: Word.CommentReplyCollection +uid: 'word!Word.CommentReplyCollection:class' +package: word! +fullName: Word.CommentReplyCollection +summary: >- + Contains a collection of [Word.CommentReply](xref:word!Word.CommentReply:class) objects. Represents all comment + replies in one comment thread. +remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-comments.yaml + + + // Gets the replies to the first comment in the selected content. + + await Word.run(async (context) => { + const comment: Word.Comment = context.document.getSelection().getComments().getFirstOrNullObject(); + comment.load("replies"); + await context.sync(); + + if (comment.isNullObject) { + console.warn("No comments in the selection, so no replies to get."); + return; + } + + const replies: Word.CommentReplyCollection = comment.replies; + console.log("Replies to the first comment:", replies); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.CommentReplyCollection#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: items + uid: 'word!Word.CommentReplyCollection#items:member' + package: word! + fullName: items + summary: Gets the loaded child items in this collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly items: Word.CommentReply[];' + return: + type: '[]' +methods: + - name: getFirst() + uid: 'word!Word.CommentReplyCollection#getFirst:member(1)' + package: word! + fullName: getFirst() + summary: Gets the first comment reply in the collection. Throws an `ItemNotFound` error if this collection is empty. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFirst(): Word.CommentReply;' + return: + type: '' + description: '' + - name: getFirstOrNullObject() + uid: 'word!Word.CommentReplyCollection#getFirstOrNullObject:member(1)' + package: word! + fullName: getFirstOrNullObject() + summary: >- + Gets the first comment reply in the collection. If the collection is empty, then this method will return an object + with its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFirstOrNullObject(): Word.CommentReply;' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.CommentReplyCollection#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: >- + load(options?: Word.Interfaces.CommentReplyCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): + Word.CommentReplyCollection; + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: >- + & + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.CommentReplyCollection#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.CommentReplyCollection;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.CommentReplyCollection#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CommentReplyCollection;' + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: '' + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.CommentReplyCollection#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.CommentReplyCollection` object is an API object, the `toJSON` method + returns a plain JavaScript object (typed as `Word.Interfaces.CommentReplyCollectionData`) that contains an + "items" array with shallow copies of any loaded properties from the collection's items. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.CommentReplyCollectionData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.CommentReplyCollection#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.CommentReplyCollection;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.CommentReplyCollection#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.CommentReplyCollection;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.contentcontrol.yml b/docs/docs-ref-autogen/word_1_9/word/word.contentcontrol.yml new file mode 100644 index 0000000000..a77f0aa299 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.contentcontrol.yml @@ -0,0 +1,2215 @@ +### YamlMime:TSType +name: Word.ContentControl +uid: 'word!Word.ContentControl:class' +package: word! +fullName: Word.ContentControl +summary: >- + Represents a content control. Content controls are bounded and potentially labeled regions in a document that serve as + containers for specific types of content. Individual content controls may contain contents such as images, tables, or + paragraphs of formatted text. Currently, only rich text, plain text, and checkbox content controls are supported. +remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the content controls collection. + const contentControls = context.document.contentControls; + + // Queue a command to load the id property for all of the content controls. + contentControls.load('id'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + if (contentControls.items.length === 0) { + console.log('No content control found.'); + } + else { + // Queue a command to load the properties on the first content control. + contentControls.items[0].load( 'appearance,' + + 'cannotDelete,' + + 'cannotEdit,' + + 'color,' + + 'id,' + + 'placeHolderText,' + + 'removeWhenEdited,' + + 'title,' + + 'text,' + + 'type,' + + 'style,' + + 'tag,' + + 'font/size,' + + 'font/name,' + + 'font/color'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Property values of the first content control:' + + ' ----- appearance: ' + contentControls.items[0].appearance + + ' ----- cannotDelete: ' + contentControls.items[0].cannotDelete + + ' ----- cannotEdit: ' + contentControls.items[0].cannotEdit + + ' ----- color: ' + contentControls.items[0].color + + ' ----- id: ' + contentControls.items[0].id + + ' ----- placeHolderText: ' + contentControls.items[0].placeholderText + + ' ----- removeWhenEdited: ' + contentControls.items[0].removeWhenEdited + + ' ----- title: ' + contentControls.items[0].title + + ' ----- text: ' + contentControls.items[0].text + + ' ----- type: ' + contentControls.items[0].type + + ' ----- style: ' + contentControls.items[0].style + + ' ----- tag: ' + contentControls.items[0].tag + + ' ----- font size: ' + contentControls.items[0].font.size + + ' ----- font name: ' + contentControls.items[0].font.name + + ' ----- font color: ' + contentControls.items[0].font.color); + } + }); + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: appearance + uid: 'word!Word.ContentControl#appearance:member' + package: word! + fullName: appearance + summary: 'Specifies the appearance of the content control. The value can be ''BoundingBox'', ''Tags'', or ''Hidden''.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'appearance: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden";' + return: + type: ' | "BoundingBox" | "Tags" | "Hidden"' + - name: cannotDelete + uid: 'word!Word.ContentControl#cannotDelete:member' + package: word! + fullName: cannotDelete + summary: >- + Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with + removeWhenEdited. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'cannotDelete: boolean;' + return: + type: boolean + - name: cannotEdit + uid: 'word!Word.ContentControl#cannotEdit:member' + package: word! + fullName: cannotEdit + summary: Specifies a value that indicates whether the user can edit the contents of the content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'cannotEdit: boolean;' + return: + type: boolean + - name: checkboxContentControl + uid: 'word!Word.ContentControl#checkboxContentControl:member' + package: word! + fullName: checkboxContentControl + summary: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. + remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-checkbox-content-control.yaml + + + // Toggles the isChecked property of the first checkbox content control found in the selection. + + await Word.run(async (context) => { + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.checkBox] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,checkboxContentControl/isChecked"); + + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,checkboxContentControl/isChecked"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.checkBox) { + console.warn("No checkbox content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + const isCheckedBefore = selectedContentControl.checkboxContentControl.isChecked; + console.log("isChecked state before:", `id: ${selectedContentControl.id} ... isChecked: ${isCheckedBefore}`); + selectedContentControl.checkboxContentControl.isChecked = !isCheckedBefore; + selectedContentControl.load("id,checkboxContentControl/isChecked"); + await context.sync(); + + console.log( + "isChecked state after:", + `id: ${selectedContentControl.id} ... isChecked: ${selectedContentControl.checkboxContentControl.isChecked}` + ); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly checkboxContentControl: Word.CheckboxContentControl;' + return: + type: '' + - name: color + uid: 'word!Word.ContentControl#color:member' + package: word! + fullName: color + summary: 'Specifies the color of the content control. Color is specified in ''\#RRGGBB'' format or by using the color name.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'color: string;' + return: + type: string + - name: comboBoxContentControl + uid: 'word!Word.ContentControl#comboBoxContentControl:member' + package: word! + fullName: comboBoxContentControl + summary: Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. + remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml + + + // Adds the provided list item to the first combo box content control in the selection. + + await Word.run(async (context) => { + const listItemText = $("#item-to-add") + .val() + .toString() + .trim(); + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.comboBox] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,comboBoxContentControl"); + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,comboBoxContentControl"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.comboBox) { + console.warn("No combo box content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + selectedContentControl.comboBoxContentControl.addListItem(listItemText); + await context.sync(); + + console.log(`List item added to control with ID ${selectedContentControl.id}: ${listItemText}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly comboBoxContentControl: Word.ComboBoxContentControl;' + return: + type: '' + - name: contentControls + uid: 'word!Word.ContentControl#contentControls:member' + package: word! + fullName: contentControls + summary: Gets the collection of content control objects in the content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly contentControls: Word.ContentControlCollection;' + return: + type: '' + - name: context + uid: 'word!Word.ContentControl#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: dropDownListContentControl + uid: 'word!Word.ContentControl#dropDownListContentControl:member' + package: word! + fullName: dropDownListContentControl + summary: Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. + remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml + + + // Adds the provided list item to the first dropdown list content control in the selection. + + await Word.run(async (context) => { + const listItemText = $("#item-to-add") + .val() + .toString() + .trim(); + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.dropDownList] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,dropDownListContentControl"); + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,dropDownListContentControl"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.dropDownList) { + console.warn("No dropdown list content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + selectedContentControl.dropDownListContentControl.addListItem(listItemText); + await context.sync(); + + console.log(`List item added to control with ID ${selectedContentControl.id}: ${listItemText}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly dropDownListContentControl: Word.DropDownListContentControl;' + return: + type: '' + - name: endnotes + uid: 'word!Word.ContentControl#endnotes:member' + package: word! + fullName: endnotes + summary: Gets the collection of endnotes in the content control. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly endnotes: Word.NoteItemCollection;' + return: + type: '' + - name: fields + uid: 'word!Word.ContentControl#fields:member' + package: word! + fullName: fields + summary: Gets the collection of field objects in the content control. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly fields: Word.FieldCollection;' + return: + type: '' + - name: font + uid: 'word!Word.ContentControl#font:member' + package: word! + fullName: font + summary: 'Gets the text format of the content control. Use this to get and set font name, size, color, and other properties.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly font: Word.Font;' + return: + type: '' + - name: footnotes + uid: 'word!Word.ContentControl#footnotes:member' + package: word! + fullName: footnotes + summary: Gets the collection of footnotes in the content control. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly footnotes: Word.NoteItemCollection;' + return: + type: '' + - name: id + uid: 'word!Word.ContentControl#id:member' + package: word! + fullName: id + summary: Gets an integer that represents the content control identifier. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly id: number;' + return: + type: number + - name: inlinePictures + uid: 'word!Word.ContentControl#inlinePictures:member' + package: word! + fullName: inlinePictures + summary: >- + Gets the collection of InlinePicture objects in the content control. The collection doesn't include floating + images. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly inlinePictures: Word.InlinePictureCollection;' + return: + type: '' + - name: lists + uid: 'word!Word.ContentControl#lists:member' + package: word! + fullName: lists + summary: Gets the collection of list objects in the content control. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly lists: Word.ListCollection;' + return: + type: '' + - name: paragraphs + uid: 'word!Word.ContentControl#paragraphs:member' + package: word! + fullName: paragraphs + summary: Gets the collection of paragraph objects in the content control. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Important: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this content control + aren't returned. From requirement set 1.3, paragraphs in such tables are also returned. + isPreview: false + isDeprecated: false + syntax: + content: 'readonly paragraphs: Word.ParagraphCollection;' + return: + type: '' + - name: parentBody + uid: 'word!Word.ContentControl#parentBody:member' + package: word! + fullName: parentBody + summary: Gets the parent body of the content control. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentBody: Word.Body;' + return: + type: '' + - name: parentContentControl + uid: 'word!Word.ContentControl#parentContentControl:member' + package: word! + fullName: parentContentControl + summary: >- + Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent + content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentContentControl: Word.ContentControl;' + return: + type: '' + - name: parentContentControlOrNullObject + uid: 'word!Word.ContentControl#parentContentControlOrNullObject:member' + package: word! + fullName: parentContentControlOrNullObject + summary: >- + Gets the content control that contains the content control. If there isn't a parent content control, then this + method will return an object with its `isNullObject` property set to `true`. For further information, see + [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentContentControlOrNullObject: Word.ContentControl;' + return: + type: '' + - name: parentTable + uid: 'word!Word.ContentControl#parentTable:member' + package: word! + fullName: parentTable + summary: Gets the table that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTable: Word.Table;' + return: + type: '' + - name: parentTableCell + uid: 'word!Word.ContentControl#parentTableCell:member' + package: word! + fullName: parentTableCell + summary: >- + Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a + table cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTableCell: Word.TableCell;' + return: + type: '' + - name: parentTableCellOrNullObject + uid: 'word!Word.ContentControl#parentTableCellOrNullObject:member' + package: word! + fullName: parentTableCellOrNullObject + summary: >- + Gets the table cell that contains the content control. If it isn't contained in a table cell, then this method + will return an object with its `isNullObject` property set to `true`. For further information, see + [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTableCellOrNullObject: Word.TableCell;' + return: + type: '' + - name: parentTableOrNullObject + uid: 'word!Word.ContentControl#parentTableOrNullObject:member' + package: word! + fullName: parentTableOrNullObject + summary: >- + Gets the table that contains the content control. If it isn't contained in a table, then this method will return + an object with its `isNullObject` property set to `true`. For further information, see [*OrNullObject + methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTableOrNullObject: Word.Table;' + return: + type: '' + - name: placeholderText + uid: 'word!Word.ContentControl#placeholderText:member' + package: word! + fullName: placeholderText + summary: >- + Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is + empty. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'placeholderText: string;' + return: + type: string + - name: removeWhenEdited + uid: 'word!Word.ContentControl#removeWhenEdited:member' + package: word! + fullName: removeWhenEdited + summary: >- + Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive + with cannotDelete. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'removeWhenEdited: boolean;' + return: + type: boolean + - name: style + uid: 'word!Word.ContentControl#style:member' + package: word! + fullName: style + summary: >- + Specifies the style name for the content control. Use this property for custom styles and localized style names. + To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'style: string;' + return: + type: string + - name: styleBuiltIn + uid: 'word!Word.ContentControl#styleBuiltIn:member' + package: word! + fullName: styleBuiltIn + summary: >- + Specifies the built-in style name for the content control. Use this property for built-in styles that are portable + between locales. To use custom styles or localized style names, see the "style" property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | + "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | + "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | + "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | + "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | + "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | + "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" + | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" + | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" + | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | + "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" + | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | + "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | + "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | + "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | + "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" + | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | + "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | + "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | + "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | + "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | + "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | + "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | + "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + return: + type: >- + | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | + "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | + "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | + "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | + "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | + "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | + "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | + "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | + "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | + "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | + "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | + "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | + "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" + | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" + | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | + "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | + "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | + "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | + "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | + "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | + "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | + "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | + "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | + "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | + "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6" + - name: subtype + uid: 'word!Word.ContentControl#subtype:member' + package: word! + fullName: subtype + summary: >- + Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', + 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and + 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + readonly subtype: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | + "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | + "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | + "RepeatingSection" | "RichText" | "PlainText"; + return: + type: >- + | "Unknown" | "RichTextInline" | "RichTextParagraphs" | + "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | + "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | + "RepeatingSection" | "RichText" | "PlainText" + - name: tables + uid: 'word!Word.ContentControl#tables:member' + package: word! + fullName: tables + summary: Gets the collection of table objects in the content control. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly tables: Word.TableCollection;' + return: + type: '' + - name: tag + uid: 'word!Word.ContentControl#tag:member' + package: word! + fullName: tag + summary: Specifies a tag to identify a content control. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-content-controls.yaml + + + // Traverses each paragraph of the document and wraps a content control on each with either a even or odd tags. + + await Word.run(async (context) => { + let paragraphs = context.document.body.paragraphs; + paragraphs.load("$none"); // Don't need any properties; just wrap each paragraph with a content control. + + await context.sync(); + + for (let i = 0; i < paragraphs.items.length; i++) { + let contentControl = paragraphs.items[i].insertContentControl(); + // For even, tag "even". + if (i % 2 === 0) { + contentControl.tag = "even"; + } else { + contentControl.tag = "odd"; + } + } + console.log("Content controls inserted: " + paragraphs.items.length); + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'tag: string;' + return: + type: string + - name: text + uid: 'word!Word.ContentControl#text:member' + package: word! + fullName: text + summary: Gets the text of the content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly text: string;' + return: + type: string + - name: title + uid: 'word!Word.ContentControl#title:member' + package: word! + fullName: title + summary: Specifies the title for a content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'title: string;' + return: + type: string + - name: type + uid: 'word!Word.ContentControl#type:member' + package: word! + fullName: type + summary: 'Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + readonly type: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | + "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | + "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | + "RepeatingSection" | "RichText" | "PlainText"; + return: + type: >- + | "Unknown" | "RichTextInline" | "RichTextParagraphs" | + "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | + "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | + "RepeatingSection" | "RichText" | "PlainText" +methods: + - name: clear() + uid: 'word!Word.ContentControl#clear:member(1)' + package: word! + fullName: clear() + summary: Clears the contents of the content control. The user can perform the undo operation on the cleared content. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the content controls collection. + const contentControls = context.document.contentControls; + + // Queue a command to load the content controls collection. + contentControls.load('text'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + + if (contentControls.items.length === 0) { + console.log("There isn't a content control in this document."); + } else { + // Queue a command to clear the contents of the first content control. + contentControls.items[0].clear(); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Content control cleared of contents.'); + } + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'clear(): void;' + return: + type: void + description: '' + - name: delete(keepContent) + uid: 'word!Word.ContentControl#delete:member(1)' + package: word! + fullName: delete(keepContent) + summary: 'Deletes the content control and its content. If `keepContent` is set to true, the content isn''t deleted.' + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Run a batch operation against the Word object model. + + await Word.run(async (context) => { + + // Create a proxy object for the content controls collection. + const contentControls = context.document.contentControls; + + // Queue a command to load the content controls collection. + contentControls.load('text'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + + if (contentControls.items.length === 0) { + console.log("There isn't a content control in this document."); + } else { + // Queue a command to delete the first content control. + // The contents will remain in the document. + contentControls.items[0].delete(true); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Content control cleared of contents.'); + } + }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/content-control-ondeleted-event.yaml + + + await Word.run(async (context) => { + const contentControls: Word.ContentControlCollection = context.document.contentControls.getByTag("forTesting"); + contentControls.load("items"); + await context.sync(); + + if (contentControls.items.length === 0) { + console.log("There are no content controls in this document."); + } else { + console.log("Control to be deleted:", contentControls.items[0]); + contentControls.items[0].delete(false); + await context.sync(); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'delete(keepContent: boolean): void;' + parameters: + - id: keepContent + description: >- + Required. Indicates whether the content should be deleted with the content control. If `keepContent` is set + to true, the content isn't deleted. + type: boolean + return: + type: void + description: '' + - name: getComments() + uid: 'word!Word.ContentControl#getComments:member(1)' + package: word! + fullName: getComments() + summary: Gets comments associated with the content control. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getComments(): Word.CommentCollection;' + return: + type: '' + description: '' + - name: getContentControls(options) + uid: 'word!Word.ContentControl#getContentControls:member(1)' + package: word! + fullName: getContentControls(options) + summary: Gets the currently supported child content controls in this content control. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Important: If specific types are provided in the options parameter, only content controls of supported types are + returned. Be aware that an exception will be thrown on using methods of a generic + [Word.ContentControl](xref:word!Word.ContentControl:class) that aren't relevant for the specific type. With time, + additional types of content controls may be supported. Therefore, your add-in should request and handle specific + types of content controls. + isPreview: false + isDeprecated: false + syntax: + content: 'getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection;' + parameters: + - id: options + description: Optional. Options that define which content controls are returned. + type: '' + return: + type: '' + description: '' + - name: getHtml() + uid: 'word!Word.ContentControl#getHtml:member(1)' + package: word! + fullName: getHtml() + summary: >- + Gets an HTML representation of the content control object. When rendered in a web page or HTML viewer, the + formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return + the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you + need exact fidelity, or consistency across platforms, use `ContentControl.getOoxml()` and convert the returned XML + to HTML. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the content controls collection that contains a specific tag. + const contentControlsWithTag = context.document.contentControls.getByTag('Customer-Address'); + + // Queue a command to load the tag property for all of content controls. + contentControlsWithTag.load('tag'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + if (contentControlsWithTag.items.length === 0) { + console.log('No content control found.'); + } + else { + // Queue a command to get the HTML contents of the first content control. + const html = contentControlsWithTag.items[0].getHtml(); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Content control HTML: ' + html.value); + } + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getHtml(): OfficeExtension.ClientResult;' + return: + type: '<string>' + description: '' + - name: getOoxml() + uid: 'word!Word.ContentControl#getOoxml:member(1)' + package: word! + fullName: getOoxml() + summary: Gets the Office Open XML (OOXML) representation of the content control object. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the content controls collection. + const contentControls = context.document.contentControls; + + // Queue a command to load the id property for all of the content controls. + contentControls.load('id'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + if (contentControls.items.length === 0) { + console.log('No content control found.'); + } + else { + // Queue a command to get the OOXML contents of the first content control. + const ooxml = contentControls.items[0].getOoxml(); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Content control OOXML: ' + ooxml.value); + } + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getOoxml(): OfficeExtension.ClientResult;' + return: + type: '<string>' + description: '' + - name: getRange(rangeLocation) + uid: 'word!Word.ContentControl#getRange:member(1)' + package: word! + fullName: getRange(rangeLocation) + summary: 'Gets the whole content control, or the starting or ending point of the content control, as a range.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + getRange(rangeLocation?: Word.RangeLocation | "Whole" | "Start" | "End" | "Before" | "After" | "Content"): + Word.Range; + parameters: + - id: rangeLocation + description: 'Optional. The range location must be ''Whole'', ''Start'', ''End'', ''Before'', ''After'', or ''Content''.' + type: ' | "Whole" | "Start" | "End" | "Before" | "After" | "Content"' + return: + type: '' + description: '' + - name: getReviewedText(changeTrackingVersion) + uid: 'word!Word.ContentControl#getReviewedText:member(1)' + package: word! + fullName: getReviewedText(changeTrackingVersion) + summary: Gets reviewed text based on ChangeTrackingVersion selection. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult;' + parameters: + - id: changeTrackingVersion + description: Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + type: '' + return: + type: '<string>' + description: '' + - name: getReviewedText(changeTrackingVersionString) + uid: 'word!Word.ContentControl#getReviewedText:member(2)' + package: word! + fullName: getReviewedText(changeTrackingVersionString) + summary: Gets reviewed text based on ChangeTrackingVersion selection. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getReviewedText(changeTrackingVersionString?: "Original" | "Current"): OfficeExtension.ClientResult;' + parameters: + - id: changeTrackingVersionString + description: Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + type: '"Original" | "Current"' + return: + type: '<string>' + description: '' + - name: 'getTextRanges(endingMarks, trimSpacing)' + uid: 'word!Word.ContentControl#getTextRanges:member(1)' + package: word! + fullName: 'getTextRanges(endingMarks, trimSpacing)' + summary: Gets the text ranges in the content control by using punctuation marks and/or other ending marks. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection;' + parameters: + - id: endingMarks + description: Required. The punctuation marks and/or other ending marks as an array of strings. + type: 'string[]' + - id: trimSpacing + description: >- + Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end + marks) from the start and end of the ranges returned in the range collection. Default is false which + indicates that spacing characters at the start and end of the ranges are included in the range collection. + type: boolean + return: + type: '' + description: '' + - name: getTrackedChanges() + uid: 'word!Word.ContentControl#getTrackedChanges:member(1)' + package: word! + fullName: getTrackedChanges() + summary: Gets the collection of the TrackedChange objects in the content control. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getTrackedChanges(): Word.TrackedChangeCollection;' + return: + type: '' + description: '' + - name: 'insertBreak(breakType, insertLocation)' + uid: 'word!Word.ContentControl#insertBreak:member(1)' + package: word! + fullName: 'insertBreak(breakType, insertLocation)' + summary: >- + Inserts a break at the specified location in the main document. This method cannot be used with 'RichTextTable', + 'RichTextTableRow' and 'RichTextTableCell' content controls. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the content controls collection. + const contentControls = context.document.contentControls; + + // Queue a command to load the id property for all of content controls. + contentControls.load('id'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + // We now will have access to the content control collection. + await context.sync(); + if (contentControls.items.length === 0) { + console.log('No content control found.'); + } + else { + // Queue a command to insert a page break after the first content control. + contentControls.items[0].insertBreak(Word.BreakType.page, Word.InsertLocation.after); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Inserted a page break after the first content control.'); + } + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | + "SectionOdd" | "Line", insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | + Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): void; + parameters: + - id: breakType + description: Required. Type of break. + type: >- + | "Page" | "Next" | "SectionNext" | "SectionContinuous" | + "SectionEven" | "SectionOdd" | "Line" + - id: insertLocation + description: 'Required. The value must be ''Start'', ''End'', ''Before'', or ''After''.' + type: >- + | | + | + | "Start" | "End" | "Before" | "After" + return: + type: void + description: '' + - name: 'insertFileFromBase64(base64File, insertLocation)' + uid: 'word!Word.ContentControl#insertFileFromBase64:member(1)' + package: word! + fullName: 'insertFileFromBase64(base64File, insertLocation)' + summary: Inserts a document into the content control at the specified location. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form + field). Consider replacing such a form field with a content control or other option appropriate for your scenario. + isPreview: false + isDeprecated: false + syntax: + content: >- + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start + | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + parameters: + - id: base64File + description: Required. The Base64-encoded content of a .docx file. + type: string + - id: insertLocation + description: >- + Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and + 'RichTextTableRow' content controls. + type: >- + | | | "Replace" | "Start" | "End" + return: + type: '' + description: '' + - name: 'insertHtml(html, insertLocation)' + uid: 'word!Word.ContentControl#insertHtml:member(1)' + package: word! + fullName: 'insertHtml(html, insertLocation)' + summary: Inserts HTML into the content control at the specified location. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the content controls collection. + const contentControls = context.document.contentControls; + + // Queue a command to load the id property for all of the content controls. + contentControls.load('id'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + if (contentControls.items.length === 0) { + console.log('No content control found.'); + } + else { + // Queue a command to put HTML into the contents of the first content control. + contentControls.items[0].insertHtml( + 'HTML content inserted into the content control.', + 'Start'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Inserted HTML in the first content control.'); + } + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | + Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + parameters: + - id: html + description: Required. The HTML to be inserted in to the content control. + type: string + - id: insertLocation + description: >- + Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and + 'RichTextTableRow' content controls. + type: >- + | | | "Replace" | "Start" | "End" + return: + type: '' + description: '' + - name: 'insertInlinePictureFromBase64(base64EncodedImage, insertLocation)' + uid: 'word!Word.ContentControl#insertInlinePictureFromBase64:member(1)' + package: word! + fullName: 'insertInlinePictureFromBase64(base64EncodedImage, insertLocation)' + summary: Inserts an inline picture into the content control at the specified location. + remarks: '\[ [API set: WordApi 1.2](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | + Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.InlinePicture; + parameters: + - id: base64EncodedImage + description: Required. The Base64-encoded image to be inserted in the content control. + type: string + - id: insertLocation + description: >- + Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and + 'RichTextTableRow' content controls. + type: >- + | | | "Replace" | "Start" | "End" + return: + type: '' + description: '' + - name: 'insertOoxml(ooxml, insertLocation)' + uid: 'word!Word.ContentControl#insertOoxml:member(1)' + package: word! + fullName: 'insertOoxml(ooxml, insertLocation)' + summary: Inserts OOXML into the content control at the specified location. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the content controls collection. + const contentControls = context.document.contentControls; + + // Queue a command to load the id property for all of the content controls. + contentControls.load('id'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + if (contentControls.items.length === 0) { + console.log('No content control found.'); + } + else { + // Queue a command to put OOXML into the contents of the first content control. + contentControls.items[0].insertOoxml("This text has formatting directly applied to achieve its font size, color, line spacing, and paragraph spacing.", "End"); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Inserted OOXML in the first content control.'); + } + }); + + // Read "Create better add-ins for Word with Office Open XML" for guidance on working with OOXML. + // https://learn.microsoft.com/office/dev/add-ins/word/create-better-add-ins-for-word-with-office-open-xml + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | + Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + parameters: + - id: ooxml + description: Required. The OOXML to be inserted in to the content control. + type: string + - id: insertLocation + description: >- + Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and + 'RichTextTableRow' content controls. + type: >- + | | | "Replace" | "Start" | "End" + return: + type: '' + description: '' + - name: 'insertParagraph(paragraphText, insertLocation)' + uid: 'word!Word.ContentControl#insertParagraph:member(1)' + package: word! + fullName: 'insertParagraph(paragraphText, insertLocation)' + summary: Inserts a paragraph at the specified location. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the content controls collection. + const contentControls = context.document.contentControls; + + // Queue a command to load the id property for all of the content controls. + contentControls.load('id'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + if (contentControls.items.length === 0) { + console.log('No content control found.'); + } + else { + // Queue a command to insert a paragraph after the first content control. + contentControls.items[0].insertParagraph('Text of the inserted paragraph.', 'After'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Inserted a paragraph after the first content control.'); + } + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | + Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): Word.Paragraph; + parameters: + - id: paragraphText + description: Required. The paragraph text to be inserted. + type: string + - id: insertLocation + description: >- + Required. The value must be 'Start', 'End', 'Before', or 'After'. 'Before' and 'After' cannot be used with + 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. + type: >- + | | + | + | "Start" | "End" | "Before" | "After" + return: + type: '' + description: '' + - name: 'insertTable(rowCount, columnCount, insertLocation, values)' + uid: 'word!Word.ContentControl#insertTable:member(1)' + package: word! + fullName: 'insertTable(rowCount, columnCount, insertLocation, values)' + summary: 'Inserts a table with the specified number of rows and columns into, or next to, a content control.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.start | + Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | + "After", values?: string[][]): Word.Table; + parameters: + - id: rowCount + description: Required. The number of rows in the table. + type: number + - id: columnCount + description: Required. The number of columns in the table. + type: number + - id: insertLocation + description: >- + Required. The value must be 'Start', 'End', 'Before', or 'After'. 'Before' and 'After' cannot be used with + 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. + type: >- + | | + | + | "Start" | "End" | "Before" | "After" + - id: values + description: Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + type: 'string[][]' + return: + type: '' + description: '' + - name: 'insertText(text, insertLocation)' + uid: 'word!Word.ContentControl#insertText:member(1)' + package: word! + fullName: 'insertText(text, insertLocation)' + summary: Inserts text into the content control at the specified location. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the content controls collection. + const contentControls = context.document.contentControls; + + // Queue a command to load the id property for all of the content controls. + contentControls.load('id'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + if (contentControls.items.length === 0) { + console.log('No content control found.'); + } + else { + // Queue a command to replace text in the first content control. + contentControls.items[0].insertText('Replaced text in the first content control.', 'Replace'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Replaced text in the first content control.'); + } + }); + + // The Silly stories add-in sample shows how to use the insertText method. + // https://aka.ms/sillystorywordaddin + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | + Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + parameters: + - id: text + description: Required. The text to be inserted in to the content control. + type: string + - id: insertLocation + description: >- + Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and + 'RichTextTableRow' content controls. + type: >- + | | | "Replace" | "Start" | "End" + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.ContentControl#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.ContentControlLoadOptions): Word.ContentControl;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: |- + + + #### Examples + + ```TypeScript + // Load all of the content control properties + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the content controls collection. + const contentControls = context.document.contentControls; + + // Queue a command to load the id property for all of the content controls. + contentControls.load('id'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + if (contentControls.items.length === 0) { + console.log('No content control found.'); + } else { + // Queue a command to load the properties on the first content control. + contentControls.items[0].load( 'appearance,' + + 'cannotDelete,' + + 'cannotEdit,' + + 'id,' + + 'placeHolderText,' + + 'removeWhenEdited,' + + 'title,' + + 'text,' + + 'type,' + + 'style,' + + 'tag,' + + 'font/size,' + + 'font/name,' + + 'font/color'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Property values of the first content control:' + + ' ----- appearance: ' + contentControls.items[0].appearance + + ' ----- cannotDelete: ' + contentControls.items[0].cannotDelete + + ' ----- cannotEdit: ' + contentControls.items[0].cannotEdit + + ' ----- color: ' + contentControls.items[0].color + + ' ----- id: ' + contentControls.items[0].id + + ' ----- placeHolderText: ' + contentControls.items[0].placeholderText + + ' ----- removeWhenEdited: ' + contentControls.items[0].removeWhenEdited + + ' ----- title: ' + contentControls.items[0].title + + ' ----- text: ' + contentControls.items[0].text + + ' ----- type: ' + contentControls.items[0].type + + ' ----- style: ' + contentControls.items[0].style + + ' ----- tag: ' + contentControls.items[0].tag + + ' ----- font size: ' + contentControls.items[0].font.size + + ' ----- font name: ' + contentControls.items[0].font.name + + ' ----- font color: ' + contentControls.items[0].font.color); + } + }); + ``` + - name: load(propertyNames) + uid: 'word!Word.ContentControl#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.ContentControl;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.ContentControl#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ContentControl; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: 'search(searchText, searchOptions)' + uid: 'word!Word.ContentControl#search:member(1)' + package: word! + fullName: 'search(searchText, searchOptions)' + summary: >- + Performs a search with the specified SearchOptions on the scope of the content control object. The search results + are a collection of range objects. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the content controls collection. + const contentControls = context.document.contentControls; + + // Queue a command to load the id property for all of the content controls. + contentControls.load('id'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + if (contentControls.items.length === 0) { + console.log('No content control found.'); + } + else { + // Queue a command to select the first content control. + contentControls.items[0].select(); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Selected the first content control.'); + } + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: |- + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + parameters: + - id: searchText + description: Required. The search text. + type: string + - id: searchOptions + description: Optional. Options for the search. + type: |- + | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + } + return: + type: '' + description: '' + - name: select(selectionMode) + uid: 'word!Word.ContentControl#select:member(1)' + package: word! + fullName: select(selectionMode) + summary: Selects the content control. This causes Word to scroll to the selection. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'select(selectionMode?: Word.SelectionMode): void;' + parameters: + - id: selectionMode + description: 'Optional. The selection mode must be ''Select'', ''Start'', or ''End''. ''Select'' is the default.' + type: '' + return: + type: void + description: '' + - name: select(selectionModeString) + uid: 'word!Word.ContentControl#select:member(2)' + package: word! + fullName: select(selectionModeString) + summary: Selects the content control. This causes Word to scroll to the selection. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'select(selectionModeString?: "Select" | "Start" | "End"): void;' + parameters: + - id: selectionModeString + description: 'Optional. The selection mode must be ''Select'', ''Start'', or ''End''. ''Select'' is the default.' + type: '"Select" | "Start" | "End"' + return: + type: void + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.ContentControl#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.ContentControlUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: >- + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-content-controls.yaml + + + // Adds title and colors to odd and even content controls and changes their appearance. + + await Word.run(async (context) => { + // Get the complete sentence (as range) associated with the insertion point. + let evenContentControls = context.document.contentControls.getByTag("even"); + let oddContentControls = context.document.contentControls.getByTag("odd"); + evenContentControls.load("length"); + oddContentControls.load("length"); + + await context.sync(); + + for (let i = 0; i < evenContentControls.items.length; i++) { + // Change a few properties and append a paragraph. + evenContentControls.items[i].set({ + color: "red", + title: "Odd ContentControl #" + (i + 1), + appearance: Word.ContentControlAppearance.tags + }); + evenContentControls.items[i].insertParagraph("This is an odd content control", "End"); + } + + for (let j = 0; j < oddContentControls.items.length; j++) { + // Change a few properties and append a paragraph. + oddContentControls.items[j].set({ + color: "green", + title: "Even ContentControl #" + (j + 1), + appearance: "Tags" + }); + oddContentControls.items[j].insertHtml("This is an even content control", "End"); + } + + await context.sync(); + }); + + ``` + - name: set(properties) + uid: 'word!Word.ContentControl#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.ContentControl): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: 'split(delimiters, multiParagraphs, trimDelimiters, trimSpacing)' + uid: 'word!Word.ContentControl#split:member(1)' + package: word! + fullName: 'split(delimiters, multiParagraphs, trimDelimiters, trimSpacing)' + summary: Splits the content control into child ranges by using delimiters. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + split(delimiters: string[], multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean): + Word.RangeCollection; + parameters: + - id: delimiters + description: Required. The delimiters as an array of strings. + type: 'string[]' + - id: multiParagraphs + description: >- + Optional. Indicates whether a returned child range can cover multiple paragraphs. Default is false which + indicates that the paragraph boundaries are also used as delimiters. + type: boolean + - id: trimDelimiters + description: >- + Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false + which indicates that the delimiters are included in the ranges returned in the range collection. + type: boolean + - id: trimSpacing + description: >- + Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end + marks) from the start and end of the ranges returned in the range collection. Default is false which + indicates that spacing characters at the start and end of the ranges are included in the range collection. + type: boolean + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.ContentControl#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.ContentControl` object is an API object, the `toJSON` method returns a + plain JavaScript object (typed as `Word.Interfaces.ContentControlData`) that contains shallow copies of + any loaded child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.ContentControlData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.ContentControl#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.ContentControl;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.ContentControl#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.ContentControl;' + return: + type: '' + description: '' +events: + - name: onDataChanged + uid: 'word!Word.ContentControl#onDataChanged:member' + package: word! + fullName: onDataChanged + summary: >- + Occurs when data within the content control are changed. To get the new text, load this content control in the + handler. To get the old text, do not load it. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/content-control-ondatachanged-event.yaml + + + await Word.run(async (context) => { + const contentControls: Word.ContentControlCollection = context.document.contentControls; + contentControls.load("items"); + await context.sync(); + + // Register the onDataChanged event handler on each content control. + if (contentControls.items.length === 0) { + console.log("There aren't any content controls in this document so can't register event handlers."); + } else { + for (let i = 0; i < contentControls.items.length; i++) { + eventContexts[i] = contentControls.items[i].onDataChanged.add(contentControlDataChanged); + contentControls.items[i].track(); + } + + await context.sync(); + + console.log("Added event handlers for when data is changed in content controls."); + } + }); + + + ... + + + async function contentControlDataChanged(event: Word.ContentControlDataChangedEventArgs) { + await Word.run(async (context) => { + console.log(`${event.eventType} event detected. IDs of content controls where data was changed:`, event.ids); + }); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly onDataChanged: OfficeExtension.EventHandlers;' + return: + type: >- + <> + - name: onDeleted + uid: 'word!Word.ContentControl#onDeleted:member' + package: word! + fullName: onDeleted + summary: >- + Occurs when the content control is deleted. Do not load this content control in the handler, otherwise you won't + be able to get its original properties. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/content-control-ondeleted-event.yaml + + + await Word.run(async (context) => { + const contentControls: Word.ContentControlCollection = context.document.contentControls; + contentControls.load("items"); + await context.sync(); + + // Register the onDeleted event handler on each content control. + if (contentControls.items.length === 0) { + console.log("There aren't any content controls in this document so can't register event handlers."); + } else { + for (let i = 0; i < contentControls.items.length; i++) { + eventContexts[i] = contentControls.items[i].onDeleted.add(contentControlDeleted); + contentControls.items[i].track(); + } + + await context.sync(); + + console.log("Added event handlers for when content controls are deleted."); + } + }); + + + ... + + + async function contentControlDeleted(event: Word.ContentControlDeletedEventArgs) { + await Word.run(async (context) => { + console.log(`${event.eventType} event detected. IDs of content controls that were deleted:`, event.ids); + }); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly onDeleted: OfficeExtension.EventHandlers;' + return: + type: >- + <> + - name: onEntered + uid: 'word!Word.ContentControl#onEntered:member' + package: word! + fullName: onEntered + summary: Occurs when the content control is entered. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/content-control-onentered-event.yaml + + + await Word.run(async (context) => { + const contentControls: Word.ContentControlCollection = context.document.contentControls; + contentControls.load("items"); + await context.sync(); + + // Register the onEntered event handler on each content control. + if (contentControls.items.length === 0) { + console.log("There aren't any content controls in this document so can't register event handlers."); + } else { + for (let i = 0; i < contentControls.items.length; i++) { + eventContexts[i] = contentControls.items[i].onEntered.add(contentControlEntered); + contentControls.items[i].track(); + } + + await context.sync(); + + console.log("Added event handlers for when the cursor is placed in content controls."); + } + }); + + + ... + + + async function contentControlEntered(event: Word.ContentControlEnteredEventArgs) { + await Word.run(async (context) => { + console.log(`${event.eventType} event detected. ID of content control that was entered: ${event.ids[0]}`); + }); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly onEntered: OfficeExtension.EventHandlers;' + return: + type: >- + <> + - name: onExited + uid: 'word!Word.ContentControl#onExited:member' + package: word! + fullName: onExited + summary: 'Occurs when the content control is exited, for example, when the cursor leaves the content control.' + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/content-control-onexited-event.yaml + + + await Word.run(async (context) => { + const contentControls: Word.ContentControlCollection = context.document.contentControls; + contentControls.load("items"); + await context.sync(); + + // Register the onExited event handler on each content control. + if (contentControls.items.length === 0) { + console.log("There aren't any content controls in this document so can't register event handlers."); + } else { + for (let i = 0; i < contentControls.items.length; i++) { + eventContexts[i] = contentControls.items[i].onExited.add(contentControlExited); + contentControls.items[i].track(); + } + + await context.sync(); + + console.log("Added event handlers for when the cursor is removed from within content controls."); + } + }); + + + ... + + + async function contentControlExited(event: Word.ContentControlExitedEventArgs) { + await Word.run(async (context) => { + console.log(`${event.eventType} event detected. ID of content control that was exited: ${event.ids[0]}`); + }); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly onExited: OfficeExtension.EventHandlers;' + return: + type: >- + <> + - name: onSelectionChanged + uid: 'word!Word.ContentControl#onSelectionChanged:member' + package: word! + fullName: onSelectionChanged + summary: Occurs when selection within the content control is changed. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/content-control-onselectionchanged-event.yaml + + + await Word.run(async (context) => { + const contentControls: Word.ContentControlCollection = context.document.contentControls; + contentControls.load("items"); + await context.sync(); + + if (contentControls.items.length === 0) { + console.log("There aren't any content controls in this document so can't register event handlers."); + } else { + for (let i = 0; i < contentControls.items.length; i++) { + eventContexts[i] = contentControls.items[i].onSelectionChanged.add(contentControlSelectionChanged); + contentControls.items[i].track(); + } + + await context.sync(); + + console.log("Added event handlers for when selections are changed in content controls."); + } + }); + + + ... + + + async function contentControlSelectionChanged(event: Word.ContentControlSelectionChangedEventArgs) { + await Word.run(async (context) => { + console.log(`${event.eventType} event detected. IDs of content controls where selection was changed:`, event.ids); + }); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly onSelectionChanged: OfficeExtension.EventHandlers;' + return: + type: >- + <> +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.contentcontroladdedeventargs.yml b/docs/docs-ref-autogen/word_1_9/word/word.contentcontroladdedeventargs.yml new file mode 100644 index 0000000000..3eceb248f1 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.contentcontroladdedeventargs.yml @@ -0,0 +1,87 @@ +### YamlMime:TSType +name: Word.ContentControlAddedEventArgs +uid: 'word!Word.ContentControlAddedEventArgs:interface' +package: word! +fullName: Word.ContentControlAddedEventArgs +summary: Provides information about the content control that raised contentControlAdded event. +remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/content-control-onadded-event.yaml + + + // Registers the onAdded event handler on the document. + + await Word.run(async (context) => { + eventContext = context.document.onContentControlAdded.add(contentControlAdded); + await context.sync(); + + console.log("Added event handler for when content controls are added."); + }); + + + ... + + + async function contentControlAdded(event: Word.ContentControlAddedEventArgs) { + await Word.run(async (context) => { + console.log(`${event.eventType} event detected. IDs of content controls that were added:`, event.ids); + }); + } + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: eventType + uid: 'word!Word.ContentControlAddedEventArgs#eventType:member' + package: word! + fullName: eventType + summary: The event type. See Word.EventType for details. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | + "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | + "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | + "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; + return: + type: >- + | "ContentControlDeleted" | "ContentControlSelectionChanged" | + "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | + "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | + "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction" + - name: ids + uid: 'word!Word.ContentControlAddedEventArgs#ids:member' + package: word! + fullName: ids + summary: Gets the content control IDs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'ids: number[];' + return: + type: 'number[]' + - name: source + uid: 'word!Word.ContentControlAddedEventArgs#source:member' + package: word! + fullName: source + summary: The source of the event. It can be local or remote (through coauthoring). + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'source: Word.EventSource | "Local" | "Remote";' + return: + type: ' | "Local" | "Remote"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.contentcontrolappearance.yml b/docs/docs-ref-autogen/word_1_9/word/word.contentcontrolappearance.yml new file mode 100644 index 0000000000..c608a70533 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.contentcontrolappearance.yml @@ -0,0 +1,84 @@ +### YamlMime:TSEnum +name: Word.ContentControlAppearance +uid: 'word!Word.ContentControlAppearance:enum' +package: word! +fullName: Word.ContentControlAppearance +summary: ContentControl appearance. +remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Content control appearance options are BoundingBox, Tags, or Hidden. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-content-controls.yaml + + + // Adds title and colors to odd and even content controls and changes their appearance. + + await Word.run(async (context) => { + // Get the complete sentence (as range) associated with the insertion point. + let evenContentControls = context.document.contentControls.getByTag("even"); + let oddContentControls = context.document.contentControls.getByTag("odd"); + evenContentControls.load("length"); + oddContentControls.load("length"); + + await context.sync(); + + for (let i = 0; i < evenContentControls.items.length; i++) { + // Change a few properties and append a paragraph. + evenContentControls.items[i].set({ + color: "red", + title: "Odd ContentControl #" + (i + 1), + appearance: Word.ContentControlAppearance.tags + }); + evenContentControls.items[i].insertParagraph("This is an odd content control", "End"); + } + + for (let j = 0; j < oddContentControls.items.length; j++) { + // Change a few properties and append a paragraph. + oddContentControls.items[j].set({ + color: "green", + title: "Even ContentControl #" + (j + 1), + appearance: "Tags" + }); + oddContentControls.items[j].insertHtml("This is an even content control", "End"); + } + + await context.sync(); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: boundingBox + uid: 'word!Word.ContentControlAppearance.boundingBox:member' + package: word! + summary: |- + Represents a content control shown as a shaded rectangle or bounding box (with optional title). + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"BoundingBox"' + - name: hidden + uid: 'word!Word.ContentControlAppearance.hidden:member' + package: word! + summary: |- + Represents a content control that isn't shown. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Hidden"' + - name: tags + uid: 'word!Word.ContentControlAppearance.tags:member' + package: word! + summary: |- + Represents a content control shown as start and end markers. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Tags"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.contentcontrolcollection.yml b/docs/docs-ref-autogen/word_1_9/word/word.contentcontrolcollection.yml new file mode 100644 index 0000000000..018942a2fa --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.contentcontrolcollection.yml @@ -0,0 +1,583 @@ +### YamlMime:TSType +name: Word.ContentControlCollection +uid: 'word!Word.ContentControlCollection:class' +package: word! +fullName: Word.ContentControlCollection +summary: >- + Contains a collection of [Word.ContentControl](xref:word!Word.ContentControl:class) objects. Content controls are + bounded and potentially labeled regions in a document that serve as containers for specific types of content. + Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, + only rich text and plain text content controls are supported. +remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/90-scenarios/doc-assembly.yaml + + + await Word.run(async (context) => { + const contentControls: Word.ContentControlCollection = context.document.contentControls.getByTag("customer"); + contentControls.load("text"); + + await context.sync(); + + for (let i = 0; i < contentControls.items.length; i++) { + contentControls.items[i].insertText("Fabrikam", "Replace"); + } + + await context.sync(); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.ContentControlCollection#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: items + uid: 'word!Word.ContentControlCollection#items:member' + package: word! + fullName: items + summary: Gets the loaded child items in this collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly items: Word.ContentControl[];' + return: + type: '[]' +methods: + - name: getByChangeTrackingStates(changeTrackingStates) + uid: 'word!Word.ContentControlCollection#getByChangeTrackingStates:member(1)' + package: word! + fullName: getByChangeTrackingStates(changeTrackingStates) + summary: Gets the content controls that have the specified tracking state. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getByChangeTrackingStates(changeTrackingStates: Word.ChangeTrackingState[]): Word.ContentControlCollection;' + parameters: + - id: changeTrackingStates + description: Required. An array of content control change tracking states. + type: '[]' + return: + type: '' + description: '' + - name: getById(id) + uid: 'word!Word.ContentControlCollection#getById:member(1)' + package: word! + fullName: getById(id) + summary: >- + Gets a content control by its identifier. Throws an `ItemNotFound` error if there isn't a content control with the + identifier in this collection. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the content control that contains a specific id. + const contentControl = context.document.contentControls.getById(30086310); + + // Queue a command to load the text property for a content control. + contentControl.load('text'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('The content control with that Id has been found in this document.'); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getById(id: number): Word.ContentControl;' + parameters: + - id: id + description: Required. A content control identifier. + type: number + return: + type: '' + description: '' + - name: getByIdOrNullObject(id) + uid: 'word!Word.ContentControlCollection#getByIdOrNullObject:member(1)' + package: word! + fullName: getByIdOrNullObject(id) + summary: >- + Gets a content control by its identifier. If there isn't a content control with the identifier in this collection, + then this method will return an object with its `isNullObject` property set to `true`. For further + information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: |- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the content control that contains a specific id. + const contentControl = context.document.contentControls.getByIdOrNullObject(30086310); + + // Queue a command to load the text property for a content control. + contentControl.load('text'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + if (contentControl.isNullObject) { + console.log('There is no content control with that ID.') + } else { + console.log('The content control with that ID has been found in this document.'); + } + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getByIdOrNullObject(id: number): Word.ContentControl;' + parameters: + - id: id + description: Required. A content control identifier. + type: number + return: + type: '' + description: '' + - name: getByTag(tag) + uid: 'word!Word.ContentControlCollection#getByTag:member(1)' + package: word! + fullName: getByTag(tag) + summary: Gets the content controls that have the specified tag. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/90-scenarios/doc-assembly.yaml + + + await Word.run(async (context) => { + const contentControls: Word.ContentControlCollection = context.document.contentControls.getByTag("customer"); + contentControls.load("text"); + + await context.sync(); + + for (let i = 0; i < contentControls.items.length; i++) { + contentControls.items[i].insertText("Fabrikam", "Replace"); + } + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getByTag(tag: string): Word.ContentControlCollection;' + parameters: + - id: tag + description: Required. A tag set on a content control. + type: string + return: + type: '' + description: '' + - name: getByTitle(title) + uid: 'word!Word.ContentControlCollection#getByTitle:member(1)' + package: word! + fullName: getByTitle(title) + summary: Gets the content controls that have the specified title. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the content controls collection that contains a specific title. + const contentControlsWithTitle = context.document.contentControls.getByTitle('Enter Customer Address Here'); + + // Queue a command to load the text property for all of content controls with a specific title. + contentControlsWithTitle.load('text'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + if (contentControlsWithTitle.items.length === 0) { + console.log( + "There isn't a content control with a title of 'Enter Customer Address Here' in this document."); + } else { + console.log( + "The first content control with the title of 'Enter Customer Address Here' has this text: " + + contentControlsWithTitle.items[0].text); + } + }); + + // The Word-Add-in-DocumentAssembly sample has another example of using the getByTitle method. + // https://github.com/OfficeDev/Word-Add-in-DocumentAssembly + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getByTitle(title: string): Word.ContentControlCollection;' + parameters: + - id: title + description: Required. The title of a content control. + type: string + return: + type: '' + description: '' + - name: getByTypes(types) + uid: 'word!Word.ContentControlCollection#getByTypes:member(1)' + package: word! + fullName: getByTypes(types) + summary: Gets the content controls that have the specified types. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getByTypes(types: Word.ContentControlType[]): Word.ContentControlCollection;' + parameters: + - id: types + description: Required. An array of content control types. + type: '[]' + return: + type: '' + description: '' + - name: getFirst() + uid: 'word!Word.ContentControlCollection#getFirst:member(1)' + package: word! + fullName: getFirst() + summary: Gets the first content control in this collection. Throws an `ItemNotFound` error if this collection is empty. + remarks: |- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the first content control in the document. + const contentControl = context.document.contentControls.getFirstOrNullObject(); + + // Queue a command to load the text property for a content control. + contentControl.load('text'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + if (contentControl.isNullObject) { + console.log('There are no content controls in this document.') + } else { + console.log('The first content control has been found in this document.'); + } + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getFirst(): Word.ContentControl;' + return: + type: '' + description: '' + - name: getFirstOrNullObject() + uid: 'word!Word.ContentControlCollection#getFirstOrNullObject:member(1)' + package: word! + fullName: getFirstOrNullObject() + summary: >- + Gets the first content control in this collection. If this collection is empty, then this method will return an + object with its `isNullObject` property set to `true`. For further information, see [*OrNullObject + methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-checkbox-content-control.yaml + + + // Toggles the isChecked property of the first checkbox content control found in the selection. + + await Word.run(async (context) => { + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.checkBox] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,checkboxContentControl/isChecked"); + + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,checkboxContentControl/isChecked"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.checkBox) { + console.warn("No checkbox content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + const isCheckedBefore = selectedContentControl.checkboxContentControl.isChecked; + console.log("isChecked state before:", `id: ${selectedContentControl.id} ... isChecked: ${isCheckedBefore}`); + selectedContentControl.checkboxContentControl.isChecked = !isCheckedBefore; + selectedContentControl.load("id,checkboxContentControl/isChecked"); + await context.sync(); + + console.log( + "isChecked state after:", + `id: ${selectedContentControl.id} ... isChecked: ${selectedContentControl.checkboxContentControl.isChecked}` + ); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getFirstOrNullObject(): Word.ContentControl;' + return: + type: '' + description: '' + - name: getItem(id) + uid: 'word!Word.ContentControlCollection#getItem:member(1)' + package: word! + fullName: getItem(id) + summary: Gets a content control by its ID. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getItem(id: number): Word.ContentControl;' + parameters: + - id: id + description: The content control's ID. + type: number + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.ContentControlCollection#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: >- + load(options?: Word.Interfaces.ContentControlCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): + Word.ContentControlCollection; + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: >- + & + return: + type: '' + description: |- + + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the content controls collection. + const contentControls = context.document.contentControls; + + // Queue a command to load the id property for all of the content controls. + contentControls.load('id'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + if (contentControls.items.length === 0) { + console.log('No content control found.'); + } + else { + // Queue a command to load the properties on the first content control. + contentControls.items[0].load( 'appearance,' + + 'cannotDelete,' + + 'cannotEdit,' + + 'color,' + + 'id,' + + 'placeHolderText,' + + 'removeWhenEdited,' + + 'title,' + + 'text,' + + 'type,' + + 'style,' + + 'tag,' + + 'font/size,' + + 'font/name,' + + 'font/color'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Property values of the first content control:' + + ' ----- appearance: ' + contentControls.items[0].appearance + + ' ----- cannotDelete: ' + contentControls.items[0].cannotDelete + + ' ----- cannotEdit: ' + contentControls.items[0].cannotEdit + + ' ----- color: ' + contentControls.items[0].color + + ' ----- id: ' + contentControls.items[0].id + + ' ----- placeHolderText: ' + contentControls.items[0].placeholderText + + ' ----- removeWhenEdited: ' + contentControls.items[0].removeWhenEdited + + ' ----- title: ' + contentControls.items[0].title + + ' ----- text: ' + contentControls.items[0].text + + ' ----- type: ' + contentControls.items[0].type + + ' ----- style: ' + contentControls.items[0].style + + ' ----- tag: ' + contentControls.items[0].tag + + ' ----- font size: ' + contentControls.items[0].font.size + + ' ----- font name: ' + contentControls.items[0].font.name + + ' ----- font color: ' + contentControls.items[0].font.color); + } + }); + + // The Silly stories add-in sample shows how the load method is used + // to load the content control collection with the tag and title properties. + // https://aka.ms/sillystorywordaddin + ``` + - name: load(propertyNames) + uid: 'word!Word.ContentControlCollection#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.ContentControlCollection;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.ContentControlCollection#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ContentControlCollection;' + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: '' + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.ContentControlCollection#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.ContentControlCollection` object is an API object, the `toJSON` method + returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlCollectionData`) that contains + an "items" array with shallow copies of any loaded properties from the collection's items. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.ContentControlCollectionData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.ContentControlCollection#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.ContentControlCollection;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.ContentControlCollection#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.ContentControlCollection;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.contentcontroldatachangedeventargs.yml b/docs/docs-ref-autogen/word_1_9/word/word.contentcontroldatachangedeventargs.yml new file mode 100644 index 0000000000..ec8f6b202e --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.contentcontroldatachangedeventargs.yml @@ -0,0 +1,98 @@ +### YamlMime:TSType +name: Word.ContentControlDataChangedEventArgs +uid: 'word!Word.ContentControlDataChangedEventArgs:interface' +package: word! +fullName: Word.ContentControlDataChangedEventArgs +summary: Provides information about the content control that raised contentControlDataChanged event. +remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/content-control-ondatachanged-event.yaml + + + await Word.run(async (context) => { + const contentControls: Word.ContentControlCollection = context.document.contentControls; + contentControls.load("items"); + await context.sync(); + + // Register the onDataChanged event handler on each content control. + if (contentControls.items.length === 0) { + console.log("There aren't any content controls in this document so can't register event handlers."); + } else { + for (let i = 0; i < contentControls.items.length; i++) { + eventContexts[i] = contentControls.items[i].onDataChanged.add(contentControlDataChanged); + contentControls.items[i].track(); + } + + await context.sync(); + + console.log("Added event handlers for when data is changed in content controls."); + } + }); + + + ... + + + async function contentControlDataChanged(event: Word.ContentControlDataChangedEventArgs) { + await Word.run(async (context) => { + console.log(`${event.eventType} event detected. IDs of content controls where data was changed:`, event.ids); + }); + } + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: eventType + uid: 'word!Word.ContentControlDataChangedEventArgs#eventType:member' + package: word! + fullName: eventType + summary: The event type. See Word.EventType for details. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | + "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | + "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | + "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; + return: + type: >- + | "ContentControlDeleted" | "ContentControlSelectionChanged" | + "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | + "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | + "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction" + - name: ids + uid: 'word!Word.ContentControlDataChangedEventArgs#ids:member' + package: word! + fullName: ids + summary: Gets the content control IDs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'ids: number[];' + return: + type: 'number[]' + - name: source + uid: 'word!Word.ContentControlDataChangedEventArgs#source:member' + package: word! + fullName: source + summary: The source of the event. It can be local or remote (through coauthoring). + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'source: Word.EventSource | "Local" | "Remote";' + return: + type: ' | "Local" | "Remote"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.contentcontroldeletedeventargs.yml b/docs/docs-ref-autogen/word_1_9/word/word.contentcontroldeletedeventargs.yml new file mode 100644 index 0000000000..df7839f1c4 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.contentcontroldeletedeventargs.yml @@ -0,0 +1,98 @@ +### YamlMime:TSType +name: Word.ContentControlDeletedEventArgs +uid: 'word!Word.ContentControlDeletedEventArgs:interface' +package: word! +fullName: Word.ContentControlDeletedEventArgs +summary: Provides information about the content control that raised contentControlDeleted event. +remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/content-control-ondeleted-event.yaml + + + await Word.run(async (context) => { + const contentControls: Word.ContentControlCollection = context.document.contentControls; + contentControls.load("items"); + await context.sync(); + + // Register the onDeleted event handler on each content control. + if (contentControls.items.length === 0) { + console.log("There aren't any content controls in this document so can't register event handlers."); + } else { + for (let i = 0; i < contentControls.items.length; i++) { + eventContexts[i] = contentControls.items[i].onDeleted.add(contentControlDeleted); + contentControls.items[i].track(); + } + + await context.sync(); + + console.log("Added event handlers for when content controls are deleted."); + } + }); + + + ... + + + async function contentControlDeleted(event: Word.ContentControlDeletedEventArgs) { + await Word.run(async (context) => { + console.log(`${event.eventType} event detected. IDs of content controls that were deleted:`, event.ids); + }); + } + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: eventType + uid: 'word!Word.ContentControlDeletedEventArgs#eventType:member' + package: word! + fullName: eventType + summary: The event type. See Word.EventType for details. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | + "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | + "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | + "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; + return: + type: >- + | "ContentControlDeleted" | "ContentControlSelectionChanged" | + "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | + "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | + "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction" + - name: ids + uid: 'word!Word.ContentControlDeletedEventArgs#ids:member' + package: word! + fullName: ids + summary: Gets the content control IDs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'ids: number[];' + return: + type: 'number[]' + - name: source + uid: 'word!Word.ContentControlDeletedEventArgs#source:member' + package: word! + fullName: source + summary: The source of the event. It can be local or remote (through coauthoring). + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'source: Word.EventSource | "Local" | "Remote";' + return: + type: ' | "Local" | "Remote"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.contentcontrolenteredeventargs.yml b/docs/docs-ref-autogen/word_1_9/word/word.contentcontrolenteredeventargs.yml new file mode 100644 index 0000000000..461e789f68 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.contentcontrolenteredeventargs.yml @@ -0,0 +1,98 @@ +### YamlMime:TSType +name: Word.ContentControlEnteredEventArgs +uid: 'word!Word.ContentControlEnteredEventArgs:interface' +package: word! +fullName: Word.ContentControlEnteredEventArgs +summary: Provides information about the content control that raised contentControlEntered event. +remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/content-control-onentered-event.yaml + + + await Word.run(async (context) => { + const contentControls: Word.ContentControlCollection = context.document.contentControls; + contentControls.load("items"); + await context.sync(); + + // Register the onEntered event handler on each content control. + if (contentControls.items.length === 0) { + console.log("There aren't any content controls in this document so can't register event handlers."); + } else { + for (let i = 0; i < contentControls.items.length; i++) { + eventContexts[i] = contentControls.items[i].onEntered.add(contentControlEntered); + contentControls.items[i].track(); + } + + await context.sync(); + + console.log("Added event handlers for when the cursor is placed in content controls."); + } + }); + + + ... + + + async function contentControlEntered(event: Word.ContentControlEnteredEventArgs) { + await Word.run(async (context) => { + console.log(`${event.eventType} event detected. ID of content control that was entered: ${event.ids[0]}`); + }); + } + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: eventType + uid: 'word!Word.ContentControlEnteredEventArgs#eventType:member' + package: word! + fullName: eventType + summary: The event type. See Word.EventType for details. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | + "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | + "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | + "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; + return: + type: >- + | "ContentControlDeleted" | "ContentControlSelectionChanged" | + "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | + "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | + "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction" + - name: ids + uid: 'word!Word.ContentControlEnteredEventArgs#ids:member' + package: word! + fullName: ids + summary: Gets the content control IDs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'ids: number[];' + return: + type: 'number[]' + - name: source + uid: 'word!Word.ContentControlEnteredEventArgs#source:member' + package: word! + fullName: source + summary: The source of the event. It can be local or remote (through coauthoring). + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'source: Word.EventSource | "Local" | "Remote";' + return: + type: ' | "Local" | "Remote"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.contentcontrolexitedeventargs.yml b/docs/docs-ref-autogen/word_1_9/word/word.contentcontrolexitedeventargs.yml new file mode 100644 index 0000000000..b738aada50 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.contentcontrolexitedeventargs.yml @@ -0,0 +1,98 @@ +### YamlMime:TSType +name: Word.ContentControlExitedEventArgs +uid: 'word!Word.ContentControlExitedEventArgs:interface' +package: word! +fullName: Word.ContentControlExitedEventArgs +summary: Provides information about the content control that raised contentControlExited event. +remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/content-control-onexited-event.yaml + + + await Word.run(async (context) => { + const contentControls: Word.ContentControlCollection = context.document.contentControls; + contentControls.load("items"); + await context.sync(); + + // Register the onExited event handler on each content control. + if (contentControls.items.length === 0) { + console.log("There aren't any content controls in this document so can't register event handlers."); + } else { + for (let i = 0; i < contentControls.items.length; i++) { + eventContexts[i] = contentControls.items[i].onExited.add(contentControlExited); + contentControls.items[i].track(); + } + + await context.sync(); + + console.log("Added event handlers for when the cursor is removed from within content controls."); + } + }); + + + ... + + + async function contentControlExited(event: Word.ContentControlExitedEventArgs) { + await Word.run(async (context) => { + console.log(`${event.eventType} event detected. ID of content control that was exited: ${event.ids[0]}`); + }); + } + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: eventType + uid: 'word!Word.ContentControlExitedEventArgs#eventType:member' + package: word! + fullName: eventType + summary: The event type. See Word.EventType for details. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | + "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | + "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | + "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; + return: + type: >- + | "ContentControlDeleted" | "ContentControlSelectionChanged" | + "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | + "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | + "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction" + - name: ids + uid: 'word!Word.ContentControlExitedEventArgs#ids:member' + package: word! + fullName: ids + summary: Gets the content control IDs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'ids: number[];' + return: + type: 'number[]' + - name: source + uid: 'word!Word.ContentControlExitedEventArgs#source:member' + package: word! + fullName: source + summary: The source of the event. It can be local or remote (through coauthoring). + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'source: Word.EventSource | "Local" | "Remote";' + return: + type: ' | "Local" | "Remote"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.contentcontrollistitem.yml b/docs/docs-ref-autogen/word_1_9/word/word.contentcontrollistitem.yml new file mode 100644 index 0000000000..167fd38ad8 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.contentcontrollistitem.yml @@ -0,0 +1,429 @@ +### YamlMime:TSType +name: Word.ContentControlListItem +uid: 'word!Word.ContentControlListItem:class' +package: word! +fullName: Word.ContentControlListItem +summary: Represents a list item in a dropdown list or combo box content control. +remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml + + + // Deletes the provided list item from the first dropdown list content control in the selection. + + await Word.run(async (context) => { + const listItemText = $("#item-to-delete") + .val() + .toString() + .trim(); + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.dropDownList] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,dropDownListContentControl"); + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,dropDownListContentControl"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.dropDownList) { + console.warn("No dropdown list content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + let selectedDropdownList: Word.DropDownListContentControl = selectedContentControl.dropDownListContentControl; + selectedDropdownList.listItems.load("items/*"); + await context.sync(); + + let listItems: Word.ContentControlListItemCollection = selectedContentControl.dropDownListContentControl.listItems; + let itemToDelete: Word.ContentControlListItem = listItems.items.find((item) => item.displayText === listItemText); + if (!itemToDelete) { + console.warn(`List item doesn't exist in control with ID ${selectedContentControl.id}: ${listItemText}`) + return; + } + + itemToDelete.delete(); + await context.sync(); + + console.log(`List item deleted from control with ID ${selectedContentControl.id}: ${listItemText}`); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.ContentControlListItem#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: displayText + uid: 'word!Word.ContentControlListItem#displayText:member' + package: word! + fullName: displayText + summary: Specifies the display text of a list item for a dropdown list or combo box content control. + remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml + + + // Deletes the provided list item from the first dropdown list content control in the selection. + + await Word.run(async (context) => { + const listItemText = $("#item-to-delete") + .val() + .toString() + .trim(); + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.dropDownList] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,dropDownListContentControl"); + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,dropDownListContentControl"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.dropDownList) { + console.warn("No dropdown list content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + let selectedDropdownList: Word.DropDownListContentControl = selectedContentControl.dropDownListContentControl; + selectedDropdownList.listItems.load("items/*"); + await context.sync(); + + let listItems: Word.ContentControlListItemCollection = selectedContentControl.dropDownListContentControl.listItems; + let itemToDelete: Word.ContentControlListItem = listItems.items.find((item) => item.displayText === listItemText); + if (!itemToDelete) { + console.warn(`List item doesn't exist in control with ID ${selectedContentControl.id}: ${listItemText}`) + return; + } + + itemToDelete.delete(); + await context.sync(); + + console.log(`List item deleted from control with ID ${selectedContentControl.id}: ${listItemText}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'displayText: string;' + return: + type: string + - name: index + uid: 'word!Word.ContentControlListItem#index:member' + package: word! + fullName: index + summary: Specifies the index location of a content control list item in the collection of list items. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'index: number;' + return: + type: number + - name: value + uid: 'word!Word.ContentControlListItem#value:member' + package: word! + fullName: value + summary: Specifies the programmatic value of a list item for a dropdown list or combo box content control. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'value: string;' + return: + type: string +methods: + - name: delete() + uid: 'word!Word.ContentControlListItem#delete:member(1)' + package: word! + fullName: delete() + summary: Deletes the list item. + remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml + + + // Deletes the provided list item from the first combo box content control in the selection. + + await Word.run(async (context) => { + const listItemText = $("#item-to-delete") + .val() + .toString() + .trim(); + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.comboBox] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,comboBoxContentControl"); + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,comboBoxContentControl"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.comboBox) { + console.warn("No combo box content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + let selectedComboBox: Word.ComboBoxContentControl = selectedContentControl.comboBoxContentControl; + selectedComboBox.listItems.load("items/*"); + await context.sync(); + + let listItems: Word.ContentControlListItemCollection = selectedContentControl.comboBoxContentControl.listItems; + let itemToDelete: Word.ContentControlListItem = listItems.items.find((item) => item.displayText === listItemText); + if (!itemToDelete) { + console.warn(`List item doesn't exist in control with ID ${selectedContentControl.id}: ${listItemText}`); + return; + } + + itemToDelete.delete(); + await context.sync(); + + console.log(`List item deleted from control with ID ${selectedContentControl.id}: ${listItemText}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'delete(): void;' + return: + type: void + description: '' + - name: load(options) + uid: 'word!Word.ContentControlListItem#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.ContentControlListItemLoadOptions): Word.ContentControlListItem;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.ContentControlListItem#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.ContentControlListItem;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.ContentControlListItem#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ContentControlListItem; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: select() + uid: 'word!Word.ContentControlListItem#select:member(1)' + package: word! + fullName: select() + summary: Selects the list item and sets the text of the content control to the value of the list item. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'select(): void;' + return: + type: void + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.ContentControlListItem#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.ContentControlListItemUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.ContentControlListItem#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.ContentControlListItem): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.ContentControlListItem#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is + passed to it.) Whereas the original `Word.ContentControlListItem` object is an API object, the `toJSON` method + returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemData`) that contains + shallow copies of any loaded child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.ContentControlListItemData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.ContentControlListItem#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.ContentControlListItem;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.ContentControlListItem#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.ContentControlListItem;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.contentcontrollistitemcollection.yml b/docs/docs-ref-autogen/word_1_9/word/word.contentcontrollistitemcollection.yml new file mode 100644 index 0000000000..ac62531a31 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.contentcontrollistitemcollection.yml @@ -0,0 +1,235 @@ +### YamlMime:TSType +name: Word.ContentControlListItemCollection +uid: 'word!Word.ContentControlListItemCollection:class' +package: word! +fullName: Word.ContentControlListItemCollection +summary: >- + Contains a collection of [Word.ContentControlListItem](xref:word!Word.ContentControlListItem:class) objects that + represent the items in a dropdown list or combo box content control. +remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml + + + // Gets the list items from the first combo box content control found in the selection. + + await Word.run(async (context) => { + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.comboBox] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,comboBoxContentControl"); + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,comboBoxContentControl"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.comboBox) { + console.warn("No combo box content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + let selectedComboBox: Word.ComboBoxContentControl = selectedContentControl.comboBoxContentControl; + selectedComboBox.listItems.load("items"); + await context.sync(); + + const currentItems: Word.ContentControlListItemCollection = selectedComboBox.listItems; + console.log(`The list from the combo box content control with ID ${selectedContentControl.id}:`, currentItems); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.ContentControlListItemCollection#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: items + uid: 'word!Word.ContentControlListItemCollection#items:member' + package: word! + fullName: items + summary: Gets the loaded child items in this collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly items: Word.ContentControlListItem[];' + return: + type: '[]' +methods: + - name: getFirst() + uid: 'word!Word.ContentControlListItemCollection#getFirst:member(1)' + package: word! + fullName: getFirst() + summary: Gets the first list item in this collection. Throws an `ItemNotFound` error if this collection is empty. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFirst(): Word.ContentControlListItem;' + return: + type: '' + description: '' + - name: getFirstOrNullObject() + uid: 'word!Word.ContentControlListItemCollection#getFirstOrNullObject:member(1)' + package: word! + fullName: getFirstOrNullObject() + summary: >- + Gets the first list item in this collection. If this collection is empty, then this method will return an object + with its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFirstOrNullObject(): Word.ContentControlListItem;' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.ContentControlListItemCollection#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: >- + load(options?: Word.Interfaces.ContentControlListItemCollectionLoadOptions & + Word.Interfaces.CollectionLoadOptions): Word.ContentControlListItemCollection; + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: >- + & + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.ContentControlListItemCollection#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.ContentControlListItemCollection;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.ContentControlListItemCollection#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ContentControlListItemCollection;' + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: '' + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.ContentControlListItemCollection#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is + passed to it.) Whereas the original `Word.ContentControlListItemCollection` object is an API object, the `toJSON` + method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemCollectionData`) + that contains an "items" array with shallow copies of any loaded properties from the collection's items. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.ContentControlListItemCollectionData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.ContentControlListItemCollection#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.ContentControlListItemCollection;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.ContentControlListItemCollection#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.ContentControlListItemCollection;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.contentcontroloptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.contentcontroloptions.yml new file mode 100644 index 0000000000..d7b0a8acd7 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.contentcontroloptions.yml @@ -0,0 +1,81 @@ +### YamlMime:TSType +name: Word.ContentControlOptions +uid: 'word!Word.ContentControlOptions:interface' +package: word! +fullName: Word.ContentControlOptions +summary: Specifies the options that define which content controls are returned. +remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-checkbox-content-control.yaml + + + // Toggles the isChecked property of the first checkbox content control found in the selection. + + await Word.run(async (context) => { + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.checkBox] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,checkboxContentControl/isChecked"); + + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,checkboxContentControl/isChecked"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.checkBox) { + console.warn("No checkbox content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + const isCheckedBefore = selectedContentControl.checkboxContentControl.isChecked; + console.log("isChecked state before:", `id: ${selectedContentControl.id} ... isChecked: ${isCheckedBefore}`); + selectedContentControl.checkboxContentControl.isChecked = !isCheckedBefore; + selectedContentControl.load("id,checkboxContentControl/isChecked"); + await context.sync(); + + console.log( + "isChecked state after:", + `id: ${selectedContentControl.id} ... isChecked: ${selectedContentControl.checkboxContentControl.isChecked}` + ); + }); + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: types + uid: 'word!Word.ContentControlOptions#types:member' + package: word! + fullName: types + summary: >- + An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. 'DropDownList' + and 'ComboBox' support was added in WordApi 1.9. + isPreview: false + isDeprecated: false + syntax: + content: 'types: Word.ContentControlType[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.contentcontrolselectionchangedeventargs.yml b/docs/docs-ref-autogen/word_1_9/word/word.contentcontrolselectionchangedeventargs.yml new file mode 100644 index 0000000000..53fdfacf54 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.contentcontrolselectionchangedeventargs.yml @@ -0,0 +1,97 @@ +### YamlMime:TSType +name: Word.ContentControlSelectionChangedEventArgs +uid: 'word!Word.ContentControlSelectionChangedEventArgs:interface' +package: word! +fullName: Word.ContentControlSelectionChangedEventArgs +summary: Provides information about the content control that raised contentControlSelectionChanged event. +remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/content-control-onselectionchanged-event.yaml + + + await Word.run(async (context) => { + const contentControls: Word.ContentControlCollection = context.document.contentControls; + contentControls.load("items"); + await context.sync(); + + if (contentControls.items.length === 0) { + console.log("There aren't any content controls in this document so can't register event handlers."); + } else { + for (let i = 0; i < contentControls.items.length; i++) { + eventContexts[i] = contentControls.items[i].onSelectionChanged.add(contentControlSelectionChanged); + contentControls.items[i].track(); + } + + await context.sync(); + + console.log("Added event handlers for when selections are changed in content controls."); + } + }); + + + ... + + + async function contentControlSelectionChanged(event: Word.ContentControlSelectionChangedEventArgs) { + await Word.run(async (context) => { + console.log(`${event.eventType} event detected. IDs of content controls where selection was changed:`, event.ids); + }); + } + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: eventType + uid: 'word!Word.ContentControlSelectionChangedEventArgs#eventType:member' + package: word! + fullName: eventType + summary: The event type. See Word.EventType for details. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | + "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | + "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | + "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; + return: + type: >- + | "ContentControlDeleted" | "ContentControlSelectionChanged" | + "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | + "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | + "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction" + - name: ids + uid: 'word!Word.ContentControlSelectionChangedEventArgs#ids:member' + package: word! + fullName: ids + summary: Gets the content control IDs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'ids: number[];' + return: + type: 'number[]' + - name: source + uid: 'word!Word.ContentControlSelectionChangedEventArgs#source:member' + package: word! + fullName: source + summary: The source of the event. It can be local or remote (through coauthoring). + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'source: Word.EventSource | "Local" | "Remote";' + return: + type: ' | "Local" | "Remote"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.contentcontroltype.yml b/docs/docs-ref-autogen/word_1_9/word/word.contentcontroltype.yml new file mode 100644 index 0000000000..3ea421831f --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.contentcontroltype.yml @@ -0,0 +1,198 @@ +### YamlMime:TSEnum +name: Word.ContentControlType +uid: 'word!Word.ContentControlType:enum' +package: word! +fullName: Word.ContentControlType +summary: Specifies supported content control types and subtypes. +remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Run a batch operation against the Word object model. + + await Word.run(async (context) => { + + // Create a proxy object for the content controls collection. + const contentControls = context.document.contentControls; + + // Queue a command to load the id property for all of the content controls. + contentControls.load('id'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + if (contentControls.items.length === 0) { + console.log('No content control found.'); + } + else { + // Queue a command to load the properties on the first content control. + contentControls.items[0].load( 'appearance,' + + 'cannotDelete,' + + 'cannotEdit,' + + 'color,' + + 'id,' + + 'placeHolderText,' + + 'removeWhenEdited,' + + 'title,' + + 'text,' + + 'type,' + + 'style,' + + 'tag,' + + 'font/size,' + + 'font/name,' + + 'font/color'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Property values of the first content control:' + + ' ----- appearance: ' + contentControls.items[0].appearance + + ' ----- cannotDelete: ' + contentControls.items[0].cannotDelete + + ' ----- cannotEdit: ' + contentControls.items[0].cannotEdit + + ' ----- color: ' + contentControls.items[0].color + + ' ----- id: ' + contentControls.items[0].id + + ' ----- placeHolderText: ' + contentControls.items[0].placeholderText + + ' ----- removeWhenEdited: ' + contentControls.items[0].removeWhenEdited + + ' ----- title: ' + contentControls.items[0].title + + ' ----- text: ' + contentControls.items[0].text + + ' ----- type: ' + contentControls.items[0].type + + ' ----- style: ' + contentControls.items[0].style + + ' ----- tag: ' + contentControls.items[0].tag + + ' ----- font size: ' + contentControls.items[0].font.size + + ' ----- font name: ' + contentControls.items[0].font.name + + ' ----- font color: ' + contentControls.items[0].font.color); + } + }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-checkbox-content-control.yaml + + + // Traverses each paragraph of the document and places a checkbox content control at the beginning of each. + + await Word.run(async (context) => { + let paragraphs = context.document.body.paragraphs; + paragraphs.load("$none"); // Don't need any properties; just start each paragraph with a content control. + + await context.sync(); + + for (let i = 0; i < paragraphs.items.length; i++) { + let contentControl = paragraphs.items[i] + .getRange(Word.RangeLocation.start) + .insertContentControl(Word.ContentControlType.checkBox); + } + console.log("Checkbox content controls inserted: " + paragraphs.items.length); + + await context.sync(); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: buildingBlockGallery + uid: 'word!Word.ContentControlType.buildingBlockGallery:member' + package: word! + summary: '* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"BuildingBlockGallery"' + - name: checkBox + uid: 'word!Word.ContentControlType.checkBox:member' + package: word! + summary: '* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"CheckBox"' + - name: comboBox + uid: 'word!Word.ContentControlType.comboBox:member' + package: word! + summary: '* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"ComboBox"' + - name: datePicker + uid: 'word!Word.ContentControlType.datePicker:member' + package: word! + summary: '* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"DatePicker"' + - name: dropDownList + uid: 'word!Word.ContentControlType.dropDownList:member' + package: word! + summary: '* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"DropDownList"' + - name: picture + uid: 'word!Word.ContentControlType.picture:member' + package: word! + summary: '* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Picture"' + - name: plainText + uid: 'word!Word.ContentControlType.plainText:member' + package: word! + summary: '* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"PlainText"' + - name: plainTextInline + uid: 'word!Word.ContentControlType.plainTextInline:member' + package: word! + summary: '* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"PlainTextInline"' + - name: plainTextParagraph + uid: 'word!Word.ContentControlType.plainTextParagraph:member' + package: word! + summary: '* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"PlainTextParagraph"' + - name: repeatingSection + uid: 'word!Word.ContentControlType.repeatingSection:member' + package: word! + summary: '* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"RepeatingSection"' + - name: richText + uid: 'word!Word.ContentControlType.richText:member' + package: word! + summary: |- + Identifies a rich text content control. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"RichText"' + - name: richTextInline + uid: 'word!Word.ContentControlType.richTextInline:member' + package: word! + summary: '* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"RichTextInline"' + - name: richTextParagraphs + uid: 'word!Word.ContentControlType.richTextParagraphs:member' + package: word! + summary: '* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"RichTextParagraphs"' + - name: richTextTable + uid: 'word!Word.ContentControlType.richTextTable:member' + package: word! + summary: |- + Contains a whole table. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"RichTextTable"' + - name: richTextTableCell + uid: 'word!Word.ContentControlType.richTextTableCell:member' + package: word! + summary: |- + Contains a whole cell. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"RichTextTableCell"' + - name: richTextTableRow + uid: 'word!Word.ContentControlType.richTextTableRow:member' + package: word! + summary: |- + Contains a whole row. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"RichTextTableRow"' + - name: unknown + uid: 'word!Word.ContentControlType.unknown:member' + package: word! + summary: '* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Unknown"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.critique.yml b/docs/docs-ref-autogen/word_1_9/word/word.critique.yml new file mode 100644 index 0000000000..6fec1de0f0 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.critique.yml @@ -0,0 +1,123 @@ +### YamlMime:TSType +name: Word.Critique +uid: 'word!Word.Critique:interface' +package: word! +fullName: Word.Critique +summary: Critique that will be rendered as underline for the specified part of paragraph in the document. +remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Adds annotations to the selected paragraph. + + await Word.run(async (context) => { + const paragraph: Word.Paragraph = context.document.getSelection().paragraphs.getFirst(); + const options: Word.CritiquePopupOptions = { + brandingTextResourceId: "PG.TabLabel", + subtitleResourceId: "PG.HelpCommand.TipTitle", + titleResourceId: "PG.HelpCommand.Label", + suggestions: ["suggestion 1", "suggestion 2", "suggestion 3"] + }; + const critique1: Word.Critique = { + colorScheme: Word.CritiqueColorScheme.red, + start: 1, + length: 3, + popupOptions: options + }; + const critique2: Word.Critique = { + colorScheme: Word.CritiqueColorScheme.green, + start: 6, + length: 1, + popupOptions: options + }; + const critique3: Word.Critique = { + colorScheme: Word.CritiqueColorScheme.blue, + start: 10, + length: 3, + popupOptions: options + }; + const critique4: Word.Critique = { + colorScheme: Word.CritiqueColorScheme.lavender, + start: 14, + length: 3, + popupOptions: options + }; + const critique5: Word.Critique = { + colorScheme: Word.CritiqueColorScheme.berry, + start: 18, + length: 10, + popupOptions: options + }; + const annotationSet: Word.AnnotationSet = { + critiques: [critique1, critique2, critique3, critique4, critique5] + }; + + const annotationIds = paragraph.insertAnnotations(annotationSet); + + await context.sync(); + + console.log("Annotations inserted:", annotationIds.value); + }); + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: colorScheme + uid: 'word!Word.Critique#colorScheme:member' + package: word! + fullName: colorScheme + summary: Specifies the color scheme of the critique. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'colorScheme: Word.CritiqueColorScheme | "Red" | "Green" | "Blue" | "Lavender" | "Berry";' + return: + type: ' | "Red" | "Green" | "Blue" | "Lavender" | "Berry"' + - name: length + uid: 'word!Word.Critique#length:member' + package: word! + fullName: length + summary: Specifies the length of the critique inside paragraph. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'length: number;' + return: + type: number + - name: popupOptions + uid: 'word!Word.Critique#popupOptions:member' + package: word! + fullName: popupOptions + summary: Specifies the behavior of the pop-up menu for the critique. + remarks: '\[ [API set: WordApi 1.8](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'popupOptions?: Word.CritiquePopupOptions;' + return: + type: '' + - name: start + uid: 'word!Word.Critique#start:member' + package: word! + fullName: start + summary: Specifies the start index of the critique inside paragraph. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'start: number;' + return: + type: number diff --git a/docs/docs-ref-autogen/word_1_9/word/word.critiqueannotation.yml b/docs/docs-ref-autogen/word_1_9/word/word.critiqueannotation.yml new file mode 100644 index 0000000000..9168fe7313 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.critiqueannotation.yml @@ -0,0 +1,331 @@ +### YamlMime:TSType +name: Word.CritiqueAnnotation +uid: 'word!Word.CritiqueAnnotation:class' +package: word! +fullName: Word.CritiqueAnnotation +summary: Represents an annotation wrapper around critique displayed in the document. +remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Gets annotations found in the selected paragraph. + + await Word.run(async (context) => { + const paragraph: Word.Paragraph = context.document.getSelection().paragraphs.getFirst(); + const annotations: Word.AnnotationCollection = paragraph.getAnnotations(); + annotations.load("id,state,critiqueAnnotation"); + + await context.sync(); + + console.log("Annotations found:"); + + for (let i = 0; i < annotations.items.length; i++) { + const annotation: Word.Annotation = annotations.items[i]; + + console.log(`ID ${annotation.id} - state '${annotation.state}':`, annotation.critiqueAnnotation.critique); + } + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.CritiqueAnnotation#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: critique + uid: 'word!Word.CritiqueAnnotation#critique:member' + package: word! + fullName: critique + summary: Gets the critique that was passed when the annotation was inserted. + remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Gets annotations found in the selected paragraph. + + await Word.run(async (context) => { + const paragraph: Word.Paragraph = context.document.getSelection().paragraphs.getFirst(); + const annotations: Word.AnnotationCollection = paragraph.getAnnotations(); + annotations.load("id,state,critiqueAnnotation"); + + await context.sync(); + + console.log("Annotations found:"); + + for (let i = 0; i < annotations.items.length; i++) { + const annotation: Word.Annotation = annotations.items[i]; + + console.log(`ID ${annotation.id} - state '${annotation.state}':`, annotation.critiqueAnnotation.critique); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly critique: Word.Critique;' + return: + type: '' + - name: range + uid: 'word!Word.CritiqueAnnotation#range:member' + package: word! + fullName: range + summary: Gets the range of text that is annotated. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly range: Word.Range;' + return: + type: '' +methods: + - name: accept() + uid: 'word!Word.CritiqueAnnotation#accept:member(1)' + package: word! + fullName: accept() + summary: Accepts the critique. This will change the annotation state to `accepted`. + remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Accepts the first annotation found in the selected paragraph. + + await Word.run(async (context) => { + const paragraph: Word.Paragraph = context.document.getSelection().paragraphs.getFirst(); + const annotations: Word.AnnotationCollection = paragraph.getAnnotations(); + annotations.load("id,state,critiqueAnnotation"); + + await context.sync(); + + for (let i = 0; i < annotations.items.length; i++) { + const annotation: Word.Annotation = annotations.items[i]; + + if (annotation.state === Word.AnnotationState.created) { + console.log(`Accepting ID ${annotation.id}...`); + annotation.critiqueAnnotation.accept(); + + await context.sync(); + break; + } + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'accept(): void;' + return: + type: void + description: '' + - name: load(options) + uid: 'word!Word.CritiqueAnnotation#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.CritiqueAnnotationLoadOptions): Word.CritiqueAnnotation;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.CritiqueAnnotation#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.CritiqueAnnotation;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.CritiqueAnnotation#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.CritiqueAnnotation; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: reject() + uid: 'word!Word.CritiqueAnnotation#reject:member(1)' + package: word! + fullName: reject() + summary: Rejects the critique. This will change the annotation state to `rejected`. + remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Rejects the last annotation found in the selected paragraph. + + await Word.run(async (context) => { + const paragraph: Word.Paragraph = context.document.getSelection().paragraphs.getFirst(); + const annotations: Word.AnnotationCollection = paragraph.getAnnotations(); + annotations.load("id,state,critiqueAnnotation"); + + await context.sync(); + + for (let i = annotations.items.length - 1; i >= 0; i--) { + const annotation: Word.Annotation = annotations.items[i]; + + if (annotation.state === Word.AnnotationState.created) { + console.log(`Rejecting ID ${annotation.id}...`); + annotation.critiqueAnnotation.reject(); + + await context.sync(); + break; + } + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'reject(): void;' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.CritiqueAnnotation#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is + passed to it.) Whereas the original `Word.CritiqueAnnotation` object is an API object, the `toJSON` method returns + a plain JavaScript object (typed as `Word.Interfaces.CritiqueAnnotationData`) that contains shallow copies + of any loaded child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.CritiqueAnnotationData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.CritiqueAnnotation#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.CritiqueAnnotation;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.CritiqueAnnotation#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.CritiqueAnnotation;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.critiquecolorscheme.yml b/docs/docs-ref-autogen/word_1_9/word/word.critiquecolorscheme.yml new file mode 100644 index 0000000000..d89f79288b --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.critiquecolorscheme.yml @@ -0,0 +1,114 @@ +### YamlMime:TSEnum +name: Word.CritiqueColorScheme +uid: 'word!Word.CritiqueColorScheme:enum' +package: word! +fullName: Word.CritiqueColorScheme +summary: 'Represents the color scheme of a critique in the document, affecting underline and highlight.' +remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Adds annotations to the selected paragraph. + + await Word.run(async (context) => { + const paragraph: Word.Paragraph = context.document.getSelection().paragraphs.getFirst(); + const options: Word.CritiquePopupOptions = { + brandingTextResourceId: "PG.TabLabel", + subtitleResourceId: "PG.HelpCommand.TipTitle", + titleResourceId: "PG.HelpCommand.Label", + suggestions: ["suggestion 1", "suggestion 2", "suggestion 3"] + }; + const critique1: Word.Critique = { + colorScheme: Word.CritiqueColorScheme.red, + start: 1, + length: 3, + popupOptions: options + }; + const critique2: Word.Critique = { + colorScheme: Word.CritiqueColorScheme.green, + start: 6, + length: 1, + popupOptions: options + }; + const critique3: Word.Critique = { + colorScheme: Word.CritiqueColorScheme.blue, + start: 10, + length: 3, + popupOptions: options + }; + const critique4: Word.Critique = { + colorScheme: Word.CritiqueColorScheme.lavender, + start: 14, + length: 3, + popupOptions: options + }; + const critique5: Word.Critique = { + colorScheme: Word.CritiqueColorScheme.berry, + start: 18, + length: 10, + popupOptions: options + }; + const annotationSet: Word.AnnotationSet = { + critiques: [critique1, critique2, critique3, critique4, critique5] + }; + + const annotationIds = paragraph.insertAnnotations(annotationSet); + + await context.sync(); + + console.log("Annotations inserted:", annotationIds.value); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: berry + uid: 'word!Word.CritiqueColorScheme.berry:member' + package: word! + summary: |- + Berry color. + + * \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Berry"' + - name: blue + uid: 'word!Word.CritiqueColorScheme.blue:member' + package: word! + summary: |- + Blue color. + + * \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Blue"' + - name: green + uid: 'word!Word.CritiqueColorScheme.green:member' + package: word! + summary: |- + Green color. + + * \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Green"' + - name: lavender + uid: 'word!Word.CritiqueColorScheme.lavender:member' + package: word! + summary: |- + Lavender color. + + * \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Lavender"' + - name: red + uid: 'word!Word.CritiqueColorScheme.red:member' + package: word! + summary: |- + Red color. + + * \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Red"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.critiquepopupoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.critiquepopupoptions.yml new file mode 100644 index 0000000000..78da130ac4 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.critiquepopupoptions.yml @@ -0,0 +1,125 @@ +### YamlMime:TSType +name: Word.CritiquePopupOptions +uid: 'word!Word.CritiquePopupOptions:interface' +package: word! +fullName: Word.CritiquePopupOptions +summary: Properties defining the behavior of the pop-up menu for a given critique. +remarks: >- + \[ [API set: WordApi 1.8](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Adds annotations to the selected paragraph. + + await Word.run(async (context) => { + const paragraph: Word.Paragraph = context.document.getSelection().paragraphs.getFirst(); + const options: Word.CritiquePopupOptions = { + brandingTextResourceId: "PG.TabLabel", + subtitleResourceId: "PG.HelpCommand.TipTitle", + titleResourceId: "PG.HelpCommand.Label", + suggestions: ["suggestion 1", "suggestion 2", "suggestion 3"] + }; + const critique1: Word.Critique = { + colorScheme: Word.CritiqueColorScheme.red, + start: 1, + length: 3, + popupOptions: options + }; + const critique2: Word.Critique = { + colorScheme: Word.CritiqueColorScheme.green, + start: 6, + length: 1, + popupOptions: options + }; + const critique3: Word.Critique = { + colorScheme: Word.CritiqueColorScheme.blue, + start: 10, + length: 3, + popupOptions: options + }; + const critique4: Word.Critique = { + colorScheme: Word.CritiqueColorScheme.lavender, + start: 14, + length: 3, + popupOptions: options + }; + const critique5: Word.Critique = { + colorScheme: Word.CritiqueColorScheme.berry, + start: 18, + length: 10, + popupOptions: options + }; + const annotationSet: Word.AnnotationSet = { + critiques: [critique1, critique2, critique3, critique4, critique5] + }; + + const annotationIds = paragraph.insertAnnotations(annotationSet); + + await context.sync(); + + console.log("Annotations inserted:", annotationIds.value); + }); + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: brandingTextResourceId + uid: 'word!Word.CritiquePopupOptions#brandingTextResourceId:member' + package: word! + fullName: brandingTextResourceId + summary: >- + Gets the manifest resource ID of the string to use for branding. This branding text appears next to your add-in + icon in the pop-up menu. + remarks: '\[ [API set: WordApi 1.8](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'brandingTextResourceId: string;' + return: + type: string + - name: subtitleResourceId + uid: 'word!Word.CritiquePopupOptions#subtitleResourceId:member' + package: word! + fullName: subtitleResourceId + summary: Gets the manifest resource ID of the string to use as the subtitle. + remarks: '\[ [API set: WordApi 1.8](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'subtitleResourceId: string;' + return: + type: string + - name: suggestions + uid: 'word!Word.CritiquePopupOptions#suggestions:member' + package: word! + fullName: suggestions + summary: Gets the suggestions to display in the critique pop-up menu. + remarks: '\[ [API set: WordApi 1.8](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'suggestions: string[];' + return: + type: 'string[]' + - name: titleResourceId + uid: 'word!Word.CritiquePopupOptions#titleResourceId:member' + package: word! + fullName: titleResourceId + summary: Gets the manifest resource ID of the string to use as the title. + remarks: '\[ [API set: WordApi 1.8](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'titleResourceId: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/word_1_9/word/word.customproperty.yml b/docs/docs-ref-autogen/word_1_9/word/word.customproperty.yml new file mode 100644 index 0000000000..1c9e38ae33 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.customproperty.yml @@ -0,0 +1,264 @@ +### YamlMime:TSType +name: Word.CustomProperty +uid: 'word!Word.CustomProperty:class' +package: word! +fullName: Word.CustomProperty +summary: Represents a custom property. +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // 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); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.CustomProperty#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: key + uid: 'word!Word.CustomProperty#key:member' + package: word! + fullName: key + summary: Gets the key of the custom property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly key: string;' + return: + type: string + - name: type + uid: 'word!Word.CustomProperty#type:member' + package: word! + fullName: type + summary: 'Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly type: Word.DocumentPropertyType | "String" | "Number" | "Date" | "Boolean";' + return: + type: ' | "String" | "Number" | "Date" | "Boolean"' + - name: value + uid: 'word!Word.CustomProperty#value:member' + package: word! + fullName: value + summary: >- + Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow + these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit + chars (possibly creating invalid unicode by breaking up a surrogate pair). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'value: any;' + return: + type: any +methods: + - name: delete() + uid: 'word!Word.CustomProperty#delete:member(1)' + package: word! + fullName: delete() + summary: Deletes the custom property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'delete(): void;' + return: + type: void + description: '' + - name: load(options) + uid: 'word!Word.CustomProperty#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.CustomPropertyLoadOptions): Word.CustomProperty;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.CustomProperty#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.CustomProperty;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.CustomProperty#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.CustomProperty; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.CustomProperty#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.CustomPropertyUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.CustomProperty#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.CustomProperty): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.CustomProperty#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.CustomProperty` object is an API object, the `toJSON` method returns a + plain JavaScript object (typed as `Word.Interfaces.CustomPropertyData`) that contains shallow copies of + any loaded child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.CustomPropertyData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.CustomProperty#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.CustomProperty;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.CustomProperty#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.CustomProperty;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.custompropertycollection.yml b/docs/docs-ref-autogen/word_1_9/word/word.custompropertycollection.yml new file mode 100644 index 0000000000..18b61839b3 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.custompropertycollection.yml @@ -0,0 +1,319 @@ +### YamlMime:TSType +name: Word.CustomPropertyCollection +uid: 'word!Word.CustomPropertyCollection:class' +package: word! +fullName: Word.CustomPropertyCollection +summary: 'Contains the collection of [Word.CustomProperty](xref:word!Word.CustomProperty:class) objects.' +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // 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); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.CustomPropertyCollection#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: items + uid: 'word!Word.CustomPropertyCollection#items:member' + package: word! + fullName: items + summary: Gets the loaded child items in this collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly items: Word.CustomProperty[];' + return: + type: '[]' + description: >- + + + #### Examples + + + ```TypeScript + + // 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); + }); + + ``` +methods: + - name: 'add(key, value)' + uid: 'word!Word.CustomPropertyCollection#add:member(1)' + package: word! + fullName: 'add(key, value)' + summary: Creates a new or sets an existing custom property. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // 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) => { + context.document.properties.customProperties.add("Numeric Property", 1234); + + await context.sync(); + console.log("Property added"); + }); + + + ... + + + await Word.run(async (context) => { + context.document.properties.customProperties.add("String Property", "Hello World!"); + + await context.sync(); + console.log("Property added"); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'add(key: string, value: any): Word.CustomProperty;' + parameters: + - id: key + description: 'Required. The custom property''s key, which is case-insensitive.' + type: string + - id: value + description: Required. The custom property's value. + type: any + return: + type: '' + description: '' + - name: deleteAll() + uid: 'word!Word.CustomPropertyCollection#deleteAll:member(1)' + package: word! + fullName: deleteAll() + summary: Deletes all custom properties in this collection. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'deleteAll(): void;' + return: + type: void + description: '' + - name: getCount() + uid: 'word!Word.CustomPropertyCollection#getCount:member(1)' + package: word! + fullName: getCount() + summary: Gets the count of custom properties. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getCount(): OfficeExtension.ClientResult;' + return: + type: '<number>' + description: '' + - name: getItem(key) + uid: 'word!Word.CustomPropertyCollection#getItem:member(1)' + package: word! + fullName: getItem(key) + summary: >- + Gets a custom property object by its key, which is case-insensitive. Throws an `ItemNotFound` error if the custom + property doesn't exist. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getItem(key: string): Word.CustomProperty;' + parameters: + - id: key + description: The key that identifies the custom property object. + type: string + return: + type: '' + description: '' + - name: getItemOrNullObject(key) + uid: 'word!Word.CustomPropertyCollection#getItemOrNullObject:member(1)' + package: word! + fullName: getItemOrNullObject(key) + summary: >- + Gets a custom property object by its key, which is case-insensitive. If the custom property doesn't exist, then + this method will return an object with its `isNullObject` property set to `true`. For further information, + see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getItemOrNullObject(key: string): Word.CustomProperty;' + parameters: + - id: key + description: Required. The key that identifies the custom property object. + type: string + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.CustomPropertyCollection#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: >- + load(options?: Word.Interfaces.CustomPropertyCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): + Word.CustomPropertyCollection; + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: >- + & + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.CustomPropertyCollection#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.CustomPropertyCollection;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.CustomPropertyCollection#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomPropertyCollection;' + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: '' + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.CustomPropertyCollection#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.CustomPropertyCollection` object is an API object, the `toJSON` method + returns a plain JavaScript object (typed as `Word.Interfaces.CustomPropertyCollectionData`) that contains + an "items" array with shallow copies of any loaded properties from the collection's items. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.CustomPropertyCollectionData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.CustomPropertyCollection#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.CustomPropertyCollection;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.CustomPropertyCollection#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.CustomPropertyCollection;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.customxmlpart.yml b/docs/docs-ref-autogen/word_1_9/word/word.customxmlpart.yml new file mode 100644 index 0000000000..e2d4424103 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.customxmlpart.yml @@ -0,0 +1,1128 @@ +### YamlMime:TSType +name: Word.CustomXmlPart +uid: 'word!Word.CustomXmlPart:class' +package: word! +fullName: Word.CustomXmlPart +summary: Represents a custom XML part. +remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-custom-xml-part.yaml + + + // Adds a custom XML part. + + await Word.run(async (context) => { + const originalXml = + "JuanHongSally"; + const customXmlPart: Word.CustomXmlPart = context.document.customXmlParts.add(originalXml); + customXmlPart.load("id"); + const xmlBlob = customXmlPart.getXml(); + + await context.sync(); + + const readableXml = addLineBreaksToXML(xmlBlob.value); + console.log("Added custom XML part:", readableXml); + + // Store the XML part's ID in a setting so the ID is available to other functions. + const settings: Word.SettingCollection = context.document.settings; + settings.add("ContosoReviewXmlPartId", customXmlPart.id); + + await context.sync(); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.CustomXmlPart#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: id + uid: 'word!Word.CustomXmlPart#id:member' + package: word! + fullName: id + summary: Gets the ID of the custom XML part. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-custom-xml-part.yaml + + + // Adds a custom XML part. + + await Word.run(async (context) => { + const originalXml = + "JuanHongSally"; + const customXmlPart: Word.CustomXmlPart = context.document.customXmlParts.add(originalXml); + customXmlPart.load("id"); + const xmlBlob = customXmlPart.getXml(); + + await context.sync(); + + const readableXml = addLineBreaksToXML(xmlBlob.value); + console.log("Added custom XML part:", readableXml); + + // Store the XML part's ID in a setting so the ID is available to other functions. + const settings: Word.SettingCollection = context.document.settings; + settings.add("ContosoReviewXmlPartId", customXmlPart.id); + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly id: string;' + return: + type: string + - name: namespaceUri + uid: 'word!Word.CustomXmlPart#namespaceUri:member' + package: word! + fullName: namespaceUri + summary: Gets the namespace URI of the custom XML part. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-custom-xml-part-ns.yaml + + + // Original XML: JuanHongSally + + + // Gets the namespace URI from a custom XML part. + + await Word.run(async (context) => { + const settings: Word.SettingCollection = context.document.settings; + const xmlPartIDSetting: Word.Setting = settings.getItemOrNullObject("ContosoReviewXmlPartIdNS").load("value"); + + await context.sync(); + + if (xmlPartIDSetting.value) { + const customXmlPart: Word.CustomXmlPart = context.document.customXmlParts.getItem(xmlPartIDSetting.value); + customXmlPart.load("namespaceUri"); + await context.sync(); + + const namespaceUri = customXmlPart.namespaceUri; + console.log(`Namespace URI: ${JSON.stringify(namespaceUri)}`); + } else { + console.warn("Didn't find custom XML part."); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly namespaceUri: string;' + return: + type: string +methods: + - name: delete() + uid: 'word!Word.CustomXmlPart#delete:member(1)' + package: word! + fullName: delete() + summary: Deletes the custom XML part. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-custom-xml-part.yaml + + + // Original XML: + JuanHongSally + + + // Deletes a custom XML part. + + await Word.run(async (context) => { + const settings: Word.SettingCollection = context.document.settings; + const xmlPartIDSetting: Word.Setting = settings.getItemOrNullObject("ContosoReviewXmlPartId").load("value"); + await context.sync(); + + if (xmlPartIDSetting.value) { + let customXmlPart: Word.CustomXmlPart = context.document.customXmlParts.getItem(xmlPartIDSetting.value); + const xmlBlob = customXmlPart.getXml(); + customXmlPart.delete(); + customXmlPart = context.document.customXmlParts.getItemOrNullObject(xmlPartIDSetting.value); + + await context.sync(); + + if (customXmlPart.isNullObject) { + console.log(`The XML part with the ID ${xmlPartIDSetting.value} has been deleted.`); + + // Delete the associated setting too. + xmlPartIDSetting.delete(); + + await context.sync(); + } else { + const readableXml = addLineBreaksToXML(xmlBlob.value); + console.error(`This is strange. The XML part with the id ${xmlPartIDSetting.value} wasn't deleted:`, readableXml); + } + } else { + console.warn("Didn't find custom XML part to delete."); + } + }); + + + ... + + + // Original XML: JuanHongSally + + + // Deletes a custom XML part. + + await Word.run(async (context) => { + const settings: Word.SettingCollection = context.document.settings; + const xmlPartIDSetting: Word.Setting = settings.getItemOrNullObject("ContosoReviewXmlPartIdNS").load("value"); + await context.sync(); + + if (xmlPartIDSetting.value) { + let customXmlPart: Word.CustomXmlPart = context.document.customXmlParts.getItem(xmlPartIDSetting.value); + const xmlBlob = customXmlPart.getXml(); + customXmlPart.delete(); + customXmlPart = context.document.customXmlParts.getItemOrNullObject(xmlPartIDSetting.value); + + await context.sync(); + + if (customXmlPart.isNullObject) { + console.log(`The XML part with the ID ${xmlPartIDSetting.value} has been deleted.`); + + // Delete the associated setting too. + xmlPartIDSetting.delete(); + + await context.sync(); + } else { + const readableXml = addLineBreaksToXML(xmlBlob.value); + console.error( + `This is strange. The XML part with the id ${xmlPartIDSetting.value} wasn't deleted:`, + readableXml + ); + } + } else { + console.warn("Didn't find custom XML part to delete."); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'delete(): void;' + return: + type: void + description: '' + - name: 'deleteAttribute(xpath, namespaceMappings, name)' + uid: 'word!Word.CustomXmlPart#deleteAttribute:member(1)' + package: word! + fullName: 'deleteAttribute(xpath, namespaceMappings, name)' + summary: Deletes an attribute with the given name from the element identified by xpath. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), an alias for + that attribute value must prefix the element name in the xpath parameter. For example, suppose the tree is the + following: + + + ```xml + + + + something + + + + ``` + + The xpath to `` must be /Day/greg:Month/Week, where greg is an alias + that is mapped to "http://calendartypes.org/xsds/GregorianCalendar" in the namespaceMappings parameter. + isPreview: false + isDeprecated: false + syntax: + content: |- + deleteAttribute(xpath: string, namespaceMappings: { + [key: string]: string; + }, name: string): void; + parameters: + - id: xpath + description: Required. Absolute path to the single element in XPath notation. + type: string + - id: namespaceMappings + description: >- + Required. An object whose property values are namespace names and whose property names are aliases for the + corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. + The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as + the forward slash "/". + type: |- + { + [key: string]: string; + } + - id: name + description: Required. Name of the attribute. + type: string + return: + type: void + description: '' + - name: 'deleteElement(xpath, namespaceMappings)' + uid: 'word!Word.CustomXmlPart#deleteElement:member(1)' + package: word! + fullName: 'deleteElement(xpath, namespaceMappings)' + summary: Deletes the element identified by xpath. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), an alias for + that attribute value must prefix the element name in the xpath parameter. For example, suppose the tree is the + following: + + + ```xml + + + + something + + + + ``` + + The xpath to `` must be /Day/greg:Month/Week, where greg is an alias + that is mapped to "http://calendartypes.org/xsds/GregorianCalendar" in the namespaceMappings parameter. + isPreview: false + isDeprecated: false + syntax: + content: |- + deleteElement(xpath: string, namespaceMappings: { + [key: string]: string; + }): void; + parameters: + - id: xpath + description: Required. Absolute path to the single element in XPath notation. + type: string + - id: namespaceMappings + description: >- + Required. An object whose property values are namespace names and whose property names are aliases for the + corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. + The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as + the forward slash "/". + type: |- + { + [key: string]: string; + } + return: + type: void + description: '' + - name: getXml() + uid: 'word!Word.CustomXmlPart#getXml:member(1)' + package: word! + fullName: getXml() + summary: Gets the full XML content of the custom XML part. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-custom-xml-part-ns.yaml + + + // Adds a custom XML part. + + // If you want to populate the CustomXml.namespaceUri property, you must include the xmlns attribute. + + await Word.run(async (context) => { + const originalXml = + "JuanHongSally"; + const customXmlPart = context.document.customXmlParts.add(originalXml); + customXmlPart.load(["id", "namespaceUri"]); + const xmlBlob = customXmlPart.getXml(); + + await context.sync(); + + const readableXml = addLineBreaksToXML(xmlBlob.value); + console.log(`Added custom XML part with namespace URI ${customXmlPart.namespaceUri}:`, readableXml); + + // Store the XML part's ID in a setting so the ID is available to other functions. + const settings: Word.SettingCollection = context.document.settings; + settings.add("ContosoReviewXmlPartIdNS", customXmlPart.id); + + await context.sync(); + }); + + + ... + + + // Adds a custom XML part. + + await Word.run(async (context) => { + const originalXml = + "JuanHongSally"; + const customXmlPart: Word.CustomXmlPart = context.document.customXmlParts.add(originalXml); + customXmlPart.load("id"); + const xmlBlob = customXmlPart.getXml(); + + await context.sync(); + + const readableXml = addLineBreaksToXML(xmlBlob.value); + console.log("Added custom XML part:", readableXml); + + // Store the XML part's ID in a setting so the ID is available to other functions. + const settings: Word.SettingCollection = context.document.settings; + settings.add("ContosoReviewXmlPartId", customXmlPart.id); + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getXml(): OfficeExtension.ClientResult;' + return: + type: '<string>' + description: '' + - name: 'insertAttribute(xpath, namespaceMappings, name, value)' + uid: 'word!Word.CustomXmlPart#insertAttribute:member(1)' + package: word! + fullName: 'insertAttribute(xpath, namespaceMappings, name, value)' + summary: Inserts an attribute with the given name and value to the element identified by xpath. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), an alias for + that attribute value must prefix the element name in the xpath parameter. For example, suppose the tree is the + following: + + + ```xml + + + + something + + + + ``` + + The xpath to `` must be /Day/greg:Month/Week, where greg is an alias + that is mapped to "http://calendartypes.org/xsds/GregorianCalendar" in the namespaceMappings parameter. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-custom-xml-part-ns.yaml + + + // Original XML: JuanHongSally + + + // Inserts an attribute into a custom XML part. + + await Word.run(async (context) => { + const settings: Word.SettingCollection = context.document.settings; + const xmlPartIDSetting: Word.Setting = settings.getItemOrNullObject("ContosoReviewXmlPartIdNS").load("value"); + await context.sync(); + + if (xmlPartIDSetting.value) { + const customXmlPart: Word.CustomXmlPart = context.document.customXmlParts.getItem(xmlPartIDSetting.value); + + // The insertAttribute method inserts an attribute with the given name and value into the element identified by the xpath parameter. + customXmlPart.insertAttribute( + "/contoso:Reviewers", + { contoso: "http://schemas.contoso.com/review/1.0" }, + "Nation", + "US" + ); + const xmlBlob = customXmlPart.getXml(); + await context.sync(); + + const readableXml = addLineBreaksToXML(xmlBlob.value); + console.log("Successfully inserted attribute:", readableXml); + } else { + console.warn("Didn't find custom XML part to insert attribute into."); + } + }); + + + ... + + + // Original XML: + JuanHongSally + + + // Inserts an attribute into a custom XML part. + + await Word.run(async (context) => { + const settings: Word.SettingCollection = context.document.settings; + const xmlPartIDSetting: Word.Setting = settings.getItemOrNullObject("ContosoReviewXmlPartId").load("value"); + await context.sync(); + + if (xmlPartIDSetting.value) { + const customXmlPart: Word.CustomXmlPart = context.document.customXmlParts.getItem(xmlPartIDSetting.value); + + // The insertAttribute method inserts an attribute with the given name and value into the element identified by the xpath parameter. + customXmlPart.insertAttribute("/Reviewers", { contoso: "http://schemas.contoso.com/review/1.0" }, "Nation", "US"); + const xmlBlob = customXmlPart.getXml(); + await context.sync(); + + const readableXml = addLineBreaksToXML(xmlBlob.value); + console.log("Successfully inserted attribute:", readableXml); + } else { + console.warn("Didn't find custom XML part to insert attribute into."); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: |- + insertAttribute(xpath: string, namespaceMappings: { + [key: string]: string; + }, name: string, value: string): void; + parameters: + - id: xpath + description: Required. Absolute path to the single element in XPath notation. + type: string + - id: namespaceMappings + description: >- + Required. An object whose property values are namespace names and whose property names are aliases for the + corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. + The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as + the forward slash "/". + type: |- + { + [key: string]: string; + } + - id: name + description: Required. Name of the attribute. + type: string + - id: value + description: Required. Value of the attribute. + type: string + return: + type: void + description: '' + - name: 'insertElement(xpath, xml, namespaceMappings, index)' + uid: 'word!Word.CustomXmlPart#insertElement:member(1)' + package: word! + fullName: 'insertElement(xpath, xml, namespaceMappings, index)' + summary: Inserts the given XML under the parent element identified by xpath at child position index. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), an alias for + that attribute value must prefix the element name in the xpath parameter. For example, suppose the tree is the + following: + + + ```xml + + + + something + + + + ``` + + The xpath to `` must be /Day/greg:Month/Week, where greg is an alias + that is mapped to "http://calendartypes.org/xsds/GregorianCalendar" in the namespaceMappings parameter. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-custom-xml-part-ns.yaml + + + // Original XML: JuanHongSally + + + // Inserts an element into a custom XML part. + + await Word.run(async (context) => { + const settings: Word.SettingCollection = context.document.settings; + const xmlPartIDSetting: Word.Setting = settings.getItemOrNullObject("ContosoReviewXmlPartIdNS").load("value"); + await context.sync(); + + if (xmlPartIDSetting.value) { + const customXmlPart: Word.CustomXmlPart = context.document.customXmlParts.getItem(xmlPartIDSetting.value); + + // The insertElement method inserts the given XML under the parent element identified by the xpath parameter at the provided child position index. + customXmlPart.insertElement( + "/contoso:Reviewers", + "Mark", + { contoso: "http://schemas.contoso.com/review/1.0" }, + 0 + ); + const xmlBlob = customXmlPart.getXml(); + await context.sync(); + + const readableXml = addLineBreaksToXML(xmlBlob.value); + console.log("Successfully inserted element:", readableXml); + } else { + console.warn("Didn't find custom XML part to insert element into."); + } + }); + + + ... + + + // Original XML: + JuanHongSally + + + // Inserts an element into a custom XML part. + + await Word.run(async (context) => { + const settings: Word.SettingCollection = context.document.settings; + const xmlPartIDSetting: Word.Setting = settings.getItemOrNullObject("ContosoReviewXmlPartId").load("value"); + await context.sync(); + + if (xmlPartIDSetting.value) { + const customXmlPart: Word.CustomXmlPart = context.document.customXmlParts.getItem(xmlPartIDSetting.value); + + // The insertElement method inserts the given XML under the parent element identified by the xpath parameter at the provided child position index. + customXmlPart.insertElement( + "/Reviewers", + "Mark", + { contoso: "http://schemas.contoso.com/review/1.0" }, + 0 + ); + const xmlBlob = customXmlPart.getXml(); + await context.sync(); + + const readableXml = addLineBreaksToXML(xmlBlob.value); + console.log("Successfully inserted element:", readableXml); + } else { + console.warn("Didn't find custom XML part to insert element into."); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: |- + insertElement(xpath: string, xml: string, namespaceMappings: { + [key: string]: string; + }, index?: number): void; + parameters: + - id: xpath + description: Required. Absolute path to the single parent element in XPath notation. + type: string + - id: xml + description: Required. XML content to be inserted. + type: string + - id: namespaceMappings + description: >- + Required. An object whose property values are namespace names and whose property names are aliases for the + corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. + The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as + the forward slash "/". + type: |- + { + [key: string]: string; + } + - id: index + description: >- + Optional. Zero-based position at which the new XML to be inserted. If omitted, the XML will be appended as + the last child of this parent. + type: number + return: + type: void + description: '' + - name: load(options) + uid: 'word!Word.CustomXmlPart#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.CustomXmlPartLoadOptions): Word.CustomXmlPart;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.CustomXmlPart#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.CustomXmlPart;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.CustomXmlPart#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.CustomXmlPart; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: 'query(xpath, namespaceMappings)' + uid: 'word!Word.CustomXmlPart#query:member(1)' + package: word! + fullName: 'query(xpath, namespaceMappings)' + summary: Queries the XML content of the custom XML part. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), an alias for + that attribute value must prefix the element name in the xpath parameter. For example, suppose the tree is the + following: + + + ```xml + + + + something + + + + ``` + + The xpath to `` must be /Day/greg:Month/Week, where greg is an alias + that is mapped to "http://calendartypes.org/xsds/GregorianCalendar" in the namespaceMappings parameter. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-custom-xml-part-ns.yaml + + + // Original XML: JuanHongSally + + + // Queries a custom XML part for elements matching the search terms. + + await Word.run(async (context) => { + const settings: Word.SettingCollection = context.document.settings; + const xmlPartIDSetting: Word.Setting = settings.getItemOrNullObject("ContosoReviewXmlPartIdNS").load("value"); + + await context.sync(); + + if (xmlPartIDSetting.value) { + const customXmlPart: Word.CustomXmlPart = context.document.customXmlParts.getItem(xmlPartIDSetting.value); + const xpathToQueryFor = "/contoso:Reviewers"; + const clientResult = customXmlPart.query(xpathToQueryFor, { + contoso: "http://schemas.contoso.com/review/1.0" + }); + + await context.sync(); + + console.log(`Queried custom XML part for ${xpathToQueryFor} and found ${clientResult.value.length} matches:`); + for (let i = 0; i < clientResult.value.length; i++) { + console.log(clientResult.value[i]); + } + } else { + console.warn("Didn't find custom XML part to query."); + } + }); + + + ... + + + // Original XML: + JuanHongSally + + + // Queries a custom XML part for elements matching the search terms. + + await Word.run(async (context) => { + const settings: Word.SettingCollection = context.document.settings; + const xmlPartIDSetting: Word.Setting = settings.getItemOrNullObject("ContosoReviewXmlPartId").load("value"); + + await context.sync(); + + if (xmlPartIDSetting.value) { + const customXmlPart: Word.CustomXmlPart = context.document.customXmlParts.getItem(xmlPartIDSetting.value); + const xpathToQueryFor = "/Reviewers/Reviewer"; + const clientResult = customXmlPart.query(xpathToQueryFor, { + contoso: "http://schemas.contoso.com/review/1.0" + }); + + await context.sync(); + + console.log(`Queried custom XML part for ${xpathToQueryFor} and found ${clientResult.value.length} matches:`); + for (let i = 0; i < clientResult.value.length; i++) { + console.log(clientResult.value[i]); + } + } else { + console.warn("Didn't find custom XML part to query."); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: |- + query(xpath: string, namespaceMappings: { + [key: string]: string; + }): OfficeExtension.ClientResult; + parameters: + - id: xpath + description: Required. An XPath query. + type: string + - id: namespaceMappings + description: >- + Required. An object whose property values are namespace names and whose property names are aliases for the + corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. + The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as + the forward slash "/". + type: |- + { + [key: string]: string; + } + return: + type: '<string[]>' + description: An array where each item represents an entry matched by the XPath query. + - name: setXml(xml) + uid: 'word!Word.CustomXmlPart#setXml:member(1)' + package: word! + fullName: setXml(xml) + summary: Sets the full XML content of the custom XML part. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-custom-xml-part-ns.yaml + + + // Original XML: JuanHongSally + + + // Replaces a custom XML part. + + await Word.run(async (context) => { + const settings: Word.SettingCollection = context.document.settings; + const xmlPartIDSetting: Word.Setting = settings.getItemOrNullObject("ContosoReviewXmlPartIdNS").load("value"); + await context.sync(); + + if (xmlPartIDSetting.value) { + const customXmlPart: Word.CustomXmlPart = context.document.customXmlParts.getItem(xmlPartIDSetting.value); + const originalXmlBlob = customXmlPart.getXml(); + await context.sync(); + + let readableXml = addLineBreaksToXML(originalXmlBlob.value); + console.log("Original custom XML part:", readableXml); + + // The setXml method replaces the entire XML part. + customXmlPart.setXml( + "JohnHitomi" + ); + const updatedXmlBlob = customXmlPart.getXml(); + await context.sync(); + + readableXml = addLineBreaksToXML(updatedXmlBlob.value); + console.log("Replaced custom XML part:", readableXml); + } else { + console.warn("Didn't find custom XML part to replace."); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'setXml(xml: string): void;' + parameters: + - id: xml + description: Required. XML content to be set. + type: string + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.CustomXmlPart#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.CustomXmlPart` object is an API object, the `toJSON` method returns a + plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartData`) that contains shallow copies of any + loaded child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.CustomXmlPartData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.CustomXmlPart#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.CustomXmlPart;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.CustomXmlPart#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.CustomXmlPart;' + return: + type: '' + description: '' + - name: 'updateAttribute(xpath, namespaceMappings, name, value)' + uid: 'word!Word.CustomXmlPart#updateAttribute:member(1)' + package: word! + fullName: 'updateAttribute(xpath, namespaceMappings, name, value)' + summary: Updates the value of an attribute with the given name of the element identified by xpath. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), an alias for + that attribute value must prefix the element name in the xpath parameter. For example, suppose the tree is the + following: + + + ```xml + + + + something + + + + ``` + + The xpath to `` must be /Day/greg:Month/Week, where greg is an alias + that is mapped to "http://calendartypes.org/xsds/GregorianCalendar" in the namespaceMappings parameter. + isPreview: false + isDeprecated: false + syntax: + content: |- + updateAttribute(xpath: string, namespaceMappings: { + [key: string]: string; + }, name: string, value: string): void; + parameters: + - id: xpath + description: Required. Absolute path to the single element in XPath notation. + type: string + - id: namespaceMappings + description: >- + Required. An object whose property values are namespace names and whose property names are aliases for the + corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. + The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as + the forward slash "/". + type: |- + { + [key: string]: string; + } + - id: name + description: Required. Name of the attribute. + type: string + - id: value + description: Required. New value of the attribute. + type: string + return: + type: void + description: '' + - name: 'updateElement(xpath, xml, namespaceMappings)' + uid: 'word!Word.CustomXmlPart#updateElement:member(1)' + package: word! + fullName: 'updateElement(xpath, xml, namespaceMappings)' + summary: Updates the XML of the element identified by xpath. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), an alias for + that attribute value must prefix the element name in the xpath parameter. For example, suppose the tree is the + following: + + + ```xml + + + + something + + + + ``` + + The xpath to `` must be /Day/greg:Month/Week, where greg is an alias + that is mapped to "http://calendartypes.org/xsds/GregorianCalendar" in the namespaceMappings parameter. + isPreview: false + isDeprecated: false + syntax: + content: |- + updateElement(xpath: string, xml: string, namespaceMappings: { + [key: string]: string; + }): void; + parameters: + - id: xpath + description: Required. Absolute path to the single element in XPath notation. + type: string + - id: xml + description: Required. New XML content to be stored. + type: string + - id: namespaceMappings + description: >- + Required. An object whose property values are namespace names and whose property names are aliases for the + corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. + The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as + the forward slash "/". + type: |- + { + [key: string]: string; + } + return: + type: void + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.customxmlpartcollection.yml b/docs/docs-ref-autogen/word_1_9/word/word.customxmlpartcollection.yml new file mode 100644 index 0000000000..bbdbc8c9e1 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.customxmlpartcollection.yml @@ -0,0 +1,410 @@ +### YamlMime:TSType +name: Word.CustomXmlPartCollection +uid: 'word!Word.CustomXmlPartCollection:class' +package: word! +fullName: Word.CustomXmlPartCollection +summary: 'Contains the collection of [Word.CustomXmlPart](xref:word!Word.CustomXmlPart:class) objects.' +remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.CustomXmlPartCollection#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: items + uid: 'word!Word.CustomXmlPartCollection#items:member' + package: word! + fullName: items + summary: Gets the loaded child items in this collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly items: Word.CustomXmlPart[];' + return: + type: '[]' +methods: + - name: add(xml) + uid: 'word!Word.CustomXmlPartCollection#add:member(1)' + package: word! + fullName: add(xml) + summary: Adds a new custom XML part to the document. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-custom-xml-part-ns.yaml + + + // Adds a custom XML part. + + // If you want to populate the CustomXml.namespaceUri property, you must include the xmlns attribute. + + await Word.run(async (context) => { + const originalXml = + "JuanHongSally"; + const customXmlPart = context.document.customXmlParts.add(originalXml); + customXmlPart.load(["id", "namespaceUri"]); + const xmlBlob = customXmlPart.getXml(); + + await context.sync(); + + const readableXml = addLineBreaksToXML(xmlBlob.value); + console.log(`Added custom XML part with namespace URI ${customXmlPart.namespaceUri}:`, readableXml); + + // Store the XML part's ID in a setting so the ID is available to other functions. + const settings: Word.SettingCollection = context.document.settings; + settings.add("ContosoReviewXmlPartIdNS", customXmlPart.id); + + await context.sync(); + }); + + + ... + + + // Adds a custom XML part. + + await Word.run(async (context) => { + const originalXml = + "JuanHongSally"; + const customXmlPart: Word.CustomXmlPart = context.document.customXmlParts.add(originalXml); + customXmlPart.load("id"); + const xmlBlob = customXmlPart.getXml(); + + await context.sync(); + + const readableXml = addLineBreaksToXML(xmlBlob.value); + console.log("Added custom XML part:", readableXml); + + // Store the XML part's ID in a setting so the ID is available to other functions. + const settings: Word.SettingCollection = context.document.settings; + settings.add("ContosoReviewXmlPartId", customXmlPart.id); + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'add(xml: string): Word.CustomXmlPart;' + parameters: + - id: xml + description: Required. XML content. Must be a valid XML fragment. + type: string + return: + type: '' + description: '' + - name: getByNamespace(namespaceUri) + uid: 'word!Word.CustomXmlPartCollection#getByNamespace:member(1)' + package: word! + fullName: getByNamespace(namespaceUri) + summary: Gets a new scoped collection of custom XML parts whose namespaces match the given namespace. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-custom-xml-part-ns.yaml + + + // Original XML: JuanHongSally + + + // Gets the custom XML parts with the specified namespace URI. + + await Word.run(async (context) => { + const namespaceUri = "http://schemas.contoso.com/review/1.0"; + console.log(`Specified namespace URI: ${namespaceUri}`); + const scopedCustomXmlParts: Word.CustomXmlPartScopedCollection = + context.document.customXmlParts.getByNamespace(namespaceUri); + scopedCustomXmlParts.load("items"); + await context.sync(); + + console.log(`Number of custom XML parts found with this namespace: ${!scopedCustomXmlParts.items ? 0 : scopedCustomXmlParts.items.length}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getByNamespace(namespaceUri: string): Word.CustomXmlPartScopedCollection;' + parameters: + - id: namespaceUri + description: Required. The namespace URI. + type: string + return: + type: '' + description: '' + - name: getCount() + uid: 'word!Word.CustomXmlPartCollection#getCount:member(1)' + package: word! + fullName: getCount() + summary: Gets the number of items in the collection. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getCount(): OfficeExtension.ClientResult;' + return: + type: '<number>' + description: '' + - name: getItem(id) + uid: 'word!Word.CustomXmlPartCollection#getItem:member(1)' + package: word! + fullName: getItem(id) + summary: Gets a custom XML part based on its ID. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-custom-xml-part-ns.yaml + + + // Original XML: JuanHongSally + + + // Queries a custom XML part for elements matching the search terms. + + await Word.run(async (context) => { + const settings: Word.SettingCollection = context.document.settings; + const xmlPartIDSetting: Word.Setting = settings.getItemOrNullObject("ContosoReviewXmlPartIdNS").load("value"); + + await context.sync(); + + if (xmlPartIDSetting.value) { + const customXmlPart: Word.CustomXmlPart = context.document.customXmlParts.getItem(xmlPartIDSetting.value); + const xpathToQueryFor = "/contoso:Reviewers"; + const clientResult = customXmlPart.query(xpathToQueryFor, { + contoso: "http://schemas.contoso.com/review/1.0" + }); + + await context.sync(); + + console.log(`Queried custom XML part for ${xpathToQueryFor} and found ${clientResult.value.length} matches:`); + for (let i = 0; i < clientResult.value.length; i++) { + console.log(clientResult.value[i]); + } + } else { + console.warn("Didn't find custom XML part to query."); + } + }); + + + ... + + + // Original XML: + JuanHongSally + + + // Queries a custom XML part for elements matching the search terms. + + await Word.run(async (context) => { + const settings: Word.SettingCollection = context.document.settings; + const xmlPartIDSetting: Word.Setting = settings.getItemOrNullObject("ContosoReviewXmlPartId").load("value"); + + await context.sync(); + + if (xmlPartIDSetting.value) { + const customXmlPart: Word.CustomXmlPart = context.document.customXmlParts.getItem(xmlPartIDSetting.value); + const xpathToQueryFor = "/Reviewers/Reviewer"; + const clientResult = customXmlPart.query(xpathToQueryFor, { + contoso: "http://schemas.contoso.com/review/1.0" + }); + + await context.sync(); + + console.log(`Queried custom XML part for ${xpathToQueryFor} and found ${clientResult.value.length} matches:`); + for (let i = 0; i < clientResult.value.length; i++) { + console.log(clientResult.value[i]); + } + } else { + console.warn("Didn't find custom XML part to query."); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getItem(id: string): Word.CustomXmlPart;' + parameters: + - id: id + description: ID or index of the custom XML part to be retrieved. + type: string + return: + type: '' + description: '' + - name: getItemOrNullObject(id) + uid: 'word!Word.CustomXmlPartCollection#getItemOrNullObject:member(1)' + package: word! + fullName: getItemOrNullObject(id) + summary: >- + Gets a custom XML part based on its ID. If the CustomXmlPart doesn't exist, then this method will return an object + with its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getItemOrNullObject(id: string): Word.CustomXmlPart;' + parameters: + - id: id + description: Required. ID of the object to be retrieved. + type: string + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.CustomXmlPartCollection#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: >- + load(options?: Word.Interfaces.CustomXmlPartCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): + Word.CustomXmlPartCollection; + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: >- + & + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.CustomXmlPartCollection#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.CustomXmlPartCollection;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.CustomXmlPartCollection#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomXmlPartCollection;' + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: '' + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.CustomXmlPartCollection#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.CustomXmlPartCollection` object is an API object, the `toJSON` method + returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartCollectionData`) that contains + an "items" array with shallow copies of any loaded properties from the collection's items. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.CustomXmlPartCollectionData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.CustomXmlPartCollection#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.CustomXmlPartCollection;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.CustomXmlPartCollection#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.CustomXmlPartCollection;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.customxmlpartscopedcollection.yml b/docs/docs-ref-autogen/word_1_9/word/word.customxmlpartscopedcollection.yml new file mode 100644 index 0000000000..8293d7090d --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.customxmlpartscopedcollection.yml @@ -0,0 +1,269 @@ +### YamlMime:TSType +name: Word.CustomXmlPartScopedCollection +uid: 'word!Word.CustomXmlPartScopedCollection:class' +package: word! +fullName: Word.CustomXmlPartScopedCollection +summary: 'Contains the collection of [Word.CustomXmlPart](xref:word!Word.CustomXmlPart:class) objects with a specific namespace.' +remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-custom-xml-part-ns.yaml + + + // Original XML: JuanHongSally + + + // Gets the custom XML parts with the specified namespace URI. + + await Word.run(async (context) => { + const namespaceUri = "http://schemas.contoso.com/review/1.0"; + console.log(`Specified namespace URI: ${namespaceUri}`); + const scopedCustomXmlParts: Word.CustomXmlPartScopedCollection = + context.document.customXmlParts.getByNamespace(namespaceUri); + scopedCustomXmlParts.load("items"); + await context.sync(); + + console.log(`Number of custom XML parts found with this namespace: ${!scopedCustomXmlParts.items ? 0 : scopedCustomXmlParts.items.length}`); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.CustomXmlPartScopedCollection#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: items + uid: 'word!Word.CustomXmlPartScopedCollection#items:member' + package: word! + fullName: items + summary: Gets the loaded child items in this collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly items: Word.CustomXmlPart[];' + return: + type: '[]' +methods: + - name: getCount() + uid: 'word!Word.CustomXmlPartScopedCollection#getCount:member(1)' + package: word! + fullName: getCount() + summary: Gets the number of items in the collection. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getCount(): OfficeExtension.ClientResult;' + return: + type: '<number>' + description: '' + - name: getItem(id) + uid: 'word!Word.CustomXmlPartScopedCollection#getItem:member(1)' + package: word! + fullName: getItem(id) + summary: Gets a custom XML part based on its ID. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getItem(id: string): Word.CustomXmlPart;' + parameters: + - id: id + description: ID of the custom XML part to be retrieved. + type: string + return: + type: '' + description: '' + - name: getItemOrNullObject(id) + uid: 'word!Word.CustomXmlPartScopedCollection#getItemOrNullObject:member(1)' + package: word! + fullName: getItemOrNullObject(id) + summary: >- + Gets a custom XML part based on its ID. If the CustomXmlPart doesn't exist in the collection, then this method + will return an object with its `isNullObject` property set to `true`. For further information, see + [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getItemOrNullObject(id: string): Word.CustomXmlPart;' + parameters: + - id: id + description: Required. ID of the object to be retrieved. + type: string + return: + type: '' + description: '' + - name: getOnlyItem() + uid: 'word!Word.CustomXmlPartScopedCollection#getOnlyItem:member(1)' + package: word! + fullName: getOnlyItem() + summary: 'If the collection contains exactly one item, this method returns it. Otherwise, this method produces an error.' + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getOnlyItem(): Word.CustomXmlPart;' + return: + type: '' + description: '' + - name: getOnlyItemOrNullObject() + uid: 'word!Word.CustomXmlPartScopedCollection#getOnlyItemOrNullObject:member(1)' + package: word! + fullName: getOnlyItemOrNullObject() + summary: >- + If the collection contains exactly one item, this method returns it. Otherwise, this method will return an object + with its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getOnlyItemOrNullObject(): Word.CustomXmlPart;' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.CustomXmlPartScopedCollection#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: >- + load(options?: Word.Interfaces.CustomXmlPartScopedCollectionLoadOptions & + Word.Interfaces.CollectionLoadOptions): Word.CustomXmlPartScopedCollection; + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: >- + & + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.CustomXmlPartScopedCollection#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.CustomXmlPartScopedCollection;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.CustomXmlPartScopedCollection#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomXmlPartScopedCollection;' + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: '' + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.CustomXmlPartScopedCollection#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.CustomXmlPartScopedCollection` object is an API object, the `toJSON` + method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartScopedCollectionData`) + that contains an "items" array with shallow copies of any loaded properties from the collection's items. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.CustomXmlPartScopedCollectionData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.CustomXmlPartScopedCollection#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.CustomXmlPartScopedCollection;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.CustomXmlPartScopedCollection#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.CustomXmlPartScopedCollection;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.document.yml b/docs/docs-ref-autogen/word_1_9/word/word.document.yml new file mode 100644 index 0000000000..cad19f3ca9 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.document.yml @@ -0,0 +1,1640 @@ +### YamlMime:TSType +name: Word.Document +uid: 'word!Word.Document:class' +package: word! +fullName: Word.Document +summary: >- + The Document object is the top level object. A Document object contains one or more sections, content controls, and + the body that contains the contents of the document. +remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-change-tracking.yaml + + + // Gets the current change tracking mode. + + await Word.run(async (context) => { + const document: Word.Document = context.document; + document.load("changeTrackingMode"); + await context.sync(); + + if (document.changeTrackingMode === Word.ChangeTrackingMode.trackMineOnly) { + console.log("Only my changes are being tracked."); + } else if (document.changeTrackingMode === Word.ChangeTrackingMode.trackAll) { + console.log("Everyone's changes are being tracked."); + } else { + console.log("No changes are being tracked."); + } + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: body + uid: 'word!Word.Document#body:member' + package: word! + fullName: body + summary: >- + Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, + textboxes, etc. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly body: Word.Body;' + return: + type: '' + - name: changeTrackingMode + uid: 'word!Word.Document#changeTrackingMode:member' + package: word! + fullName: changeTrackingMode + summary: Specifies the ChangeTracking mode. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-change-tracking.yaml + + + // Gets the current change tracking mode. + + await Word.run(async (context) => { + const document: Word.Document = context.document; + document.load("changeTrackingMode"); + await context.sync(); + + if (document.changeTrackingMode === Word.ChangeTrackingMode.trackMineOnly) { + console.log("Only my changes are being tracked."); + } else if (document.changeTrackingMode === Word.ChangeTrackingMode.trackAll) { + console.log("Everyone's changes are being tracked."); + } else { + console.log("No changes are being tracked."); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'changeTrackingMode: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly";' + return: + type: ' | "Off" | "TrackAll" | "TrackMineOnly"' + - name: contentControls + uid: 'word!Word.Document#contentControls:member' + package: word! + fullName: contentControls + summary: >- + Gets the collection of content control objects in the document. This includes content controls in the body of the + document, headers, footers, textboxes, etc. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly contentControls: Word.ContentControlCollection;' + return: + type: '' + - name: context + uid: 'word!Word.Document#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: customXmlParts + uid: 'word!Word.Document#customXmlParts:member' + package: word! + fullName: customXmlParts + summary: Gets the custom XML parts in the document. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly customXmlParts: Word.CustomXmlPartCollection;' + return: + type: '' + - name: properties + uid: 'word!Word.Document#properties:member' + package: word! + fullName: properties + summary: Gets the properties of the document. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/30-properties/get-built-in-properties.yaml + + + await Word.run(async (context) => { + const builtInProperties: Word.DocumentProperties = context.document.properties; + builtInProperties.load("*"); // Let's get all! + + await context.sync(); + console.log(JSON.stringify(builtInProperties, null, 4)); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly properties: Word.DocumentProperties;' + return: + type: '' + - name: saved + uid: 'word!Word.Document#saved:member' + package: word! + fullName: saved + summary: >- + Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't + changed since it was saved. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly saved: boolean;' + return: + type: boolean + - name: sections + uid: 'word!Word.Document#sections:member' + package: word! + fullName: sections + summary: Gets the collection of section objects in the document. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly sections: Word.SectionCollection;' + return: + type: '' + - name: settings + uid: 'word!Word.Document#settings:member' + package: word! + fullName: settings + summary: Gets the add-in's settings in the document. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-settings.yaml + + + // Gets all custom settings this add-in set on this document. + + await Word.run(async (context) => { + const settings: Word.SettingCollection = context.document.settings; + settings.load("items"); + await context.sync(); + + if (settings.items.length == 0) { + console.log("There are no settings."); + } else { + console.log("All settings:"); + for (let i = 0; i < settings.items.length; i++) { + console.log(settings.items[i]); + } + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly settings: Word.SettingCollection;' + return: + type: '' +methods: + - name: 'addStyle(name, type)' + uid: 'word!Word.Document#addStyle:member(1)' + package: word! + fullName: 'addStyle(name, type)' + summary: Adds a style into the document by name and type. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-styles.yaml + + + // Adds a new style. + + await Word.run(async (context) => { + const newStyleName = $("#new-style-name").val() as string; + if (newStyleName == "") { + console.warn("Enter a style name to add."); + return; + } + + const style: Word.Style = context.document.getStyles().getByNameOrNullObject(newStyleName); + style.load(); + await context.sync(); + + if (!style.isNullObject) { + console.warn( + `There's an existing style with the same name '${newStyleName}'! Please provide another style name.` + ); + return; + } + + const newStyleType = ($("#new-style-type").val() as unknown) as Word.StyleType; + context.document.addStyle(newStyleName, newStyleType); + await context.sync(); + + console.log(newStyleName + " has been added to the style list."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'addStyle(name: string, type: Word.StyleType): Word.Style;' + parameters: + - id: name + description: Required. A string representing the style name. + type: string + - id: type + description: 'Required. The style type, including character, list, paragraph, or table.' + type: '' + return: + type: '' + description: '' + - name: 'addStyle(name, typeString)' + uid: 'word!Word.Document#addStyle:member(2)' + package: word! + fullName: 'addStyle(name, typeString)' + summary: Adds a style into the document by name and type. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'addStyle(name: string, typeString: "Character" | "List" | "Paragraph" | "Table"): Word.Style;' + parameters: + - id: name + description: Required. A string representing the style name. + type: string + - id: typeString + description: 'Required. The style type, including character, list, paragraph, or table.' + type: '"Character" | "List" | "Paragraph" | "Table"' + return: + type: '' + description: '' + - name: close(closeBehavior) + uid: 'word!Word.Document#close:member(1)' + package: word! + fullName: close(closeBehavior) + summary: |- + Closes the current document. + + Note: This API isn't supported in Word on the web. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/save-close.yaml + + + // Closes the document with default behavior + + // for current state of the document. + + await Word.run(async (context) => { + context.document.close(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'close(closeBehavior?: Word.CloseBehavior): void;' + parameters: + - id: closeBehavior + description: Optional. The close behavior must be 'Save' or 'SkipSave'. Default value is 'Save'. + type: '' + return: + type: void + description: '' + - name: close(closeBehaviorString) + uid: 'word!Word.Document#close:member(2)' + package: word! + fullName: close(closeBehaviorString) + summary: |- + Closes the current document. + + Note: This API isn't supported in Word on the web. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'close(closeBehaviorString?: "Save" | "SkipSave"): void;' + parameters: + - id: closeBehaviorString + description: Optional. The close behavior must be 'Save' or 'SkipSave'. Default value is 'Save'. + type: '"Save" | "SkipSave"' + return: + type: void + description: '' + - name: deleteBookmark(name) + uid: 'word!Word.Document#deleteBookmark:member(1)' + package: word! + fullName: deleteBookmark(name) + summary: 'Deletes a bookmark, if it exists, from the document.' + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'deleteBookmark(name: string): void;' + parameters: + - id: name + description: Required. The case-insensitive bookmark name. + type: string + return: + type: void + description: '' + - name: getAnnotationById(id) + uid: 'word!Word.Document#getAnnotationById:member(1)' + package: word! + fullName: getAnnotationById(id) + summary: Gets the annotation by ID. Throws an `ItemNotFound` error if annotation isn't found. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getAnnotationById(id: string): Word.Annotation;' + parameters: + - id: id + description: The ID of the annotation to get. + type: string + return: + type: '' + description: '' + - name: getBookmarkRange(name) + uid: 'word!Word.Document#getBookmarkRange:member(1)' + package: word! + fullName: getBookmarkRange(name) + summary: Gets a bookmark's range. Throws an `ItemNotFound` error if the bookmark doesn't exist. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getBookmarkRange(name: string): Word.Range;' + parameters: + - id: name + description: Required. The case-insensitive bookmark name. + type: string + return: + type: '' + description: '' + - name: getBookmarkRangeOrNullObject(name) + uid: 'word!Word.Document#getBookmarkRangeOrNullObject:member(1)' + package: word! + fullName: getBookmarkRangeOrNullObject(name) + summary: >- + Gets a bookmark's range. If the bookmark doesn't exist, then this method will return an object with its + `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getBookmarkRangeOrNullObject(name: string): Word.Range;' + parameters: + - id: name + description: Required. The case-insensitive bookmark name. + type: string + return: + type: '' + description: '' + - name: getContentControls(options) + uid: 'word!Word.Document#getContentControls:member(1)' + package: word! + fullName: getContentControls(options) + summary: Gets the currently supported content controls in the document. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Important: If specific types are provided in the options parameter, only content controls of supported types are + returned. Be aware that an exception will be thrown on using methods of a generic + [Word.ContentControl](xref:word!Word.ContentControl:class) that aren't relevant for the specific type. With time, + additional types of content controls may be supported. Therefore, your add-in should request and handle specific + types of content controls. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-checkbox-content-control.yaml + + + // Toggles the isChecked property on all checkbox content controls. + + await Word.run(async (context) => { + let contentControls = context.document.getContentControls({ + types: [Word.ContentControlType.checkBox] + }); + contentControls.load("items"); + + await context.sync(); + + const length = contentControls.items.length; + console.log(`Number of checkbox content controls: ${length}`); + + if (length <= 0) { + return; + } + + const checkboxContentControls = []; + for (let i = 0; i < length; i++) { + let contentControl = contentControls.items[i]; + contentControl.load("id,checkboxContentControl/isChecked"); + checkboxContentControls.push(contentControl); + } + + await context.sync(); + + console.log("isChecked state before:"); + const updatedCheckboxContentControls = []; + for (let i = 0; i < checkboxContentControls.length; i++) { + const currentCheckboxContentControl = checkboxContentControls[i]; + const isCheckedBefore = currentCheckboxContentControl.checkboxContentControl.isChecked; + console.log(`id: ${currentCheckboxContentControl.id} ... isChecked: ${isCheckedBefore}`); + + currentCheckboxContentControl.checkboxContentControl.isChecked = !isCheckedBefore; + currentCheckboxContentControl.load("id,checkboxContentControl/isChecked"); + updatedCheckboxContentControls.push(currentCheckboxContentControl); + } + + await context.sync(); + + console.log("isChecked state after:"); + for (let i = 0; i < updatedCheckboxContentControls.length; i++) { + const currentCheckboxContentControl = updatedCheckboxContentControls[i]; + console.log( + `id: ${currentCheckboxContentControl.id} ... isChecked: ${currentCheckboxContentControl.checkboxContentControl.isChecked}` + ); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection;' + parameters: + - id: options + description: Optional. Options that define which content controls are returned. + type: '' + return: + type: '' + description: '' + - name: getEndnoteBody() + uid: 'word!Word.Document#getEndnoteBody:member(1)' + package: word! + fullName: getEndnoteBody() + summary: Gets the document's endnotes in a single body. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getEndnoteBody(): Word.Body;' + return: + type: '' + description: '' + - name: getFootnoteBody() + uid: 'word!Word.Document#getFootnoteBody:member(1)' + package: word! + fullName: getFootnoteBody() + summary: Gets the document's footnotes in a single body. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFootnoteBody(): Word.Body;' + return: + type: '' + description: '' + - name: getParagraphByUniqueLocalId(id) + uid: 'word!Word.Document#getParagraphByUniqueLocalId:member(1)' + package: word! + fullName: getParagraphByUniqueLocalId(id) + summary: Gets the paragraph by its unique local ID. Throws an `ItemNotFound` error if the collection is empty. + remarks: >- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/onadded-event.yaml + + + await Word.run(async (context) => { + const paragraphId = $("#paragraph-id").val() as string; + const paragraph: Word.Paragraph = context.document.getParagraphByUniqueLocalId(paragraphId); + paragraph.load(); + await paragraph.context.sync(); + + console.log(paragraph); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getParagraphByUniqueLocalId(id: string): Word.Paragraph;' + parameters: + - id: id + description: >- + Required. Unique local ID in standard 8-4-4-4-12 GUID format without curly braces. Note that the ID differs + across sessions and coauthors. + type: string + return: + type: '' + description: '' + - name: getSelection() + uid: 'word!Word.Document#getSelection:member(1)' + package: word! + fullName: getSelection() + summary: Gets the current selection of the document. Multiple selections aren't supported. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + const textSample = 'This is an example of the insert text method. This is a method ' + + 'which allows users to insert text into a selection. It can insert text into a ' + + 'relative location or it can overwrite the current selection. Since the ' + + 'getSelection method returns a range object, look up the range object documentation ' + + 'for everything you can do with a selection.'; + + // Create a range proxy object for the current selection. + const range = context.document.getSelection(); + + // Queue a command to insert text at the end of the selection. + range.insertText(textSample, Word.InsertLocation.end); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Inserted the text at the end of the selection.'); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getSelection(): Word.Range;' + return: + type: '' + description: '' + - name: getStyles() + uid: 'word!Word.Document#getStyles:member(1)' + package: word! + fullName: getStyles() + summary: Gets a StyleCollection object that represents the whole style set of the document. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-styles.yaml + + + // Gets the number of available styles stored with the document. + + await Word.run(async (context) => { + const styles: Word.StyleCollection = context.document.getStyles(); + const count = styles.getCount(); + await context.sync(); + + console.log(`Number of styles: ${count.value}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getStyles(): Word.StyleCollection;' + return: + type: '' + description: '' + - name: 'importStylesFromJson(stylesJson, importedStylesConflictBehavior)' + uid: 'word!Word.Document#importStylesFromJson:member(1)' + package: word! + fullName: 'importStylesFromJson(stylesJson, importedStylesConflictBehavior)' + summary: Import styles from a JSON-formatted string. + remarks: >- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-custom-style.yaml + + + // Imports styles from JSON. + + await Word.run(async (context) => { + const str = + '{"styles":[{"baseStyle":"Default Paragraph Font","builtIn":false,"inUse":true,"linked":false,"nameLocal":"NewCharStyle","priority":2,"quickStyle":true,"type":"Character","unhideWhenUsed":false,"visibility":false,"paragraphFormat":null,"font":{"name":"DengXian Light","size":16.0,"bold":true,"italic":false,"color":"#F1A983","underline":"None","subscript":false,"superscript":true,"strikeThrough":true,"doubleStrikeThrough":false,"highlightColor":null,"hidden":false},"shading":{"backgroundPatternColor":"#FF0000"}},{"baseStyle":"Normal","builtIn":false,"inUse":true,"linked":false,"nextParagraphStyle":"NewParaStyle","nameLocal":"NewParaStyle","priority":1,"quickStyle":true,"type":"Paragraph","unhideWhenUsed":false,"visibility":false,"paragraphFormat":{"alignment":"Centered","firstLineIndent":0.0,"keepTogether":false,"keepWithNext":false,"leftIndent":72.0,"lineSpacing":18.0,"lineUnitAfter":0.0,"lineUnitBefore":0.0,"mirrorIndents":false,"outlineLevel":"OutlineLevelBodyText","rightIndent":72.0,"spaceAfter":30.0,"spaceBefore":30.0,"widowControl":true},"font":{"name":"DengXian","size":14.0,"bold":true,"italic":true,"color":"#8DD873","underline":"Single","subscript":false,"superscript":false,"strikeThrough":false,"doubleStrikeThrough":true,"highlightColor":null,"hidden":false},"shading":{"backgroundPatternColor":"#00FF00"}},{"baseStyle":"Table Normal","builtIn":false,"inUse":true,"linked":false,"nextParagraphStyle":"NewTableStyle","nameLocal":"NewTableStyle","priority":100,"type":"Table","unhideWhenUsed":false,"visibility":false,"paragraphFormat":{"alignment":"Left","firstLineIndent":0.0,"keepTogether":false,"keepWithNext":false,"leftIndent":0.0,"lineSpacing":12.0,"lineUnitAfter":0.0,"lineUnitBefore":0.0,"mirrorIndents":false,"outlineLevel":"OutlineLevelBodyText","rightIndent":0.0,"spaceAfter":0.0,"spaceBefore":0.0,"widowControl":true},"font":{"name":"DengXian","size":20.0,"bold":false,"italic":true,"color":"#D86DCB","underline":"None","subscript":false,"superscript":false,"strikeThrough":false,"doubleStrikeThrough":false,"highlightColor":null,"hidden":false},"tableStyle":{"allowBreakAcrossPage":true,"alignment":"Left","bottomCellMargin":0.0,"leftCellMargin":0.08,"rightCellMargin":0.08,"topCellMargin":0.0,"cellSpacing":0.0},"shading":{"backgroundPatternColor":"#60CAF3"}}]}'; + const styles = context.document.importStylesFromJson(str); + await context.sync(); + console.log("Styles imported from JSON:", styles); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): + OfficeExtension.ClientResult; + parameters: + - id: stylesJson + description: Required. A JSON-formatted string representing the styles. + type: string + - id: importedStylesConflictBehavior + description: >- + Optional. Specifies how to handle any imported styles with the same name as existing styles in the current + document. + type: Word.ImportedStylesConflictBehavior + return: + type: '<string[]>' + description: '' + - name: 'importStylesFromJson(stylesJson, importedStylesConflictBehaviorString)' + uid: 'word!Word.Document#importStylesFromJson:member(2)' + package: word! + fullName: 'importStylesFromJson(stylesJson, importedStylesConflictBehaviorString)' + summary: Import styles from a JSON-formatted string. + remarks: |- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + isPreview: false + isDeprecated: false + syntax: + content: >- + importStylesFromJson(stylesJson: string, importedStylesConflictBehaviorString?: "Ignore" | "Overwrite" | + "CreateNew"): OfficeExtension.ClientResult; + parameters: + - id: stylesJson + description: Required. A JSON-formatted string representing the styles. + type: string + - id: importedStylesConflictBehaviorString + description: >- + Optional. Specifies how to handle any imported styles with the same name as existing styles in the current + document. + type: '"Ignore" | "Overwrite" | "CreateNew"' + return: + type: '<string[]>' + description: '' + - name: 'insertFileFromBase64(base64File, insertLocation, insertFileOptions)' + uid: 'word!Word.Document#insertFileFromBase64:member(1)' + package: word! + fullName: 'insertFileFromBase64(base64File, insertLocation, insertFileOptions)' + summary: >- + Inserts a document into the target document at a specific location with additional properties. Headers, footers, + watermarks, and other section properties are copied by default. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form + field). Consider replacing such a form field with a content control or other option appropriate for your scenario. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/insert-external-document.yaml + + + // Inserts content (applying selected settings) from another document passed in as a Base64-encoded string. + + await Word.run(async (context) => { + // Use the Base64-encoded string representation of the selected .docx file. + context.document.insertFileFromBase64(externalDocument, "Replace", { + importTheme: true, + importStyles: true, + importParagraphSpacing: true, + importPageColor: true, + importChangeTrackingMode: true, + importCustomProperties: true, + importCustomXmlParts: true, + importDifferentOddEvenPages: true + }); + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start + | Word.InsertLocation.end | "Replace" | "Start" | "End", insertFileOptions?: Word.InsertFileOptions): + Word.SectionCollection; + parameters: + - id: base64File + description: Required. The Base64-encoded content of a .docx file. + type: string + - id: insertLocation + description: 'Required. The value must be ''Replace'', ''Start'', or ''End''.' + type: >- + | | | "Replace" | "Start" | "End" + - id: insertFileOptions + description: Optional. The additional properties that should be imported to the destination document. + type: '' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.Document#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.DocumentLoadOptions): Word.Document;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: |- + + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the document. + const thisDocument = context.document; + + // Queue a command to load content control properties. + thisDocument.load('contentControls/id, contentControls/text, contentControls/tag'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + if (thisDocument.contentControls.items.length !== 0) { + for (let i = 0; i < thisDocument.contentControls.items.length; i++) { + console.log(thisDocument.contentControls.items[i].id); + console.log(thisDocument.contentControls.items[i].text); + console.log(thisDocument.contentControls.items[i].tag); + } + } else { + console.log('No content controls in this document.'); + } + }); + ``` + - name: load(propertyNames) + uid: 'word!Word.Document#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.Document;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.Document#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Document; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: 'save(saveBehavior, fileName)' + uid: 'word!Word.Document#save:member(1)' + package: word! + fullName: 'save(saveBehavior, fileName)' + summary: Saves the document. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Note: The `saveBehavior` and `fileName` parameters were introduced in WordApi 1.5. + + + #### Examples + + + ```TypeScript + + // Run a batch operation against the Word object model. + + await Word.run(async (context) => { + + // Create a proxy object for the document. + const thisDocument = context.document; + + // Queue a command to load the document save state (on the saved property). + thisDocument.load('saved'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + + if (thisDocument.saved === false) { + // Queue a command to save this document. + thisDocument.save(); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Saved the document'); + } else { + console.log('The document has not changed since the last save.'); + } + }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/save-close.yaml + + + // Saves the document with default behavior + + // for current state of the document. + + await Word.run(async (context) => { + context.document.save(); + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'save(saveBehavior?: Word.SaveBehavior, fileName?: string): void;' + parameters: + - id: saveBehavior + description: Optional. The save behavior must be 'Save' or 'Prompt'. Default value is 'Save'. + type: '' + - id: fileName + description: Optional. The file name (exclude file extension). Only takes effect for a new document. + type: string + return: + type: void + description: '' + - name: 'save(saveBehaviorString, fileName)' + uid: 'word!Word.Document#save:member(2)' + package: word! + fullName: 'save(saveBehaviorString, fileName)' + summary: Saves the document. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + Note: The `saveBehavior` and `fileName` parameters were introduced in WordApi 1.5. + isPreview: false + isDeprecated: false + syntax: + content: 'save(saveBehaviorString?: "Save" | "Prompt", fileName?: string): void;' + parameters: + - id: saveBehaviorString + description: Optional. The save behavior must be 'Save' or 'Prompt'. Default value is 'Save'. + type: '"Save" | "Prompt"' + - id: fileName + description: Optional. The file name (exclude file extension). Only takes effect for a new document. + type: string + return: + type: void + description: '' + - name: 'search(searchText, searchOptions)' + uid: 'word!Word.Document#search:member(1)' + package: word! + fullName: 'search(searchText, searchOptions)' + summary: >- + Performs a search with the specified search options on the scope of the whole document. The search results are a + collection of range objects. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: |- + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + parameters: + - id: searchText + description: '' + type: string + - id: searchOptions + description: '' + type: |- + | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + } + return: + type: '' + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.Document#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.DocumentUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.Document#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.Document): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.Document#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.Document` object is an API object, the `toJSON` method returns a plain + JavaScript object (typed as `Word.Interfaces.DocumentData`) that contains shallow copies of any loaded + child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.DocumentData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.Document#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.Document;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.Document#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.Document;' + return: + type: '' + description: '' +events: + - name: onAnnotationClicked + uid: 'word!Word.Document#onAnnotationClicked:member' + package: word! + fullName: onAnnotationClicked + summary: Occurs when the user clicks an annotation (or selects it using **Alt+Down**). + remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Registers event handlers. + + await Word.run(async (context) => { + eventContexts[0] = context.document.onParagraphAdded.add(paragraphChanged); + eventContexts[1] = context.document.onParagraphChanged.add(paragraphChanged); + + eventContexts[2] = context.document.onAnnotationClicked.add(onClickedHandler); + eventContexts[3] = context.document.onAnnotationHovered.add(onHoveredHandler); + eventContexts[4] = context.document.onAnnotationInserted.add(onInsertedHandler); + eventContexts[5] = context.document.onAnnotationRemoved.add(onRemovedHandler); + eventContexts[6] = context.document.onAnnotationPopupAction.add(onPopupActionHandler); + + await context.sync(); + + console.log("Event handlers registered."); + }); + + + ... + + + async function onClickedHandler(args: Word.AnnotationClickedEventArgs) { + await Word.run(async (context) => { + const annotation: Word.Annotation = context.document.getAnnotationById(args.id); + annotation.load("critiqueAnnotation"); + + await context.sync(); + + console.log(`AnnotationClicked: ID ${args.id}:`, annotation.critiqueAnnotation.critique); + }); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly onAnnotationClicked: OfficeExtension.EventHandlers;' + return: + type: >- + <> + - name: onAnnotationHovered + uid: 'word!Word.Document#onAnnotationHovered:member' + package: word! + fullName: onAnnotationHovered + summary: Occurs when the user hovers the cursor over an annotation. + remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Registers event handlers. + + await Word.run(async (context) => { + eventContexts[0] = context.document.onParagraphAdded.add(paragraphChanged); + eventContexts[1] = context.document.onParagraphChanged.add(paragraphChanged); + + eventContexts[2] = context.document.onAnnotationClicked.add(onClickedHandler); + eventContexts[3] = context.document.onAnnotationHovered.add(onHoveredHandler); + eventContexts[4] = context.document.onAnnotationInserted.add(onInsertedHandler); + eventContexts[5] = context.document.onAnnotationRemoved.add(onRemovedHandler); + eventContexts[6] = context.document.onAnnotationPopupAction.add(onPopupActionHandler); + + await context.sync(); + + console.log("Event handlers registered."); + }); + + + ... + + + async function onHoveredHandler(args: Word.AnnotationHoveredEventArgs) { + await Word.run(async (context) => { + const annotation: Word.Annotation = context.document.getAnnotationById(args.id); + annotation.load("critiqueAnnotation"); + + await context.sync(); + + console.log(`AnnotationHovered: ID ${args.id}:`, annotation.critiqueAnnotation.critique); + }); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly onAnnotationHovered: OfficeExtension.EventHandlers;' + return: + type: >- + <> + - name: onAnnotationInserted + uid: 'word!Word.Document#onAnnotationInserted:member' + package: word! + fullName: onAnnotationInserted + summary: Occurs when the user adds one or more annotations. + remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Registers event handlers. + + await Word.run(async (context) => { + eventContexts[0] = context.document.onParagraphAdded.add(paragraphChanged); + eventContexts[1] = context.document.onParagraphChanged.add(paragraphChanged); + + eventContexts[2] = context.document.onAnnotationClicked.add(onClickedHandler); + eventContexts[3] = context.document.onAnnotationHovered.add(onHoveredHandler); + eventContexts[4] = context.document.onAnnotationInserted.add(onInsertedHandler); + eventContexts[5] = context.document.onAnnotationRemoved.add(onRemovedHandler); + eventContexts[6] = context.document.onAnnotationPopupAction.add(onPopupActionHandler); + + await context.sync(); + + console.log("Event handlers registered."); + }); + + + ... + + + async function onInsertedHandler(args: Word.AnnotationInsertedEventArgs) { + await Word.run(async (context) => { + const annotations = []; + for (let i = 0; i < args.ids.length; i++) { + let annotation: Word.Annotation = context.document.getAnnotationById(args.ids[i]); + annotation.load("id,critiqueAnnotation"); + + annotations.push(annotation); + } + + await context.sync(); + + for (let annotation of annotations) { + console.log(`AnnotationInserted: ID ${annotation.id}:`, annotation.critiqueAnnotation.critique); + } + }); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly onAnnotationInserted: OfficeExtension.EventHandlers;' + return: + type: >- + <> + - name: onAnnotationPopupAction + uid: 'word!Word.Document#onAnnotationPopupAction:member' + package: word! + fullName: onAnnotationPopupAction + summary: Occurs when the user performs an action in an annotation pop-up menu. + remarks: >- + \[ [API set: WordApi 1.8](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Registers event handlers. + + await Word.run(async (context) => { + eventContexts[0] = context.document.onParagraphAdded.add(paragraphChanged); + eventContexts[1] = context.document.onParagraphChanged.add(paragraphChanged); + + eventContexts[2] = context.document.onAnnotationClicked.add(onClickedHandler); + eventContexts[3] = context.document.onAnnotationHovered.add(onHoveredHandler); + eventContexts[4] = context.document.onAnnotationInserted.add(onInsertedHandler); + eventContexts[5] = context.document.onAnnotationRemoved.add(onRemovedHandler); + eventContexts[6] = context.document.onAnnotationPopupAction.add(onPopupActionHandler); + + await context.sync(); + + console.log("Event handlers registered."); + }); + + + ... + + + async function onPopupActionHandler(args: Word.AnnotationPopupActionEventArgs) { + await Word.run(async (context) => { + let message = `AnnotationPopupAction: ID ${args.id} = `; + if (args.action === "Accept") { + message += `Accepted: ${args.critiqueSuggestion}`; + } else { + message += "Rejected"; + } + + console.log(message); + }); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly onAnnotationPopupAction: OfficeExtension.EventHandlers;' + return: + type: >- + <> + - name: onAnnotationRemoved + uid: 'word!Word.Document#onAnnotationRemoved:member' + package: word! + fullName: onAnnotationRemoved + summary: Occurs when the user deletes one or more annotations. + remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Registers event handlers. + + await Word.run(async (context) => { + eventContexts[0] = context.document.onParagraphAdded.add(paragraphChanged); + eventContexts[1] = context.document.onParagraphChanged.add(paragraphChanged); + + eventContexts[2] = context.document.onAnnotationClicked.add(onClickedHandler); + eventContexts[3] = context.document.onAnnotationHovered.add(onHoveredHandler); + eventContexts[4] = context.document.onAnnotationInserted.add(onInsertedHandler); + eventContexts[5] = context.document.onAnnotationRemoved.add(onRemovedHandler); + eventContexts[6] = context.document.onAnnotationPopupAction.add(onPopupActionHandler); + + await context.sync(); + + console.log("Event handlers registered."); + }); + + + ... + + + async function onRemovedHandler(args: Word.AnnotationRemovedEventArgs) { + await Word.run(async (context) => { + for (let id of args.ids) { + console.log(`AnnotationRemoved: ID ${id}`); + } + }); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly onAnnotationRemoved: OfficeExtension.EventHandlers;' + return: + type: >- + <> + - name: onContentControlAdded + uid: 'word!Word.Document#onContentControlAdded:member' + package: word! + fullName: onContentControlAdded + summary: >- + Occurs when a content control is added. Run context.sync() in the handler to get the new content control's + properties. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/content-control-onadded-event.yaml + + + // Registers the onAdded event handler on the document. + + await Word.run(async (context) => { + eventContext = context.document.onContentControlAdded.add(contentControlAdded); + await context.sync(); + + console.log("Added event handler for when content controls are added."); + }); + + + ... + + + async function contentControlAdded(event: Word.ContentControlAddedEventArgs) { + await Word.run(async (context) => { + console.log(`${event.eventType} event detected. IDs of content controls that were added:`, event.ids); + }); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly onContentControlAdded: OfficeExtension.EventHandlers;' + return: + type: >- + <> + - name: onParagraphAdded + uid: 'word!Word.Document#onParagraphAdded:member' + package: word! + fullName: onParagraphAdded + summary: Occurs when the user adds new paragraphs. + remarks: >- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/onadded-event.yaml + + + // Registers the onParagraphAdded event handler on the document. + + await Word.run(async (context) => { + eventContext = context.document.onParagraphAdded.add(paragraphAdded); + await context.sync(); + + console.log("Added event handler for when paragraphs are added."); + }); + + + ... + + + async function paragraphAdded(event: Word.ParagraphAddedEventArgs) { + await Word.run(async (context) => { + console.log(`${event.type} event detected. IDs of paragraphs that were added:`, event.uniqueLocalIds); + }); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly onParagraphAdded: OfficeExtension.EventHandlers;' + return: + type: >- + <> + - name: onParagraphChanged + uid: 'word!Word.Document#onParagraphChanged:member' + package: word! + fullName: onParagraphChanged + summary: Occurs when the user changes paragraphs. + remarks: >- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/onchanged-event.yaml + + + // Registers the onParagraphChanged event handler on the document. + + await Word.run(async (context) => { + eventContext = context.document.onParagraphChanged.add(paragraphChanged); + await context.sync(); + + console.log("Added event handler for when content is changed in paragraphs."); + }); + + + ... + + + async function paragraphChanged(event: Word.ParagraphChangedEventArgs) { + await Word.run(async (context) => { + console.log(`${event.type} event detected. IDs of paragraphs where content was changed:`, event.uniqueLocalIds); + }); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly onParagraphChanged: OfficeExtension.EventHandlers;' + return: + type: >- + <> + - name: onParagraphDeleted + uid: 'word!Word.Document#onParagraphDeleted:member' + package: word! + fullName: onParagraphDeleted + summary: Occurs when the user deletes paragraphs. + remarks: >- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/ondeleted-event.yaml + + + // Registers the onParagraphDeleted event handler on the document. + + await Word.run(async (context) => { + eventContext = context.document.onParagraphDeleted.add(paragraphDeleted); + await context.sync(); + + console.log("Added event handlers for when paragraphs are deleted."); + }); + + + ... + + + async function paragraphDeleted(event: Word.ParagraphDeletedEventArgs) { + await Word.run(async (context) => { + console.log(`${event.type} event detected. IDs of paragraphs that were deleted:`, event.uniqueLocalIds); + }); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly onParagraphDeleted: OfficeExtension.EventHandlers;' + return: + type: >- + <> +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.documentcreated.yml b/docs/docs-ref-autogen/word_1_9/word/word.documentcreated.yml new file mode 100644 index 0000000000..6c0a6095d5 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.documentcreated.yml @@ -0,0 +1,250 @@ +### YamlMime:TSType +name: Word.DocumentCreated +uid: 'word!Word.DocumentCreated:class' +package: word! +fullName: Word.DocumentCreated +summary: >- + The DocumentCreated object is the top level object created by Application.CreateDocument. A DocumentCreated object is + a special Document object. +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/insert-external-document.yaml + + + // Updates the text of the current document with the text from another document passed in as a Base64-encoded string. + + await Word.run(async (context) => { + // Use the Base64-encoded string representation of the selected .docx file. + const externalDoc: Word.DocumentCreated = context.application.createDocument(externalDocument); + await context.sync(); + + const externalDocBody: Word.Body = externalDoc.body; + externalDocBody.load("text"); + await context.sync(); + + // Insert the external document's text at the beginning of the current document's body. + const externalDocBodyText = externalDocBody.text; + const currentDocBody: Word.Body = context.document.body; + currentDocBody.insertText(externalDocBodyText, Word.InsertLocation.start); + await context.sync(); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.DocumentCreated#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' +methods: + - name: load(options) + uid: 'word!Word.DocumentCreated#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.DocumentCreatedLoadOptions): Word.DocumentCreated;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.DocumentCreated#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.DocumentCreated;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.DocumentCreated#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.DocumentCreated; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: open() + uid: 'word!Word.DocumentCreated#open:member(1)' + package: word! + fullName: open() + summary: Opens the document. + remarks: |- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Create and open a new document in a new tab or window. + await Word.run(async (context) => { + const externalDoc = context.application.createDocument(); + await context.sync(); + + externalDoc.open(); + await context.sync(); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'open(): void;' + return: + type: void + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.DocumentCreated#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.DocumentCreatedUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.DocumentCreated#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.DocumentCreated): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.DocumentCreated#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.DocumentCreated` object is an API object, the `toJSON` method returns a + plain JavaScript object (typed as `Word.Interfaces.DocumentCreatedData`) that contains shallow copies of + any loaded child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.DocumentCreatedData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.DocumentCreated#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.DocumentCreated;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.DocumentCreated#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.DocumentCreated;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.documentproperties.yml b/docs/docs-ref-autogen/word_1_9/word/word.documentproperties.yml new file mode 100644 index 0000000000..08e2dd70ec --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.documentproperties.yml @@ -0,0 +1,436 @@ +### YamlMime:TSType +name: Word.DocumentProperties +uid: 'word!Word.DocumentProperties:class' +package: word! +fullName: Word.DocumentProperties +summary: Represents document properties. +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/30-properties/get-built-in-properties.yaml + + + await Word.run(async (context) => { + const builtInProperties: Word.DocumentProperties = context.document.properties; + builtInProperties.load("*"); // Let's get all! + + await context.sync(); + console.log(JSON.stringify(builtInProperties, null, 4)); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: applicationName + uid: 'word!Word.DocumentProperties#applicationName:member' + package: word! + fullName: applicationName + summary: Gets the application name of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly applicationName: string;' + return: + type: string + - name: author + uid: 'word!Word.DocumentProperties#author:member' + package: word! + fullName: author + summary: Specifies the author of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'author: string;' + return: + type: string + - name: category + uid: 'word!Word.DocumentProperties#category:member' + package: word! + fullName: category + summary: Specifies the category of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'category: string;' + return: + type: string + - name: comments + uid: 'word!Word.DocumentProperties#comments:member' + package: word! + fullName: comments + summary: >- + Specifies the Comments field in the metadata of the document. These have no connection to comments by users made + in the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'comments: string;' + return: + type: string + - name: company + uid: 'word!Word.DocumentProperties#company:member' + package: word! + fullName: company + summary: Specifies the company of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'company: string;' + return: + type: string + - name: context + uid: 'word!Word.DocumentProperties#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: creationDate + uid: 'word!Word.DocumentProperties#creationDate:member' + package: word! + fullName: creationDate + summary: Gets the creation date of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly creationDate: Date;' + return: + type: Date + - name: customProperties + uid: 'word!Word.DocumentProperties#customProperties:member' + package: word! + fullName: customProperties + summary: Gets the collection of custom properties of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly customProperties: Word.CustomPropertyCollection;' + return: + type: '' + - name: format + uid: 'word!Word.DocumentProperties#format:member' + package: word! + fullName: format + summary: Specifies the format of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'format: string;' + return: + type: string + - name: keywords + uid: 'word!Word.DocumentProperties#keywords:member' + package: word! + fullName: keywords + summary: Specifies the keywords of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'keywords: string;' + return: + type: string + - name: lastAuthor + uid: 'word!Word.DocumentProperties#lastAuthor:member' + package: word! + fullName: lastAuthor + summary: Gets the last author of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly lastAuthor: string;' + return: + type: string + - name: lastPrintDate + uid: 'word!Word.DocumentProperties#lastPrintDate:member' + package: word! + fullName: lastPrintDate + summary: Gets the last print date of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly lastPrintDate: Date;' + return: + type: Date + - name: lastSaveTime + uid: 'word!Word.DocumentProperties#lastSaveTime:member' + package: word! + fullName: lastSaveTime + summary: Gets the last save time of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly lastSaveTime: Date;' + return: + type: Date + - name: manager + uid: 'word!Word.DocumentProperties#manager:member' + package: word! + fullName: manager + summary: Specifies the manager of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'manager: string;' + return: + type: string + - name: revisionNumber + uid: 'word!Word.DocumentProperties#revisionNumber:member' + package: word! + fullName: revisionNumber + summary: Gets the revision number of the document. + remarks: '\[ [API set: WordApi 1.3](/office/dev/add-ins/reference/overview/visio-javascript-reference-overview) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly revisionNumber: string;' + return: + type: string + - name: security + uid: 'word!Word.DocumentProperties#security:member' + package: word! + fullName: security + summary: >- + Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document + Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is + encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: + Both \#1 and \#2; 4 = File on disk is read-only; 5 = Both \#1 and \#4; 6 = Both \#2 and \#4; 7 = All of \#1, \#2, + and \#4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both \#1 and \#8; 10 = Both \#2 and \#8; 11 = All + of \#1, \#2, and \#8; 12 = Both \#4 and \#8; 13 = All of \#1, \#4, and \#8; 14 = All of \#2, \#4, and \#8; 15 = + All of \#1, \#2, \#4, and \#8. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly security: number;' + return: + type: number + - name: subject + uid: 'word!Word.DocumentProperties#subject:member' + package: word! + fullName: subject + summary: Specifies the subject of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'subject: string;' + return: + type: string + - name: template + uid: 'word!Word.DocumentProperties#template:member' + package: word! + fullName: template + summary: Gets the template of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly template: string;' + return: + type: string + - name: title + uid: 'word!Word.DocumentProperties#title:member' + package: word! + fullName: title + summary: Specifies the title of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'title: string;' + return: + type: string +methods: + - name: load(options) + uid: 'word!Word.DocumentProperties#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.DocumentPropertiesLoadOptions): Word.DocumentProperties;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.DocumentProperties#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.DocumentProperties;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.DocumentProperties#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.DocumentProperties; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.DocumentProperties#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.DocumentPropertiesUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.DocumentProperties#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.DocumentProperties): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.DocumentProperties#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.DocumentProperties` object is an API object, the `toJSON` method returns + a plain JavaScript object (typed as `Word.Interfaces.DocumentPropertiesData`) that contains shallow copies + of any loaded child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.DocumentPropertiesData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.DocumentProperties#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.DocumentProperties;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.DocumentProperties#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.DocumentProperties;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.documentpropertytype.yml b/docs/docs-ref-autogen/word_1_9/word/word.documentpropertytype.yml new file mode 100644 index 0000000000..9c0f1d053a --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.documentpropertytype.yml @@ -0,0 +1,52 @@ +### YamlMime:TSEnum +name: Word.DocumentPropertyType +uid: 'word!Word.DocumentPropertyType:enum' +package: word! +fullName: Word.DocumentPropertyType +summary: '' +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // 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); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: boolean + uid: 'word!Word.DocumentPropertyType.boolean:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Boolean"' + - name: date + uid: 'word!Word.DocumentPropertyType.date:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Date"' + - name: number + uid: 'word!Word.DocumentPropertyType.number:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Number"' + - name: string + uid: 'word!Word.DocumentPropertyType.string:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"String"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.dropdownlistcontentcontrol.yml b/docs/docs-ref-autogen/word_1_9/word/word.dropdownlistcontentcontrol.yml new file mode 100644 index 0000000000..903908d8a9 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.dropdownlistcontentcontrol.yml @@ -0,0 +1,359 @@ +### YamlMime:TSType +name: Word.DropDownListContentControl +uid: 'word!Word.DropDownListContentControl:class' +package: word! +fullName: Word.DropDownListContentControl +summary: The data specific to content controls of type DropDownList. +remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml + + + // Places a dropdown list content control at the end of the selection. + + await Word.run(async (context) => { + let selection = context.document.getSelection(); + selection.getRange(Word.RangeLocation.end).insertContentControl(Word.ContentControlType.dropDownList); + await context.sync(); + + console.log("Dropdown list content control inserted at the end of the selection."); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.DropDownListContentControl#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: listItems + uid: 'word!Word.DropDownListContentControl#listItems:member' + package: word! + fullName: listItems + summary: Gets the collection of list items in the dropdown list content control. + remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml + + + // Deletes the provided list item from the first dropdown list content control in the selection. + + await Word.run(async (context) => { + const listItemText = $("#item-to-delete") + .val() + .toString() + .trim(); + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.dropDownList] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,dropDownListContentControl"); + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,dropDownListContentControl"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.dropDownList) { + console.warn("No dropdown list content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + let selectedDropdownList: Word.DropDownListContentControl = selectedContentControl.dropDownListContentControl; + selectedDropdownList.listItems.load("items/*"); + await context.sync(); + + let listItems: Word.ContentControlListItemCollection = selectedContentControl.dropDownListContentControl.listItems; + let itemToDelete: Word.ContentControlListItem = listItems.items.find((item) => item.displayText === listItemText); + if (!itemToDelete) { + console.warn(`List item doesn't exist in control with ID ${selectedContentControl.id}: ${listItemText}`) + return; + } + + itemToDelete.delete(); + await context.sync(); + + console.log(`List item deleted from control with ID ${selectedContentControl.id}: ${listItemText}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly listItems: Word.ContentControlListItemCollection;' + return: + type: '' +methods: + - name: 'addListItem(displayText, value, index)' + uid: 'word!Word.DropDownListContentControl#addListItem:member(1)' + package: word! + fullName: 'addListItem(displayText, value, index)' + summary: >- + Adds a new list item to this dropdown list content control and returns a + [Word.ContentControlListItem](xref:word!Word.ContentControlListItem:class) object. + remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml + + + // Adds the provided list item to the first dropdown list content control in the selection. + + await Word.run(async (context) => { + const listItemText = $("#item-to-add") + .val() + .toString() + .trim(); + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.dropDownList] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,dropDownListContentControl"); + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,dropDownListContentControl"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.dropDownList) { + console.warn("No dropdown list content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + selectedContentControl.dropDownListContentControl.addListItem(listItemText); + await context.sync(); + + console.log(`List item added to control with ID ${selectedContentControl.id}: ${listItemText}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem;' + parameters: + - id: displayText + description: Required. Display text of the list item. + type: string + - id: value + description: Optional. Value of the list item. + type: string + - id: index + description: >- + Optional. Index location of the new item in the list. If an item exists at the position specified, the + existing item is pushed down in the list. If omitted, the new item is added to the end of the list. + type: number + return: + type: '' + description: '' + - name: deleteAllListItems() + uid: 'word!Word.DropDownListContentControl#deleteAllListItems:member(1)' + package: word! + fullName: deleteAllListItems() + summary: Deletes all list items in this dropdown list content control. + remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml + + + // Deletes the list items from first dropdown list content control found in the selection. + + await Word.run(async (context) => { + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.dropDownList] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,dropDownListContentControl"); + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,dropDownListContentControl"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.dropDownList) { + console.warn("No dropdown list content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + console.log( + `About to delete the list from the dropdown list content control with ID ${selectedContentControl.id}` + ); + selectedContentControl.dropDownListContentControl.deleteAllListItems(); + await context.sync(); + + console.log("Deleted the list from the dropdown list content control."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'deleteAllListItems(): void;' + return: + type: void + description: '' + - name: load(propertyNames) + uid: 'word!Word.DropDownListContentControl#load:member(1)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.DropDownListContentControl;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.DropDownListContentControl#load:member(2)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.DropDownListContentControl; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.DropDownListContentControl#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is + passed to it.) Whereas the original `Word.DropDownListContentControl` object is an API object, the `toJSON` method + returns a plain JavaScript object (typed as `Word.Interfaces.DropDownListContentControlData`) that + contains shallow copies of any loaded child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.DropDownListContentControlData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.DropDownListContentControl#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.DropDownListContentControl;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.DropDownListContentControl#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.DropDownListContentControl;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.errorcodes.yml b/docs/docs-ref-autogen/word_1_9/word/word.errorcodes.yml new file mode 100644 index 0000000000..819c38f852 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.errorcodes.yml @@ -0,0 +1,75 @@ +### YamlMime:TSEnum +name: Word.ErrorCodes +uid: 'word!Word.ErrorCodes:enum' +package: word! +fullName: Word.ErrorCodes +summary: '' +remarks: >- + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-checkbox-content-control.yaml + + + async function tryCatch(callback) { + try { + await callback(); + } catch (error) { + // Note: In a production add-in, you'd want to notify the user through your add-in's UI. + if (error.code === Word.ErrorCodes.itemNotFound) { + console.warn("No checkbox content control is currently selected."); + } else { + console.error(error); + } + } + } + + ``` +isPreview: false +isDeprecated: false +fields: + - name: accessDenied + uid: 'word!Word.ErrorCodes.accessDenied:member' + package: word! + summary: '' + value: '"AccessDenied"' + - name: generalException + uid: 'word!Word.ErrorCodes.generalException:member' + package: word! + summary: '' + value: '"GeneralException"' + - name: invalidArgument + uid: 'word!Word.ErrorCodes.invalidArgument:member' + package: word! + summary: '' + value: '"InvalidArgument"' + - name: itemNotFound + uid: 'word!Word.ErrorCodes.itemNotFound:member' + package: word! + summary: '' + value: '"ItemNotFound"' + - name: notAllowed + uid: 'word!Word.ErrorCodes.notAllowed:member' + package: word! + summary: '' + value: '"NotAllowed"' + - name: notImplemented + uid: 'word!Word.ErrorCodes.notImplemented:member' + package: word! + summary: '' + value: '"NotImplemented"' + - name: searchDialogIsOpen + uid: 'word!Word.ErrorCodes.searchDialogIsOpen:member' + package: word! + summary: '' + value: '"SearchDialogIsOpen"' + - name: searchStringInvalidOrTooLong + uid: 'word!Word.ErrorCodes.searchStringInvalidOrTooLong:member' + package: word! + summary: '' + value: '"SearchStringInvalidOrTooLong"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.eventsource.yml b/docs/docs-ref-autogen/word_1_9/word/word.eventsource.yml new file mode 100644 index 0000000000..7de251249e --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.eventsource.yml @@ -0,0 +1,61 @@ +### YamlMime:TSEnum +name: Word.EventSource +uid: 'word!Word.EventSource:enum' +package: word! +fullName: Word.EventSource +summary: An enum that specifies an event's source. It can be local or remote (through coauthoring). +remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/manage-comments.yaml + + + // Registers event handlers. + + await Word.run(async (context) => { + const body: Word.Body = context.document.body; + body.track(); + await context.sync(); + + eventContexts[0] = body.onCommentAdded.add(onEventHandler); + eventContexts[1] = body.onCommentChanged.add(onChangedHandler); + eventContexts[2] = body.onCommentDeleted.add(onEventHandler); + eventContexts[3] = body.onCommentDeselected.add(onEventHandler); + eventContexts[4] = body.onCommentSelected.add(onEventHandler); + await context.sync(); + + console.log("Event handlers registered."); + }); + + + ... + + + async function onEventHandler(event: Word.CommentEventArgs) { + // Handler for all events except onCommentChanged. + await Word.run(async (context) => { + console.log(`${event.type} event detected. Event source: ${event.source}. Comment info:`, event.commentDetails); + }); + } + + ``` +isPreview: false +isDeprecated: false +fields: + - name: local + uid: 'word!Word.EventSource.local:member' + package: word! + summary: '* \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Local"' + - name: remote + uid: 'word!Word.EventSource.remote:member' + package: word! + summary: '* \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Remote"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.eventtype.yml b/docs/docs-ref-autogen/word_1_9/word/word.eventtype.yml new file mode 100644 index 0000000000..8c8986ec81 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.eventtype.yml @@ -0,0 +1,141 @@ +### YamlMime:TSEnum +name: Word.EventType +uid: 'word!Word.EventType:enum' +package: word! +fullName: Word.EventType +summary: Provides information about the type of a raised event. +remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/content-control-ondeleted-event.yaml + + + async function contentControlDeleted(event: Word.ContentControlDeletedEventArgs) { + await Word.run(async (context) => { + console.log(`${event.eventType} event detected. IDs of content controls that were deleted:`, event.ids); + }); + } + + ``` +isPreview: false +isDeprecated: false +fields: + - name: annotationClicked + uid: 'word!Word.EventType.annotationClicked:member' + package: word! + summary: |- + Represents that an annotation was clicked (or selected with **Alt+Down**) in the document. + + * \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"AnnotationClicked"' + - name: annotationHovered + uid: 'word!Word.EventType.annotationHovered:member' + package: word! + summary: |- + Represents that an annotation was hovered over in the document. + + * \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"AnnotationHovered"' + - name: annotationInserted + uid: 'word!Word.EventType.annotationInserted:member' + package: word! + summary: |- + Represents that one or more annotations were added in the document. + + * \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"AnnotationInserted"' + - name: annotationPopupAction + uid: 'word!Word.EventType.annotationPopupAction:member' + package: word! + summary: |- + Represents an action in the annotation pop-up. + + * \[ [API set: WordApi 1.8](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"AnnotationPopupAction"' + - name: annotationRemoved + uid: 'word!Word.EventType.annotationRemoved:member' + package: word! + summary: |- + Represents that one or more annotations were deleted from the document. + + * \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"AnnotationRemoved"' + - name: contentControlAdded + uid: 'word!Word.EventType.contentControlAdded:member' + package: word! + summary: |- + ContentControlAdded represents the event a content control has been added to the document. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"ContentControlAdded"' + - name: contentControlDataChanged + uid: 'word!Word.EventType.contentControlDataChanged:member' + package: word! + summary: |- + ContentControlDataChanged represents the event that the data in the content control have been changed. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"ContentControlDataChanged"' + - name: contentControlDeleted + uid: 'word!Word.EventType.contentControlDeleted:member' + package: word! + summary: |- + ContentControlDeleted represents the event that the content control has been deleted. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"ContentControlDeleted"' + - name: contentControlEntered + uid: 'word!Word.EventType.contentControlEntered:member' + package: word! + summary: |- + Represents that a content control has been entered. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"ContentControlEntered"' + - name: contentControlExited + uid: 'word!Word.EventType.contentControlExited:member' + package: word! + summary: |- + Represents that a content control has been exited. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"ContentControlExited"' + - name: contentControlSelectionChanged + uid: 'word!Word.EventType.contentControlSelectionChanged:member' + package: word! + summary: |- + ContentControlSelectionChanged represents the event that the selection in the content control has been changed. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"ContentControlSelectionChanged"' + - name: paragraphAdded + uid: 'word!Word.EventType.paragraphAdded:member' + package: word! + summary: |- + Represents that one or more new paragraphs were added. + + * \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"ParagraphAdded"' + - name: paragraphChanged + uid: 'word!Word.EventType.paragraphChanged:member' + package: word! + summary: |- + Represents that one or more paragraphs were changed. + + * \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"ParagraphChanged"' + - name: paragraphDeleted + uid: 'word!Word.EventType.paragraphDeleted:member' + package: word! + summary: |- + Represents that one or more paragraphs were deleted. + + * \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"ParagraphDeleted"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.field.yml b/docs/docs-ref-autogen/word_1_9/word/word.field.yml new file mode 100644 index 0000000000..04bfaecfee --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.field.yml @@ -0,0 +1,793 @@ +### YamlMime:TSType +name: Word.Field +uid: 'word!Word.Field:class' +package: word! +fullName: Word.Field +summary: Represents a field. +remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Important: To learn more about which fields can be inserted, see the `Word.Range.insertField` API introduced in + requirement set 1.5. Support for managing fields is similar to what's available in the Word UI. However, while the + Word UI on the web primarily only supports fields as read-only (see [Field codes in Word for the + web](https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1)), the `Addin` field is + editable. To learn more about Word UI clients that more fully support fields, see the product list at the beginning of + [Insert, edit, and view fields in Word](https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-fields.yaml + + + // Gets the first field in the document. + + await Word.run(async (context) => { + const field: Word.Field = context.document.body.fields.getFirstOrNullObject(); + field.load(["code", "result", "locked", "type", "data", "kind"]); + + await context.sync(); + + if (field.isNullObject) { + console.log("This document has no fields."); + } else { + console.log("Code of first field: " + field.code, "Result of first field: " + JSON.stringify(field.result), "Type of first field: " + field.type, "Is the first field locked? " + field.locked, "Kind of the first field: " + field.kind); + } + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: code + uid: 'word!Word.Field#code:member' + package: word! + fullName: code + summary: Specifies the field's code instruction. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Note: The ability to set the code was introduced in WordApi 1.5. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-fields.yaml + + + // Gets the first field in the document. + + await Word.run(async (context) => { + const field: Word.Field = context.document.body.fields.getFirstOrNullObject(); + field.load(["code", "result", "locked", "type", "data", "kind"]); + + await context.sync(); + + if (field.isNullObject) { + console.log("This document has no fields."); + } else { + console.log("Code of first field: " + field.code, "Result of first field: " + JSON.stringify(field.result), "Type of first field: " + field.type, "Is the first field locked? " + field.locked, "Kind of the first field: " + field.kind); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'code: string;' + return: + type: string + - name: context + uid: 'word!Word.Field#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: data + uid: 'word!Word.Field#data:member' + package: word! + fullName: data + summary: >- + Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general + exception when code attempts to set it. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'data: string;' + return: + type: string + - name: kind + uid: 'word!Word.Field#kind:member' + package: word! + fullName: kind + summary: Gets the field's kind. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-fields.yaml + + + // Gets the first field in the document. + + await Word.run(async (context) => { + const field: Word.Field = context.document.body.fields.getFirstOrNullObject(); + field.load(["code", "result", "locked", "type", "data", "kind"]); + + await context.sync(); + + if (field.isNullObject) { + console.log("This document has no fields."); + } else { + console.log("Code of first field: " + field.code, "Result of first field: " + JSON.stringify(field.result), "Type of first field: " + field.type, "Is the first field locked? " + field.locked, "Kind of the first field: " + field.kind); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly kind: Word.FieldKind | "None" | "Hot" | "Warm" | "Cold";' + return: + type: ' | "None" | "Hot" | "Warm" | "Cold"' + - name: locked + uid: 'word!Word.Field#locked:member' + package: word! + fullName: locked + summary: 'Specifies whether the field is locked. `true` if the field is locked, `false` otherwise.' + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-fields.yaml + + + // Gets the first field in the selection and toggles between setting it to locked or unlocked. + + await Word.run(async (context) => { + let field = context.document.getSelection().fields.getFirstOrNullObject(); + field.load(["code", "result", "type", "locked"]); + await context.sync(); + + if (field.isNullObject) { + console.log("The selection has no fields."); + } else { + console.log(`The first field in the selection is currently ${field.locked ? "locked" : "unlocked"}.`); + field.locked = !field.locked; + await context.sync(); + + console.log(`The first field in the selection is now ${field.locked ? "locked" : "unlocked"}.`); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'locked: boolean;' + return: + type: boolean + - name: parentBody + uid: 'word!Word.Field#parentBody:member' + package: word! + fullName: parentBody + summary: Gets the parent body of the field. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-fields.yaml + + + // Gets the parent body of the first field in the document. + + await Word.run(async (context) => { + const field: Word.Field = context.document.body.fields.getFirstOrNullObject(); + field.load("parentBody/text"); + + await context.sync(); + + if (field.isNullObject) { + console.log("This document has no fields."); + } else { + const parentBody: Word.Body = field.parentBody; + console.log("Text of first field's parent body: " + JSON.stringify(parentBody.text)); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentBody: Word.Body;' + return: + type: '' + - name: parentContentControl + uid: 'word!Word.Field#parentContentControl:member' + package: word! + fullName: parentContentControl + summary: >- + Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content + control. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentContentControl: Word.ContentControl;' + return: + type: '' + - name: parentContentControlOrNullObject + uid: 'word!Word.Field#parentContentControlOrNullObject:member' + package: word! + fullName: parentContentControlOrNullObject + summary: >- + Gets the content control that contains the field. If there isn't a parent content control, then this method will + return an object with its `isNullObject` property set to `true`. For further information, see + [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentContentControlOrNullObject: Word.ContentControl;' + return: + type: '' + - name: parentTable + uid: 'word!Word.Field#parentTable:member' + package: word! + fullName: parentTable + summary: Gets the table that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTable: Word.Table;' + return: + type: '' + - name: parentTableCell + uid: 'word!Word.Field#parentTableCell:member' + package: word! + fullName: parentTableCell + summary: Gets the table cell that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table cell. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTableCell: Word.TableCell;' + return: + type: '' + - name: parentTableCellOrNullObject + uid: 'word!Word.Field#parentTableCellOrNullObject:member' + package: word! + fullName: parentTableCellOrNullObject + summary: >- + Gets the table cell that contains the field. If it isn't contained in a table cell, then this method will return + an object with its `isNullObject` property set to `true`. For further information, see [*OrNullObject + methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTableCellOrNullObject: Word.TableCell;' + return: + type: '' + - name: parentTableOrNullObject + uid: 'word!Word.Field#parentTableOrNullObject:member' + package: word! + fullName: parentTableOrNullObject + summary: >- + Gets the table that contains the field. If it isn't contained in a table, then this method will return an object + with its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTableOrNullObject: Word.Table;' + return: + type: '' + - name: result + uid: 'word!Word.Field#result:member' + package: word! + fullName: result + summary: Gets the field's result data. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-fields.yaml + + + // Gets the first field in the document. + + await Word.run(async (context) => { + const field: Word.Field = context.document.body.fields.getFirstOrNullObject(); + field.load(["code", "result", "locked", "type", "data", "kind"]); + + await context.sync(); + + if (field.isNullObject) { + console.log("This document has no fields."); + } else { + console.log("Code of first field: " + field.code, "Result of first field: " + JSON.stringify(field.result), "Type of first field: " + field.type, "Is the first field locked? " + field.locked, "Kind of the first field: " + field.kind); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly result: Word.Range;' + return: + type: '' + - name: type + uid: 'word!Word.Field#type:member' + package: word! + fullName: type + summary: Gets the field's type. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-fields.yaml + + + // Gets the first field in the document. + + await Word.run(async (context) => { + const field: Word.Field = context.document.body.fields.getFirstOrNullObject(); + field.load(["code", "result", "locked", "type", "data", "kind"]); + + await context.sync(); + + if (field.isNullObject) { + console.log("This document has no fields."); + } else { + console.log("Code of first field: " + field.code, "Result of first field: " + JSON.stringify(field.result), "Type of first field: " + field.type, "Is the first field locked? " + field.locked, "Kind of the first field: " + field.kind); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + readonly type: Word.FieldType | "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | + "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" + | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | + "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | + "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | + "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | + "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | + "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" + | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | + "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | + "UserName" | "XE" | "Empty" | "Others" | "Undefined"; + return: + type: >- + | "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" + | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | + "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | + "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | + "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | + "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | + "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | + "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | + "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | + "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | + "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined" +methods: + - name: delete() + uid: 'word!Word.Field#delete:member(1)' + package: word! + fullName: delete() + summary: Deletes the field. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-fields.yaml + + + // Deletes the first field in the document. + + await Word.run(async (context) => { + const field: Word.Field = context.document.body.fields.getFirstOrNullObject(); + field.load(); + + await context.sync(); + + if (field.isNullObject) { + console.log("This document has no fields."); + } else { + field.delete(); + await context.sync(); + + console.log("The first field in the document was deleted."); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'delete(): void;' + return: + type: void + description: '' + - name: getNext() + uid: 'word!Word.Field#getNext:member(1)' + package: word! + fullName: getNext() + summary: Gets the next field. Throws an `ItemNotFound` error if this field is the last one. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getNext(): Word.Field;' + return: + type: '' + description: '' + - name: getNextOrNullObject() + uid: 'word!Word.Field#getNextOrNullObject:member(1)' + package: word! + fullName: getNextOrNullObject() + summary: >- + Gets the next field. If this field is the last one, then this method will return an object with its `isNullObject` + property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getNextOrNullObject(): Word.Field;' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.Field#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.FieldLoadOptions): Word.Field;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.Field#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.Field;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.Field#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Field; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: select(selectionMode) + uid: 'word!Word.Field#select:member(1)' + package: word! + fullName: select(selectionMode) + summary: Selects the field. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-fields.yaml + + + // Gets and updates the first field in the selection. + + await Word.run(async (context) => { + let field = context.document.getSelection().fields.getFirstOrNullObject(); + field.load(["code", "result", "type", "locked"]); + + await context.sync(); + + if (field.isNullObject) { + console.log("No field in selection."); + } else { + console.log("Before updating:", "Code of first field: " + field.code, "Result of first field: " + JSON.stringify(field.result)); + + field.updateResult(); + field.select(); + await context.sync(); + + field.load(["code", "result"]); + await context.sync(); + + console.log("After updating:", "Code of first field: " + field.code, "Result of first field: " + JSON.stringify(field.result)); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'select(selectionMode?: Word.SelectionMode): void;' + parameters: + - id: selectionMode + description: 'Optional. The selection mode must be ''Select'', ''Start'', or ''End''. ''Select'' is the default.' + type: '' + return: + type: void + description: '' + - name: select(selectionModeString) + uid: 'word!Word.Field#select:member(2)' + package: word! + fullName: select(selectionModeString) + summary: Selects the field. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'select(selectionModeString?: "Select" | "Start" | "End"): void;' + parameters: + - id: selectionModeString + description: 'Optional. The selection mode must be ''Select'', ''Start'', or ''End''. ''Select'' is the default.' + type: '"Select" | "Start" | "End"' + return: + type: void + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.Field#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.FieldUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.Field#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.Field): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.Field#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.Field` object is an API object, the `toJSON` method returns a plain + JavaScript object (typed as `Word.Interfaces.FieldData`) that contains shallow copies of any loaded child + properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.FieldData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.Field#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.Field;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.Field#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.Field;' + return: + type: '' + description: '' + - name: updateResult() + uid: 'word!Word.Field#updateResult:member(1)' + package: word! + fullName: updateResult() + summary: Updates the field. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-fields.yaml + + + // Gets and updates the first field in the selection. + + await Word.run(async (context) => { + let field = context.document.getSelection().fields.getFirstOrNullObject(); + field.load(["code", "result", "type", "locked"]); + + await context.sync(); + + if (field.isNullObject) { + console.log("No field in selection."); + } else { + console.log("Before updating:", "Code of first field: " + field.code, "Result of first field: " + JSON.stringify(field.result)); + + field.updateResult(); + field.select(); + await context.sync(); + + field.load(["code", "result"]); + await context.sync(); + + console.log("After updating:", "Code of first field: " + field.code, "Result of first field: " + JSON.stringify(field.result)); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'updateResult(): void;' + return: + type: void + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.fieldcollection.yml b/docs/docs-ref-autogen/word_1_9/word/word.fieldcollection.yml new file mode 100644 index 0000000000..9907ae097c --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.fieldcollection.yml @@ -0,0 +1,305 @@ +### YamlMime:TSType +name: Word.FieldCollection +uid: 'word!Word.FieldCollection:class' +package: word! +fullName: Word.FieldCollection +summary: 'Contains a collection of [Word.Field](xref:word!Word.Field:class) objects.' +remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Important: To learn more about which fields can be inserted, see the `Word.Range.insertField API` introduced in + requirement set 1.5. Support for managing fields is similar to what's available in the Word UI. However, while the + Word UI on the web primarily only supports fields as read-only (see [Field codes in Word for the + web](https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1)), the `Addin` field is + editable. To learn more about Word UI clients that more fully support fields, see the product list at the beginning of + [Insert, edit, and view fields in Word](https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-fields.yaml + + + // Gets all fields in the document body. + + await Word.run(async (context) => { + const fields: Word.FieldCollection = context.document.body.fields.load("items"); + + await context.sync(); + + if (fields.items.length === 0) { + console.log("No fields in this document."); + } else { + fields.load(["code", "result"]); + await context.sync(); + + for (let i = 0; i < fields.items.length; i++) { + console.log(`Field ${i + 1}'s code: ${fields.items[i].code}`, `Field ${i + 1}'s result: ${JSON.stringify(fields.items[i].result)}`); + } + } + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.FieldCollection#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: items + uid: 'word!Word.FieldCollection#items:member' + package: word! + fullName: items + summary: Gets the loaded child items in this collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly items: Word.Field[];' + return: + type: '[]' + description: >- + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-fields.yaml + + + // Gets all fields in the document body. + + await Word.run(async (context) => { + const fields: Word.FieldCollection = context.document.body.fields.load("items"); + + await context.sync(); + + if (fields.items.length === 0) { + console.log("No fields in this document."); + } else { + fields.load(["code", "result"]); + await context.sync(); + + for (let i = 0; i < fields.items.length; i++) { + console.log(`Field ${i + 1}'s code: ${fields.items[i].code}`, `Field ${i + 1}'s result: ${JSON.stringify(fields.items[i].result)}`); + } + } + }); + + ``` +methods: + - name: getByTypes(types) + uid: 'word!Word.FieldCollection#getByTypes:member(1)' + package: word! + fullName: getByTypes(types) + summary: Gets the Field object collection including the specified types of fields. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getByTypes(types: Word.FieldType[]): Word.FieldCollection;' + parameters: + - id: types + description: Required. An array of field types. + type: '[]' + return: + type: '' + description: '' + - name: getFirst() + uid: 'word!Word.FieldCollection#getFirst:member(1)' + package: word! + fullName: getFirst() + summary: Gets the first field in this collection. Throws an `ItemNotFound` error if this collection is empty. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFirst(): Word.Field;' + return: + type: '' + description: '' + - name: getFirstOrNullObject() + uid: 'word!Word.FieldCollection#getFirstOrNullObject:member(1)' + package: word! + fullName: getFirstOrNullObject() + summary: >- + Gets the first field in this collection. If this collection is empty, then this method will return an object with + its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-fields.yaml + + + // Gets the first field in the document. + + await Word.run(async (context) => { + const field: Word.Field = context.document.body.fields.getFirstOrNullObject(); + field.load(["code", "result", "locked", "type", "data", "kind"]); + + await context.sync(); + + if (field.isNullObject) { + console.log("This document has no fields."); + } else { + console.log("Code of first field: " + field.code, "Result of first field: " + JSON.stringify(field.result), "Type of first field: " + field.type, "Is the first field locked? " + field.locked, "Kind of the first field: " + field.kind); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getFirstOrNullObject(): Word.Field;' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.FieldCollection#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: >- + load(options?: Word.Interfaces.FieldCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): + Word.FieldCollection; + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: >- + & + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.FieldCollection#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.FieldCollection;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.FieldCollection#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.FieldCollection;' + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: '' + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.FieldCollection#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.FieldCollection` object is an API object, the `toJSON` method returns a + plain JavaScript object (typed as `Word.Interfaces.FieldCollectionData`) that contains an "items" array + with shallow copies of any loaded properties from the collection's items. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.FieldCollectionData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.FieldCollection#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.FieldCollection;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.FieldCollection#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.FieldCollection;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.fieldkind.yml b/docs/docs-ref-autogen/word_1_9/word/word.fieldkind.yml new file mode 100644 index 0000000000..b94a9ec71c --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.fieldkind.yml @@ -0,0 +1,72 @@ +### YamlMime:TSEnum +name: Word.FieldKind +uid: 'word!Word.FieldKind:enum' +package: word! +fullName: Word.FieldKind +summary: Represents the kind of field. Indicates how the field works in relation to updating. +remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-fields.yaml + + + // Gets the first field in the document. + + await Word.run(async (context) => { + const field: Word.Field = context.document.body.fields.getFirstOrNullObject(); + field.load(["code", "result", "locked", "type", "data", "kind"]); + + await context.sync(); + + if (field.isNullObject) { + console.log("This document has no fields."); + } else { + console.log("Code of first field: " + field.code, "Result of first field: " + JSON.stringify(field.result), "Type of first field: " + field.type, "Is the first field locked? " + field.locked, "Kind of the first field: " + field.kind); + } + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: cold + uid: 'word!Word.FieldKind.cold:member' + package: word! + summary: |- + Represents that the field doesn't have a result. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Cold"' + - name: hot + uid: 'word!Word.FieldKind.hot:member' + package: word! + summary: >- + Represents that the field is automatically updated each time it's displayed or each time the page is reformatted, + but which can also be manually updated. + + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Hot"' + - name: none + uid: 'word!Word.FieldKind.none:member' + package: word! + summary: |- + Represents that the field is invalid. For example, a pair of field characters with nothing inside. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"None"' + - name: warm + uid: 'word!Word.FieldKind.warm:member' + package: word! + summary: |- + Represents that the field is automatically updated when the source changes or the field can be manually updated. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Warm"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.fieldtype.yml b/docs/docs-ref-autogen/word_1_9/word/word.fieldtype.yml new file mode 100644 index 0000000000..5a563876f6 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.fieldtype.yml @@ -0,0 +1,760 @@ +### YamlMime:TSEnum +name: Word.FieldType +uid: 'word!Word.FieldType:enum' +package: word! +fullName: Word.FieldType +summary: Represents the type of Field. +remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-fields.yaml + + + // Inserts a Date field before selection. + + await Word.run(async (context) => { + const range: Word.Range = context.document.getSelection().getRange(); + + const field: Word.Field = range.insertField(Word.InsertLocation.before, Word.FieldType.date, '\\@ "M/d/yyyy h:mm am/pm"', true); + + field.load("result,code"); + await context.sync(); + + if (field.isNullObject) { + console.log("There are no fields in this document."); + } else { + console.log("Code of the field: " + field.code, "Result of the field: " + JSON.stringify(field.result)); + } + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: addin + uid: 'word!Word.FieldType.addin:member' + package: word! + summary: |- + Represents that the field type is Add-in. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Addin"' + - name: addressBlock + uid: 'word!Word.FieldType.addressBlock:member' + package: word! + summary: |- + Represents that the field type is AddressBlock. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"AddressBlock"' + - name: advance + uid: 'word!Word.FieldType.advance:member' + package: word! + summary: |- + Represents that the field type is Advance. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Advance"' + - name: ask + uid: 'word!Word.FieldType.ask:member' + package: word! + summary: |- + Represents that the field type is Ask. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Ask"' + - name: author + uid: 'word!Word.FieldType.author:member' + package: word! + summary: |- + Represents that the field type is Author. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Author"' + - name: autoText + uid: 'word!Word.FieldType.autoText:member' + package: word! + summary: |- + Represents that the field type is AutoText. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"AutoText"' + - name: autoTextList + uid: 'word!Word.FieldType.autoTextList:member' + package: word! + summary: |- + Represents that the field type is AutoTextList. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"AutoTextList"' + - name: barCode + uid: 'word!Word.FieldType.barCode:member' + package: word! + summary: |- + Represents that the field type is Barcode. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"BarCode"' + - name: bibliography + uid: 'word!Word.FieldType.bibliography:member' + package: word! + summary: |- + Represents that the field type is Bibliography. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Bibliography"' + - name: bidiOutline + uid: 'word!Word.FieldType.bidiOutline:member' + package: word! + summary: |- + Represents that the field type is BidiOutline. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"BidiOutline"' + - name: citation + uid: 'word!Word.FieldType.citation:member' + package: word! + summary: |- + Represents that the field type is Citation. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Citation"' + - name: comments + uid: 'word!Word.FieldType.comments:member' + package: word! + summary: |- + Represents that the field type is Comments. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Comments"' + - name: compare + uid: 'word!Word.FieldType.compare:member' + package: word! + summary: |- + Represents that the field type is Compare. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Compare"' + - name: createDate + uid: 'word!Word.FieldType.createDate:member' + package: word! + summary: |- + Represents that the field type is CreateDate. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"CreateDate"' + - name: data + uid: 'word!Word.FieldType.data:member' + package: word! + summary: |- + Represents that the field type is Data. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Data"' + - name: database + uid: 'word!Word.FieldType.database:member' + package: word! + summary: |- + Represents that the field type is Database. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Database"' + - name: date + uid: 'word!Word.FieldType.date:member' + package: word! + summary: |- + Represents that the field type is Date. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Date"' + - name: displayBarcode + uid: 'word!Word.FieldType.displayBarcode:member' + package: word! + summary: |- + Represents that the field type is DisplayBarcode. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"DisplayBarcode"' + - name: docProperty + uid: 'word!Word.FieldType.docProperty:member' + package: word! + summary: |- + Represents that the field type is DocumentProperty + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"DocProperty"' + - name: docVariable + uid: 'word!Word.FieldType.docVariable:member' + package: word! + summary: |- + Represents that the field type is DocumentVariable. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"DocVariable"' + - name: editTime + uid: 'word!Word.FieldType.editTime:member' + package: word! + summary: |- + Represents that the field type is EditTime. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"EditTime"' + - name: embedded + uid: 'word!Word.FieldType.embedded:member' + package: word! + summary: |- + Represents that the field type is Embedded. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Embedded"' + - name: empty + uid: 'word!Word.FieldType.empty:member' + package: word! + summary: |- + Represents that the field type is Empty. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Empty"' + - name: eq + uid: 'word!Word.FieldType.eq:member' + package: word! + summary: |- + Represents that the field type is Equation. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"EQ"' + - name: expression + uid: 'word!Word.FieldType.expression:member' + package: word! + summary: |- + Represents that the field type is Expression. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Expression"' + - name: fileName + uid: 'word!Word.FieldType.fileName:member' + package: word! + summary: |- + Represents that the field type is FileName. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"FileName"' + - name: fileSize + uid: 'word!Word.FieldType.fileSize:member' + package: word! + summary: |- + Represents that the field type is FileSize. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"FileSize"' + - name: fillIn + uid: 'word!Word.FieldType.fillIn:member' + package: word! + summary: |- + Represents that the field type is FillIn. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"FillIn"' + - name: formCheckbox + uid: 'word!Word.FieldType.formCheckbox:member' + package: word! + summary: |- + Represents that the field type is FormCheckbox. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"FormCheckbox"' + - name: formDropdown + uid: 'word!Word.FieldType.formDropdown:member' + package: word! + summary: |- + Represents that the field type is FormDropdown. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"FormDropdown"' + - name: formText + uid: 'word!Word.FieldType.formText:member' + package: word! + summary: |- + Represents that the field type is FormText. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"FormText"' + - name: gotoButton + uid: 'word!Word.FieldType.gotoButton:member' + package: word! + summary: |- + Represents that the field type is GotoButton. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"GotoButton"' + - name: greetingLine + uid: 'word!Word.FieldType.greetingLine:member' + package: word! + summary: |- + Represents that the field type is GreetingLine. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"GreetingLine"' + - name: hyperlink + uid: 'word!Word.FieldType.hyperlink:member' + package: word! + summary: |- + Represents that the field type is Hyperlink. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Hyperlink"' + - name: if + uid: 'word!Word.FieldType.if:member' + package: word! + summary: |- + Represents that the field type is If. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"If"' + - name: import + uid: 'word!Word.FieldType.import:member' + package: word! + summary: |- + Represents that the field type is Import. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Import"' + - name: include + uid: 'word!Word.FieldType.include:member' + package: word! + summary: |- + Represents that the field type is Include. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Include"' + - name: includePicture + uid: 'word!Word.FieldType.includePicture:member' + package: word! + summary: |- + Represents that the field type is IncludePicture. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"IncludePicture"' + - name: includeText + uid: 'word!Word.FieldType.includeText:member' + package: word! + summary: |- + Represents that the field type is IncludeText. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"IncludeText"' + - name: index + uid: 'word!Word.FieldType.index:member' + package: word! + summary: |- + Represents that the field type is Index. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Index"' + - name: info + uid: 'word!Word.FieldType.info:member' + package: word! + summary: |- + Represents that the field type is Information. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Info"' + - name: keywords + uid: 'word!Word.FieldType.keywords:member' + package: word! + summary: |- + Represents that the field type is Keywords. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Keywords"' + - name: lastSavedBy + uid: 'word!Word.FieldType.lastSavedBy:member' + package: word! + summary: |- + Represents that the field type is LastSavedBy. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"LastSavedBy"' + - name: link + uid: 'word!Word.FieldType.link:member' + package: word! + summary: |- + Represents that the field type is Link. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Link"' + - name: listNum + uid: 'word!Word.FieldType.listNum:member' + package: word! + summary: |- + Represents that the field type is ListNumber. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"ListNum"' + - name: macroButton + uid: 'word!Word.FieldType.macroButton:member' + package: word! + summary: |- + Represents that the field type is MacroButton. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"MacroButton"' + - name: mergeBarcode + uid: 'word!Word.FieldType.mergeBarcode:member' + package: word! + summary: |- + Represents that the field type is MergeBarcode. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"MergeBarcode"' + - name: mergeField + uid: 'word!Word.FieldType.mergeField:member' + package: word! + summary: |- + Represents that the field type is MergeField. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"MergeField"' + - name: mergeRec + uid: 'word!Word.FieldType.mergeRec:member' + package: word! + summary: |- + Represents that the field type is MergeRecord. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"MergeRec"' + - name: mergeSeq + uid: 'word!Word.FieldType.mergeSeq:member' + package: word! + summary: |- + Represents that the field type is MergeSequence. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"MergeSeq"' + - name: next + uid: 'word!Word.FieldType.next:member' + package: word! + summary: |- + Represents that the field type is Next. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Next"' + - name: nextIf + uid: 'word!Word.FieldType.nextIf:member' + package: word! + summary: |- + Represents that the field type is NextIf. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"NextIf"' + - name: noteRef + uid: 'word!Word.FieldType.noteRef:member' + package: word! + summary: |- + Represents that the field type is NoteReference. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"NoteRef"' + - name: numChars + uid: 'word!Word.FieldType.numChars:member' + package: word! + summary: |- + Represents that the field type is NumberOfCharacters. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"NumChars"' + - name: numPages + uid: 'word!Word.FieldType.numPages:member' + package: word! + summary: |- + Represents that the field type is NumberOfPages. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"NumPages"' + - name: numWords + uid: 'word!Word.FieldType.numWords:member' + package: word! + summary: |- + Represents that the field type is NumberOfWords. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"NumWords"' + - name: ocx + uid: 'word!Word.FieldType.ocx:member' + package: word! + summary: |- + Represents that the field type is ActiveXControl. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"OCX"' + - name: others + uid: 'word!Word.FieldType.others:member' + package: word! + summary: |- + Represents the field types not supported by the Office JavaScript API. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Others"' + - name: page + uid: 'word!Word.FieldType.page:member' + package: word! + summary: |- + Represents that the field type is Page. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Page"' + - name: pageRef + uid: 'word!Word.FieldType.pageRef:member' + package: word! + summary: |- + Represents that the field type is PageReference. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"PageRef"' + - name: print + uid: 'word!Word.FieldType.print:member' + package: word! + summary: |- + Represents that the field type is Print. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Print"' + - name: printDate + uid: 'word!Word.FieldType.printDate:member' + package: word! + summary: |- + Represents that the field type is PrintDate. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"PrintDate"' + - name: private + uid: 'word!Word.FieldType.private:member' + package: word! + summary: |- + Represents that the field type is Private. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Private"' + - name: quote + uid: 'word!Word.FieldType.quote:member' + package: word! + summary: |- + Represents that the field type is Quote. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Quote"' + - name: rd + uid: 'word!Word.FieldType.rd:member' + package: word! + summary: |- + Represents that the field type is ReferencedDocument. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"RD"' + - name: ref + uid: 'word!Word.FieldType.ref:member' + package: word! + summary: |- + Represents that the field type is Reference. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Ref"' + - name: revNum + uid: 'word!Word.FieldType.revNum:member' + package: word! + summary: |- + Represents that the field type is RevisionNumber. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"RevNum"' + - name: saveDate + uid: 'word!Word.FieldType.saveDate:member' + package: word! + summary: |- + Represents that the field type is SaveDate. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"SaveDate"' + - name: section + uid: 'word!Word.FieldType.section:member' + package: word! + summary: |- + Represents that the field type is Section. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Section"' + - name: sectionPages + uid: 'word!Word.FieldType.sectionPages:member' + package: word! + summary: |- + Represents that the field type is SectionPages. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"SectionPages"' + - name: seq + uid: 'word!Word.FieldType.seq:member' + package: word! + summary: |- + Represents that the field type is Sequence. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Seq"' + - name: set + uid: 'word!Word.FieldType.set:member' + package: word! + summary: |- + Represents that the field type is Set. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Set"' + - name: shape + uid: 'word!Word.FieldType.shape:member' + package: word! + summary: |- + Represents that the field type is Shape. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Shape"' + - name: skipIf + uid: 'word!Word.FieldType.skipIf:member' + package: word! + summary: |- + Represents that the field type is SkipIf. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"SkipIf"' + - name: styleRef + uid: 'word!Word.FieldType.styleRef:member' + package: word! + summary: |- + Represents that the field type is StyleReference. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"StyleRef"' + - name: subject + uid: 'word!Word.FieldType.subject:member' + package: word! + summary: |- + Represents that the field type is Subject. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Subject"' + - name: subscriber + uid: 'word!Word.FieldType.subscriber:member' + package: word! + summary: |- + Represents that the field type is Subscriber. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Subscriber"' + - name: symbol + uid: 'word!Word.FieldType.symbol:member' + package: word! + summary: |- + Represents that the field type is Symbol. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Symbol"' + - name: ta + uid: 'word!Word.FieldType.ta:member' + package: word! + summary: |- + Represents that the field type is TableOfAuthoritiesEntry. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"TA"' + - name: tc + uid: 'word!Word.FieldType.tc:member' + package: word! + summary: |- + Represents that the field type is TableOfContentsEntry. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"TC"' + - name: template + uid: 'word!Word.FieldType.template:member' + package: word! + summary: |- + Represents that the field type is Template. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Template"' + - name: time + uid: 'word!Word.FieldType.time:member' + package: word! + summary: |- + Represents that the field type is Time. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Time"' + - name: title + uid: 'word!Word.FieldType.title:member' + package: word! + summary: |- + Represents that the field type is Title. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Title"' + - name: toa + uid: 'word!Word.FieldType.toa:member' + package: word! + summary: |- + Represents that the field type is TableOfAuthorities. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"TOA"' + - name: toc + uid: 'word!Word.FieldType.toc:member' + package: word! + summary: |- + Represents that the field type is TableOfContents. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"TOC"' + - name: undefined + uid: 'word!Word.FieldType.undefined:member' + package: word! + summary: |- + Represents that the field type is Undefined. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Undefined"' + - name: userAddress + uid: 'word!Word.FieldType.userAddress:member' + package: word! + summary: |- + Represents that the field type is UserAddress. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"UserAddress"' + - name: userInitials + uid: 'word!Word.FieldType.userInitials:member' + package: word! + summary: |- + Represents that the field type is UserInitials. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"UserInitials"' + - name: userName + uid: 'word!Word.FieldType.userName:member' + package: word! + summary: |- + Represents that the field type is UserName. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"UserName"' + - name: xe + uid: 'word!Word.FieldType.xe:member' + package: word! + summary: |- + Represents that the field type is IndexEntry. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"XE"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.font.yml b/docs/docs-ref-autogen/word_1_9/word/word.font.yml new file mode 100644 index 0000000000..178293ae4c --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.font.yml @@ -0,0 +1,513 @@ +### YamlMime:TSType +name: Word.Font +uid: 'word!Word.Font:class' +package: word! +fullName: Word.Font +summary: Represents a font. +remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Change the font color + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a range proxy object for the current selection. + const selection = context.document.getSelection(); + + // Queue a command to change the font color of the current selection. + selection.font.color = 'blue'; + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('The font color of the selection has been changed.'); + }); + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: bold + uid: 'word!Word.Font#bold:member' + package: word! + fullName: bold + summary: >- + Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, + false. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Bold format text + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a range proxy object for the current selection. + const selection = context.document.getSelection(); + + // Queue a command to make the current selection bold. + selection.font.bold = true; + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('The selection is now bold.'); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'bold: boolean;' + return: + type: boolean + - name: color + uid: 'word!Word.Font#color:member' + package: word! + fullName: color + summary: 'Specifies the color for the specified font. You can provide the value in the ''\#RRGGBB'' format or the color name.' + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Change the font color + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a range proxy object for the current selection. + const selection = context.document.getSelection(); + + // Queue a command to change the font color of the current selection. + selection.font.color = 'blue'; + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('The font color of the selection has been changed.'); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'color: string;' + return: + type: string + - name: context + uid: 'word!Word.Font#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: doubleStrikeThrough + uid: 'word!Word.Font#doubleStrikeThrough:member' + package: word! + fullName: doubleStrikeThrough + summary: >- + Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as + double strikethrough text, otherwise, false. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'doubleStrikeThrough: boolean;' + return: + type: boolean + - name: highlightColor + uid: 'word!Word.Font#highlightColor:member' + package: word! + fullName: highlightColor + summary: >- + Specifies the highlight color. To set it, use a value either in the '\#RRGGBB' format or the color name. To remove + highlight color, set it to null. The returned highlight color can be in the '\#RRGGBB' format, an empty string for + mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in + Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", + "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for + Windows Desktop, any other color is converted to the closest color when applied to the font. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Highlight selected text + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a range proxy object for the current selection. + const selection = context.document.getSelection(); + + // Queue a command to highlight the current selection. + selection.font.highlightColor = '#FFFF00'; // Yellow + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('The selection has been highlighted.'); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'highlightColor: string;' + return: + type: string + - name: italic + uid: 'word!Word.Font#italic:member' + package: word! + fullName: italic + summary: 'Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'italic: boolean;' + return: + type: boolean + - name: name + uid: 'word!Word.Font#name:member' + package: word! + fullName: name + summary: Specifies a value that represents the name of the font. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Change the font name + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a range proxy object for the current selection. + const selection = context.document.getSelection(); + + // Queue a command to change the current selection's font name. + selection.font.name = 'Arial'; + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('The font name has changed.'); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'name: string;' + return: + type: string + - name: size + uid: 'word!Word.Font#size:member' + package: word! + fullName: size + summary: Specifies a value that represents the font size in points. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Change the font size + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a range proxy object for the current selection. + const selection = context.document.getSelection(); + + // Queue a command to change the current selection's font size. + selection.font.size = 20; + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('The font size has changed.'); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'size: number;' + return: + type: number + - name: strikeThrough + uid: 'word!Word.Font#strikeThrough:member' + package: word! + fullName: strikeThrough + summary: >- + Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as + strikethrough text, otherwise, false. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Strike format text + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a range proxy object for the current selection. + const selection = context.document.getSelection(); + + // Queue a command to strikethrough the font of the current selection. + selection.font.strikeThrough = true; + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('The selection now has a strikethrough.'); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'strikeThrough: boolean;' + return: + type: boolean + - name: subscript + uid: 'word!Word.Font#subscript:member' + package: word! + fullName: subscript + summary: >- + Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, + otherwise, false. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'subscript: boolean;' + return: + type: boolean + - name: superscript + uid: 'word!Word.Font#superscript:member' + package: word! + fullName: superscript + summary: >- + Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, + otherwise, false. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'superscript: boolean;' + return: + type: boolean + - name: underline + uid: 'word!Word.Font#underline:member' + package: word! + fullName: underline + summary: Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Underline format text + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a range proxy object for the current selection. + const selection = context.document.getSelection(); + + // Queue a command to underline the current selection. + selection.font.underline = Word.UnderlineType.single; + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('The selection now has an underline style.'); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + underline: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" + | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" + | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; + return: + type: >- + | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | + "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | + "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | + "WaveHeavy" | "WaveDouble" +methods: + - name: load(options) + uid: 'word!Word.Font#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.FontLoadOptions): Word.Font;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.Font#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.Font;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.Font#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Font; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.Font#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.FontUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.Font#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.Font): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.Font#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.Font` object is an API object, the `toJSON` method returns a plain + JavaScript object (typed as `Word.Interfaces.FontData`) that contains shallow copies of any loaded child + properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.FontData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.Font#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.Font;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.Font#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.Font;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.gettextoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.gettextoptions.yml new file mode 100644 index 0000000000..cc38ca4d87 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.gettextoptions.yml @@ -0,0 +1,64 @@ +### YamlMime:TSType +name: Word.GetTextOptions +uid: 'word!Word.GetTextOptions:interface' +package: word! +fullName: Word.GetTextOptions +summary: Specifies the options to be included in a getText operation. +remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // 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); + }); + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: includeHiddenText + uid: 'word!Word.GetTextOptions#includeHiddenText:member' + package: word! + fullName: includeHiddenText + summary: >- + Specifies a value that indicates whether to include hidden text in the result of the GetText method. The default + value is False. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'includeHiddenText?: boolean;' + return: + type: boolean + - name: includeTextMarkedAsDeleted + uid: 'word!Word.GetTextOptions#includeTextMarkedAsDeleted:member' + package: word! + fullName: includeTextMarkedAsDeleted + summary: >- + Specifies a value that indicates whether to include text marked as deleted in the result of the GetText method. + The default value is False. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'includeTextMarkedAsDeleted?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.headerfootertype.yml b/docs/docs-ref-autogen/word_1_9/word/word.headerfootertype.yml new file mode 100644 index 0000000000..8aa59a86a9 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.headerfootertype.yml @@ -0,0 +1,58 @@ +### YamlMime:TSEnum +name: Word.HeaderFooterType +uid: 'word!Word.HeaderFooterType:enum' +package: word! +fullName: Word.HeaderFooterType +summary: '' +remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/insert-header-and-footer.yaml + + + await Word.run(async (context) => { + context.document.sections + .getFirst() + .getHeader(Word.HeaderFooterType.primary) + .insertParagraph("This is a primary header.", "End"); + + await context.sync(); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: evenPages + uid: 'word!Word.HeaderFooterType.evenPages:member' + package: word! + summary: |- + Returns all headers or footers on even-numbered pages of a section. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"EvenPages"' + - name: firstPage + uid: 'word!Word.HeaderFooterType.firstPage:member' + package: word! + summary: |- + Returns the header or footer on the first page of a section. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"FirstPage"' + - name: primary + uid: 'word!Word.HeaderFooterType.primary:member' + package: word! + summary: >- + Returns the header or footer on all pages of a section, but excludes the first page or even pages if they are + different. + + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Primary"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.inlinepicture.yml b/docs/docs-ref-autogen/word_1_9/word/word.inlinepicture.yml new file mode 100644 index 0000000000..6c8932fb67 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.inlinepicture.yml @@ -0,0 +1,767 @@ +### YamlMime:TSType +name: Word.InlinePicture +uid: 'word!Word.InlinePicture:class' +package: word! +fullName: Word.InlinePicture +summary: Represents an inline picture. +remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/15-images/insert-and-get-pictures.yaml + + + // Inserts an image anchored to the last paragraph. + + await Word.run(async (context) => { + context.document.body.paragraphs + .getLast() + .insertParagraph("", "After") + .insertInlinePictureFromBase64(base64Image, "End"); + + await context.sync(); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: altTextDescription + uid: 'word!Word.InlinePicture#altTextDescription:member' + package: word! + fullName: altTextDescription + summary: Specifies a string that represents the alternative text associated with the inline image. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'altTextDescription: string;' + return: + type: string + - name: altTextTitle + uid: 'word!Word.InlinePicture#altTextTitle:member' + package: word! + fullName: altTextTitle + summary: Specifies a string that contains the title for the inline image. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'altTextTitle: string;' + return: + type: string + - name: context + uid: 'word!Word.InlinePicture#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: height + uid: 'word!Word.InlinePicture#height:member' + package: word! + fullName: height + summary: Specifies a number that describes the height of the inline image. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'height: number;' + return: + type: number + - name: hyperlink + uid: 'word!Word.InlinePicture#hyperlink:member' + package: word! + fullName: hyperlink + summary: 'Specifies a hyperlink on the image. Use a ''\#'' to separate the address part from the optional location part.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'hyperlink: string;' + return: + type: string + - name: lockAspectRatio + uid: 'word!Word.InlinePicture#lockAspectRatio:member' + package: word! + fullName: lockAspectRatio + summary: Specifies a value that indicates whether the inline image retains its original proportions when you resize it. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lockAspectRatio: boolean;' + return: + type: boolean + - name: paragraph + uid: 'word!Word.InlinePicture#paragraph:member' + package: word! + fullName: paragraph + summary: Gets the parent paragraph that contains the inline image. + remarks: '\[ [API set: WordApi 1.2](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly paragraph: Word.Paragraph;' + return: + type: '' + - name: parentContentControl + uid: 'word!Word.InlinePicture#parentContentControl:member' + package: word! + fullName: parentContentControl + summary: >- + Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent + content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentContentControl: Word.ContentControl;' + return: + type: '' + - name: parentContentControlOrNullObject + uid: 'word!Word.InlinePicture#parentContentControlOrNullObject:member' + package: word! + fullName: parentContentControlOrNullObject + summary: >- + Gets the content control that contains the inline image. If there isn't a parent content control, then this method + will return an object with its `isNullObject` property set to `true`. For further information, see + [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentContentControlOrNullObject: Word.ContentControl;' + return: + type: '' + - name: parentTable + uid: 'word!Word.InlinePicture#parentTable:member' + package: word! + fullName: parentTable + summary: Gets the table that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTable: Word.Table;' + return: + type: '' + - name: parentTableCell + uid: 'word!Word.InlinePicture#parentTableCell:member' + package: word! + fullName: parentTableCell + summary: >- + Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a + table cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTableCell: Word.TableCell;' + return: + type: '' + - name: parentTableCellOrNullObject + uid: 'word!Word.InlinePicture#parentTableCellOrNullObject:member' + package: word! + fullName: parentTableCellOrNullObject + summary: >- + Gets the table cell that contains the inline image. If it isn't contained in a table cell, then this method will + return an object with its `isNullObject` property set to `true`. For further information, see + [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTableCellOrNullObject: Word.TableCell;' + return: + type: '' + - name: parentTableOrNullObject + uid: 'word!Word.InlinePicture#parentTableOrNullObject:member' + package: word! + fullName: parentTableOrNullObject + summary: >- + Gets the table that contains the inline image. If it isn't contained in a table, then this method will return an + object with its `isNullObject` property set to `true`. For further information, see [*OrNullObject + methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTableOrNullObject: Word.Table;' + return: + type: '' + - name: width + uid: 'word!Word.InlinePicture#width:member' + package: word! + fullName: width + summary: Specifies a number that describes the width of the inline image. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'width: number;' + return: + type: number +methods: + - name: delete() + uid: 'word!Word.InlinePicture#delete:member(1)' + package: word! + fullName: delete() + summary: Deletes the inline picture from the document. + remarks: '\[ [API set: WordApi 1.2](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'delete(): void;' + return: + type: void + description: '' + - name: getBase64ImageSrc() + uid: 'word!Word.InlinePicture#getBase64ImageSrc:member(1)' + package: word! + fullName: getBase64ImageSrc() + summary: Gets the Base64-encoded string representation of the inline image. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/15-images/insert-and-get-pictures.yaml + + + // Gets the first image in the document. + + await Word.run(async (context) => { + const firstPicture: Word.InlinePicture = context.document.body.inlinePictures.getFirst(); + firstPicture.load("width, height, imageFormat"); + + await context.sync(); + console.log(`Image dimensions: ${firstPicture.width} x ${firstPicture.height}`, `Image format: ${firstPicture.imageFormat}`); + // Get the image encoded as Base64. + const base64 = firstPicture.getBase64ImageSrc(); + + await context.sync(); + console.log(base64.value); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getBase64ImageSrc(): OfficeExtension.ClientResult;' + return: + type: '<string>' + description: '' + - name: getNext() + uid: 'word!Word.InlinePicture#getNext:member(1)' + package: word! + fullName: getNext() + summary: Gets the next inline image. Throws an `ItemNotFound` error if this inline image is the last one. + remarks: |- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // To use this snippet, add an inline picture to the document and assign it an alt text title. + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the first inline picture. + const firstPicture = context.document.body.inlinePictures.getFirstOrNullObject(); + + // Queue a command to load the alternative text title of the picture. + firstPicture.load('altTextTitle'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + if (firstPicture.isNullObject) { + console.log('There are no inline pictures in this document.') + } else { + console.log(firstPicture.altTextTitle); + } + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getNext(): Word.InlinePicture;' + return: + type: '' + description: '' + - name: getNextOrNullObject() + uid: 'word!Word.InlinePicture#getNextOrNullObject:member(1)' + package: word! + fullName: getNextOrNullObject() + summary: >- + Gets the next inline image. If this inline image is the last one, then this method will return an object with its + `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: |- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // To use this snippet, add an inline picture to the document and assign it an alt text title. + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the first inline picture. + const firstPicture = context.document.body.inlinePictures.getFirstOrNullObject(); + + // Queue a command to load the alternative text title of the picture. + firstPicture.load('altTextTitle'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + if (firstPicture.isNullObject) { + console.log('There are no inline pictures in this document.') + } else { + console.log(firstPicture.altTextTitle); + } + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getNextOrNullObject(): Word.InlinePicture;' + return: + type: '' + description: '' + - name: getRange(rangeLocation) + uid: 'word!Word.InlinePicture#getRange:member(1)' + package: word! + fullName: getRange(rangeLocation) + summary: 'Gets the picture, or the starting or ending point of the picture, as a range.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | "Whole" + | "Start" | "End"): Word.Range; + parameters: + - id: rangeLocation + description: 'Optional. The range location must be ''Whole'', ''Start'', or ''End''.' + type: >- + | | + | "Whole" | "Start" | "End" + return: + type: '' + description: '' + - name: 'insertBreak(breakType, insertLocation)' + uid: 'word!Word.InlinePicture#insertBreak:member(1)' + package: word! + fullName: 'insertBreak(breakType, insertLocation)' + summary: Inserts a break at the specified location in the main document. + remarks: '\[ [API set: WordApi 1.2](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | + "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | + "After"): void; + parameters: + - id: breakType + description: Required. The break type to add. + type: >- + | "Page" | "Next" | "SectionNext" | "SectionContinuous" | + "SectionEven" | "SectionOdd" | "Line" + - id: insertLocation + description: Required. The value must be 'Before' or 'After'. + type: >- + | + | "Before" | "After" + return: + type: void + description: '' + - name: insertContentControl() + uid: 'word!Word.InlinePicture#insertContentControl:member(1)' + package: word! + fullName: insertContentControl() + summary: Wraps the inline picture with a rich text content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'insertContentControl(): Word.ContentControl;' + return: + type: '' + description: '' + - name: 'insertFileFromBase64(base64File, insertLocation)' + uid: 'word!Word.InlinePicture#insertFileFromBase64:member(1)' + package: word! + fullName: 'insertFileFromBase64(base64File, insertLocation)' + summary: Inserts a document at the specified location. + remarks: >- + \[ [API set: WordApi 1.2](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form + field). Consider replacing such a form field with a content control or other option appropriate for your scenario. + isPreview: false + isDeprecated: false + syntax: + content: >- + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after + | "Before" | "After"): Word.Range; + parameters: + - id: base64File + description: Required. The Base64-encoded content of a .docx file. + type: string + - id: insertLocation + description: Required. The value must be 'Before' or 'After'. + type: >- + | + | "Before" | "After" + return: + type: '' + description: '' + - name: 'insertHtml(html, insertLocation)' + uid: 'word!Word.InlinePicture#insertHtml:member(1)' + package: word! + fullName: 'insertHtml(html, insertLocation)' + summary: Inserts HTML at the specified location. + remarks: '\[ [API set: WordApi 1.2](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + insertHtml(html: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | + "After"): Word.Range; + parameters: + - id: html + description: Required. The HTML to be inserted. + type: string + - id: insertLocation + description: Required. The value must be 'Before' or 'After'. + type: >- + | + | "Before" | "After" + return: + type: '' + description: '' + - name: 'insertInlinePictureFromBase64(base64EncodedImage, insertLocation)' + uid: 'word!Word.InlinePicture#insertInlinePictureFromBase64:member(1)' + package: word! + fullName: 'insertInlinePictureFromBase64(base64EncodedImage, insertLocation)' + summary: Inserts an inline picture at the specified location. + remarks: '\[ [API set: WordApi 1.2](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | + Word.InsertLocation.before | Word.InsertLocation.after | "Replace" | "Before" | "After"): Word.InlinePicture; + parameters: + - id: base64EncodedImage + description: Required. The Base64-encoded image to be inserted. + type: string + - id: insertLocation + description: 'Required. The value must be ''Replace'', ''Before'', or ''After''.' + type: >- + | | | "Replace" | "Before" | "After" + return: + type: '' + description: '' + - name: 'insertOoxml(ooxml, insertLocation)' + uid: 'word!Word.InlinePicture#insertOoxml:member(1)' + package: word! + fullName: 'insertOoxml(ooxml, insertLocation)' + summary: Inserts OOXML at the specified location. + remarks: '\[ [API set: WordApi 1.2](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | + "After"): Word.Range; + parameters: + - id: ooxml + description: Required. The OOXML to be inserted. + type: string + - id: insertLocation + description: Required. The value must be 'Before' or 'After'. + type: >- + | + | "Before" | "After" + return: + type: '' + description: '' + - name: 'insertParagraph(paragraphText, insertLocation)' + uid: 'word!Word.InlinePicture#insertParagraph:member(1)' + package: word! + fullName: 'insertParagraph(paragraphText, insertLocation)' + summary: Inserts a paragraph at the specified location. + remarks: '\[ [API set: WordApi 1.2](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | + "Before" | "After"): Word.Paragraph; + parameters: + - id: paragraphText + description: Required. The paragraph text to be inserted. + type: string + - id: insertLocation + description: Required. The value must be 'Before' or 'After'. + type: >- + | + | "Before" | "After" + return: + type: '' + description: '' + - name: 'insertText(text, insertLocation)' + uid: 'word!Word.InlinePicture#insertText:member(1)' + package: word! + fullName: 'insertText(text, insertLocation)' + summary: Inserts text at the specified location. + remarks: '\[ [API set: WordApi 1.2](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + insertText(text: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | + "After"): Word.Range; + parameters: + - id: text + description: Required. Text to be inserted. + type: string + - id: insertLocation + description: Required. The value must be 'Before' or 'After'. + type: >- + | + | "Before" | "After" + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.InlinePicture#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.InlinePictureLoadOptions): Word.InlinePicture;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.InlinePicture#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.InlinePicture;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.InlinePicture#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.InlinePicture; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: select(selectionMode) + uid: 'word!Word.InlinePicture#select:member(1)' + package: word! + fullName: select(selectionMode) + summary: Selects the inline picture. This causes Word to scroll to the selection. + remarks: '\[ [API set: WordApi 1.2](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'select(selectionMode?: Word.SelectionMode): void;' + parameters: + - id: selectionMode + description: 'Optional. The selection mode must be ''Select'', ''Start'', or ''End''. ''Select'' is the default.' + type: '' + return: + type: void + description: '' + - name: select(selectionModeString) + uid: 'word!Word.InlinePicture#select:member(2)' + package: word! + fullName: select(selectionModeString) + summary: Selects the inline picture. This causes Word to scroll to the selection. + remarks: '\[ [API set: WordApi 1.2](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'select(selectionModeString?: "Select" | "Start" | "End"): void;' + parameters: + - id: selectionModeString + description: 'Optional. The selection mode must be ''Select'', ''Start'', or ''End''. ''Select'' is the default.' + type: '"Select" | "Start" | "End"' + return: + type: void + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.InlinePicture#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.InlinePictureUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.InlinePicture#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.InlinePicture): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.InlinePicture#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.InlinePicture` object is an API object, the `toJSON` method returns a + plain JavaScript object (typed as `Word.Interfaces.InlinePictureData`) that contains shallow copies of any + loaded child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.InlinePictureData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.InlinePicture#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.InlinePicture;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.InlinePicture#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.InlinePicture;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.inlinepicturecollection.yml b/docs/docs-ref-autogen/word_1_9/word/word.inlinepicturecollection.yml new file mode 100644 index 0000000000..324654e259 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.inlinepicturecollection.yml @@ -0,0 +1,216 @@ +### YamlMime:TSType +name: Word.InlinePictureCollection +uid: 'word!Word.InlinePictureCollection:class' +package: word! +fullName: Word.InlinePictureCollection +summary: 'Contains a collection of [Word.InlinePicture](xref:word!Word.InlinePicture:class) objects.' +remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/15-images/insert-and-get-pictures.yaml + + + // Gets the first image in the document. + + await Word.run(async (context) => { + const firstPicture: Word.InlinePicture = context.document.body.inlinePictures.getFirst(); + firstPicture.load("width, height, imageFormat"); + + await context.sync(); + console.log(`Image dimensions: ${firstPicture.width} x ${firstPicture.height}`, `Image format: ${firstPicture.imageFormat}`); + // Get the image encoded as Base64. + const base64 = firstPicture.getBase64ImageSrc(); + + await context.sync(); + console.log(base64.value); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.InlinePictureCollection#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: items + uid: 'word!Word.InlinePictureCollection#items:member' + package: word! + fullName: items + summary: Gets the loaded child items in this collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly items: Word.InlinePicture[];' + return: + type: '[]' +methods: + - name: getFirst() + uid: 'word!Word.InlinePictureCollection#getFirst:member(1)' + package: word! + fullName: getFirst() + summary: Gets the first inline image in this collection. Throws an `ItemNotFound` error if this collection is empty. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFirst(): Word.InlinePicture;' + return: + type: '' + description: '' + - name: getFirstOrNullObject() + uid: 'word!Word.InlinePictureCollection#getFirstOrNullObject:member(1)' + package: word! + fullName: getFirstOrNullObject() + summary: >- + Gets the first inline image in this collection. If this collection is empty, then this method will return an + object with its `isNullObject` property set to `true`. For further information, see [*OrNullObject + methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFirstOrNullObject(): Word.InlinePicture;' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.InlinePictureCollection#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: >- + load(options?: Word.Interfaces.InlinePictureCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): + Word.InlinePictureCollection; + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: >- + & + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.InlinePictureCollection#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.InlinePictureCollection;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.InlinePictureCollection#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.InlinePictureCollection;' + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: '' + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.InlinePictureCollection#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.InlinePictureCollection` object is an API object, the `toJSON` method + returns a plain JavaScript object (typed as `Word.Interfaces.InlinePictureCollectionData`) that contains + an "items" array with shallow copies of any loaded properties from the collection's items. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.InlinePictureCollectionData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.InlinePictureCollection#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.InlinePictureCollection;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.InlinePictureCollection#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.InlinePictureCollection;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.insertfileoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.insertfileoptions.yml new file mode 100644 index 0000000000..5c76112443 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.insertfileoptions.yml @@ -0,0 +1,141 @@ +### YamlMime:TSType +name: Word.InsertFileOptions +uid: 'word!Word.InsertFileOptions:interface' +package: word! +fullName: Word.InsertFileOptions +summary: Specifies the options to determine what to copy when inserting a file. +remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/insert-external-document.yaml + + + // Inserts content (applying selected settings) from another document passed in as a Base64-encoded string. + + await Word.run(async (context) => { + // Use the Base64-encoded string representation of the selected .docx file. + context.document.insertFileFromBase64(externalDocument, "Replace", { + importTheme: true, + importStyles: true, + importParagraphSpacing: true, + importPageColor: true, + importChangeTrackingMode: true, + importCustomProperties: true, + importCustomXmlParts: true, + importDifferentOddEvenPages: true + }); + await context.sync(); + }); + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: importChangeTrackingMode + uid: 'word!Word.InsertFileOptions#importChangeTrackingMode:member' + package: word! + fullName: importChangeTrackingMode + summary: Represents whether the change tracking mode status from the source document should be imported. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'importChangeTrackingMode?: boolean;' + return: + type: boolean + - name: importCustomProperties + uid: 'word!Word.InsertFileOptions#importCustomProperties:member' + package: word! + fullName: importCustomProperties + summary: >- + Represents whether the custom properties from the source document should be imported. Overwrites existing + properties with the same name. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'importCustomProperties?: boolean;' + return: + type: boolean + - name: importCustomXmlParts + uid: 'word!Word.InsertFileOptions#importCustomXmlParts:member' + package: word! + fullName: importCustomXmlParts + summary: Represents whether the custom XML parts from the source document should be imported. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'importCustomXmlParts?: boolean;' + return: + type: boolean + - name: importDifferentOddEvenPages + uid: 'word!Word.InsertFileOptions#importDifferentOddEvenPages:member' + package: word! + fullName: importDifferentOddEvenPages + summary: >- + Represents whether to import the Different Odd and Even Pages setting for the header and footer from the source + document. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'importDifferentOddEvenPages?: boolean;' + return: + type: boolean + - name: importPageColor + uid: 'word!Word.InsertFileOptions#importPageColor:member' + package: word! + fullName: importPageColor + summary: Represents whether the page color and other background information from the source document should be imported. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'importPageColor?: boolean;' + return: + type: boolean + - name: importParagraphSpacing + uid: 'word!Word.InsertFileOptions#importParagraphSpacing:member' + package: word! + fullName: importParagraphSpacing + summary: Represents whether the paragraph spacing from the source document should be imported. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'importParagraphSpacing?: boolean;' + return: + type: boolean + - name: importStyles + uid: 'word!Word.InsertFileOptions#importStyles:member' + package: word! + fullName: importStyles + summary: Represents whether the styles from the source document should be imported. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'importStyles?: boolean;' + return: + type: boolean + - name: importTheme + uid: 'word!Word.InsertFileOptions#importTheme:member' + package: word! + fullName: importTheme + summary: Represents whether the theme from the source document should be imported. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'importTheme?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.insertlocation.yml b/docs/docs-ref-autogen/word_1_9/word/word.insertlocation.yml new file mode 100644 index 0000000000..aa11abc186 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.insertlocation.yml @@ -0,0 +1,79 @@ +### YamlMime:TSEnum +name: Word.InsertLocation +uid: 'word!Word.InsertLocation:enum' +package: word! +fullName: Word.InsertLocation +summary: The insertion location types. +remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + To be used with an API call, such as `obj.insertSomething(newStuff, location);`. If the location is "Before" + or "After", the new content will be outside of the modified object. If the location is "Start" or "End", the new + content will be included as part of the modified object. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/insert-section-breaks.yaml + + + // Inserts a section without an associated page break. + + await Word.run(async (context) => { + const body: Word.Body = context.document.body; + body.insertBreak(Word.BreakType.sectionContinuous, Word.InsertLocation.end); + + await context.sync(); + + console.log("Inserted section without an associated page break."); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: after + uid: 'word!Word.InsertLocation.after:member' + package: word! + summary: |- + Add content after the contents of the calling object. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"After"' + - name: before + uid: 'word!Word.InsertLocation.before:member' + package: word! + summary: |- + Add content before the contents of the calling object. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Before"' + - name: end + uid: 'word!Word.InsertLocation.end:member' + package: word! + summary: |- + Append content to the contents of the calling object. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"End"' + - name: replace + uid: 'word!Word.InsertLocation.replace:member' + package: word! + summary: |- + Replace the contents of the current object. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Replace"' + - name: start + uid: 'word!Word.InsertLocation.start:member' + package: word! + summary: |- + Prepend content to the contents of the calling object. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Start"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.annotationcollectiondata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.annotationcollectiondata.yml new file mode 100644 index 0000000000..cb7e615930 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.annotationcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.AnnotationCollectionData +uid: 'word!Word.Interfaces.AnnotationCollectionData:interface' +package: word! +fullName: Word.Interfaces.AnnotationCollectionData +summary: An interface describing the data returned by calling `annotationCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.AnnotationCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.AnnotationData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.annotationcollectionloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.annotationcollectionloadoptions.yml new file mode 100644 index 0000000000..db97fe2984 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.annotationcollectionloadoptions.yml @@ -0,0 +1,63 @@ +### YamlMime:TSType +name: Word.Interfaces.AnnotationCollectionLoadOptions +uid: 'word!Word.Interfaces.AnnotationCollectionLoadOptions:interface' +package: word! +fullName: Word.Interfaces.AnnotationCollectionLoadOptions +summary: 'Contains a collection of [Word.Annotation](xref:word!Word.Annotation:class) objects.' +remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.AnnotationCollectionLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: critiqueAnnotation + uid: 'word!Word.Interfaces.AnnotationCollectionLoadOptions#critiqueAnnotation:member' + package: word! + fullName: critiqueAnnotation + summary: 'For EACH ITEM in the collection: Gets the critique annotation object.' + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'critiqueAnnotation?: Word.Interfaces.CritiqueAnnotationLoadOptions;' + return: + type: '' + - name: id + uid: 'word!Word.Interfaces.AnnotationCollectionLoadOptions#id:member' + package: word! + fullName: id + summary: >- + For EACH ITEM in the collection: Gets the unique identifier, which is meant to be used for easier tracking of + Annotation objects. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'id?: boolean;' + return: + type: boolean + - name: state + uid: 'word!Word.Interfaces.AnnotationCollectionLoadOptions#state:member' + package: word! + fullName: state + summary: 'For EACH ITEM in the collection: Gets the state of the annotation.' + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'state?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.annotationcollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.annotationcollectionupdatedata.yml new file mode 100644 index 0000000000..9f07695711 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.annotationcollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.AnnotationCollectionUpdateData +uid: 'word!Word.Interfaces.AnnotationCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.AnnotationCollectionUpdateData +summary: >- + An interface for updating data on the `AnnotationCollection` object, for use in `annotationCollection.set({ ... + })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.AnnotationCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.AnnotationData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.annotationdata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.annotationdata.yml new file mode 100644 index 0000000000..c016aac489 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.annotationdata.yml @@ -0,0 +1,35 @@ +### YamlMime:TSType +name: Word.Interfaces.AnnotationData +uid: 'word!Word.Interfaces.AnnotationData:interface' +package: word! +fullName: Word.Interfaces.AnnotationData +summary: An interface describing the data returned by calling `annotation.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: id + uid: 'word!Word.Interfaces.AnnotationData#id:member' + package: word! + fullName: id + summary: 'Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects.' + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'id?: string;' + return: + type: string + - name: state + uid: 'word!Word.Interfaces.AnnotationData#state:member' + package: word! + fullName: state + summary: Gets the state of the annotation. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'state?: Word.AnnotationState | "Created" | "Accepted" | "Rejected";' + return: + type: ' | "Created" | "Accepted" | "Rejected"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.annotationloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.annotationloadoptions.yml new file mode 100644 index 0000000000..c54a84b372 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.annotationloadoptions.yml @@ -0,0 +1,61 @@ +### YamlMime:TSType +name: Word.Interfaces.AnnotationLoadOptions +uid: 'word!Word.Interfaces.AnnotationLoadOptions:interface' +package: word! +fullName: Word.Interfaces.AnnotationLoadOptions +summary: Represents an annotation attached to a paragraph. +remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.AnnotationLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: critiqueAnnotation + uid: 'word!Word.Interfaces.AnnotationLoadOptions#critiqueAnnotation:member' + package: word! + fullName: critiqueAnnotation + summary: Gets the critique annotation object. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'critiqueAnnotation?: Word.Interfaces.CritiqueAnnotationLoadOptions;' + return: + type: '' + - name: id + uid: 'word!Word.Interfaces.AnnotationLoadOptions#id:member' + package: word! + fullName: id + summary: 'Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects.' + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'id?: boolean;' + return: + type: boolean + - name: state + uid: 'word!Word.Interfaces.AnnotationLoadOptions#state:member' + package: word! + fullName: state + summary: Gets the state of the annotation. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'state?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.bodydata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.bodydata.yml new file mode 100644 index 0000000000..cf21fbd5d2 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.bodydata.yml @@ -0,0 +1,221 @@ +### YamlMime:TSType +name: Word.Interfaces.BodyData +uid: 'word!Word.Interfaces.BodyData:interface' +package: word! +fullName: Word.Interfaces.BodyData +summary: An interface describing the data returned by calling `body.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: contentControls + uid: 'word!Word.Interfaces.BodyData#contentControls:member' + package: word! + fullName: contentControls + summary: Gets the collection of rich text content control objects in the body. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'contentControls?: Word.Interfaces.ContentControlData[];' + return: + type: '[]' + - name: fields + uid: 'word!Word.Interfaces.BodyData#fields:member' + package: word! + fullName: fields + summary: Gets the collection of field objects in the body. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'fields?: Word.Interfaces.FieldData[];' + return: + type: '[]' + - name: font + uid: 'word!Word.Interfaces.BodyData#font:member' + package: word! + fullName: font + summary: 'Gets the text format of the body. Use this to get and set font name, size, color and other properties.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontData;' + return: + type: '' + - name: inlinePictures + uid: 'word!Word.Interfaces.BodyData#inlinePictures:member' + package: word! + fullName: inlinePictures + summary: Gets the collection of InlinePicture objects in the body. The collection doesn't include floating images. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'inlinePictures?: Word.Interfaces.InlinePictureData[];' + return: + type: '[]' + - name: lists + uid: 'word!Word.Interfaces.BodyData#lists:member' + package: word! + fullName: lists + summary: Gets the collection of list objects in the body. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lists?: Word.Interfaces.ListData[];' + return: + type: '[]' + - name: paragraphs + uid: 'word!Word.Interfaces.BodyData#paragraphs:member' + package: word! + fullName: paragraphs + summary: Gets the collection of paragraph objects in the body. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Important: Paragraphs in tables aren't returned for requirement sets 1.1 and 1.2. From requirement set 1.3, + paragraphs in tables are also returned. + isPreview: false + isDeprecated: false + syntax: + content: 'paragraphs?: Word.Interfaces.ParagraphData[];' + return: + type: '[]' + - name: style + uid: 'word!Word.Interfaces.BodyData#style:member' + package: word! + fullName: style + summary: >- + Specifies the style name for the body. Use this property for custom styles and localized style names. To use the + built-in styles that are portable between locales, see the "styleBuiltIn" property. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'style?: string;' + return: + type: string + - name: styleBuiltIn + uid: 'word!Word.Interfaces.BodyData#styleBuiltIn:member' + package: word! + fullName: styleBuiltIn + summary: >- + Specifies the built-in style name for the body. Use this property for built-in styles that are portable between + locales. To use custom styles or localized style names, see the "style" property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | + "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | + "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | + "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | + "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | + "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | + "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" + | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" + | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" + | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | + "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" + | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | + "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | + "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | + "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | + "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" + | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | + "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | + "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | + "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | + "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | + "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | + "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | + "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + return: + type: >- + | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | + "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | + "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | + "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | + "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | + "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | + "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | + "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | + "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | + "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | + "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | + "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | + "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" + | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" + | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | + "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | + "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | + "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | + "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | + "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | + "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | + "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | + "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | + "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | + "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6" + - name: tables + uid: 'word!Word.Interfaces.BodyData#tables:member' + package: word! + fullName: tables + summary: Gets the collection of table objects in the body. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'tables?: Word.Interfaces.TableData[];' + return: + type: '[]' + - name: text + uid: 'word!Word.Interfaces.BodyData#text:member' + package: word! + fullName: text + summary: Gets the text of the body. Use the insertText method to insert text. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'text?: string;' + return: + type: string + - name: type + uid: 'word!Word.Interfaces.BodyData#type:member' + package: word! + fullName: type + summary: >- + Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional + types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordAPIOnline 1.1 and later. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + type?: Word.BodyType | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell" | "Footnote" | + "Endnote" | "NoteItem"; + return: + type: >- + | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell" + | "Footnote" | "Endnote" | "NoteItem" diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.bodyloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.bodyloadoptions.yml new file mode 100644 index 0000000000..f1741007e0 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.bodyloadoptions.yml @@ -0,0 +1,181 @@ +### YamlMime:TSType +name: Word.Interfaces.BodyLoadOptions +uid: 'word!Word.Interfaces.BodyLoadOptions:interface' +package: word! +fullName: Word.Interfaces.BodyLoadOptions +summary: Represents the body of a document or a section. +remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.BodyLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: font + uid: 'word!Word.Interfaces.BodyLoadOptions#font:member' + package: word! + fullName: font + summary: 'Gets the text format of the body. Use this to get and set font name, size, color and other properties.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontLoadOptions;' + return: + type: '' + - name: parentBody + uid: 'word!Word.Interfaces.BodyLoadOptions#parentBody:member' + package: word! + fullName: parentBody + summary: >- + Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws an + `ItemNotFound` error if there isn't a parent body. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentBody?: Word.Interfaces.BodyLoadOptions;' + return: + type: '' + - name: parentBodyOrNullObject + uid: 'word!Word.Interfaces.BodyLoadOptions#parentBodyOrNullObject:member' + package: word! + fullName: parentBodyOrNullObject + summary: >- + Gets the parent body of the body. For example, a table cell body's parent body could be a header. If there isn't a + parent body, then this method will return an object with its `isNullObject` property set to `true`. For + further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentBodyOrNullObject?: Word.Interfaces.BodyLoadOptions;' + return: + type: '' + - name: parentContentControl + uid: 'word!Word.Interfaces.BodyLoadOptions#parentContentControl:member' + package: word! + fullName: parentContentControl + summary: >- + Gets the content control that contains the body. Throws an `ItemNotFound` error if there isn't a parent content + control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControl?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentContentControlOrNullObject + uid: 'word!Word.Interfaces.BodyLoadOptions#parentContentControlOrNullObject:member' + package: word! + fullName: parentContentControlOrNullObject + summary: >- + Gets the content control that contains the body. If there isn't a parent content control, then this method will + return an object with its `isNullObject` property set to `true`. For further information, see + [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentSection + uid: 'word!Word.Interfaces.BodyLoadOptions#parentSection:member' + package: word! + fullName: parentSection + summary: Gets the parent section of the body. Throws an `ItemNotFound` error if there isn't a parent section. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentSection?: Word.Interfaces.SectionLoadOptions;' + return: + type: '' + - name: parentSectionOrNullObject + uid: 'word!Word.Interfaces.BodyLoadOptions#parentSectionOrNullObject:member' + package: word! + fullName: parentSectionOrNullObject + summary: >- + Gets the parent section of the body. If there isn't a parent section, then this method will return an object with + its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentSectionOrNullObject?: Word.Interfaces.SectionLoadOptions;' + return: + type: '' + - name: style + uid: 'word!Word.Interfaces.BodyLoadOptions#style:member' + package: word! + fullName: style + summary: >- + Specifies the style name for the body. Use this property for custom styles and localized style names. To use the + built-in styles that are portable between locales, see the "styleBuiltIn" property. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'style?: boolean;' + return: + type: boolean + - name: styleBuiltIn + uid: 'word!Word.Interfaces.BodyLoadOptions#styleBuiltIn:member' + package: word! + fullName: styleBuiltIn + summary: >- + Specifies the built-in style name for the body. Use this property for built-in styles that are portable between + locales. To use custom styles or localized style names, see the "style" property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleBuiltIn?: boolean;' + return: + type: boolean + - name: text + uid: 'word!Word.Interfaces.BodyLoadOptions#text:member' + package: word! + fullName: text + summary: Gets the text of the body. Use the insertText method to insert text. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'text?: boolean;' + return: + type: boolean + - name: type + uid: 'word!Word.Interfaces.BodyLoadOptions#type:member' + package: word! + fullName: type + summary: >- + Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional + types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordAPIOnline 1.1 and later. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.bodyupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.bodyupdatedata.yml new file mode 100644 index 0000000000..8bcd41f628 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.bodyupdatedata.yml @@ -0,0 +1,114 @@ +### YamlMime:TSType +name: Word.Interfaces.BodyUpdateData +uid: 'word!Word.Interfaces.BodyUpdateData:interface' +package: word! +fullName: Word.Interfaces.BodyUpdateData +summary: 'An interface for updating data on the `Body` object, for use in `body.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: font + uid: 'word!Word.Interfaces.BodyUpdateData#font:member' + package: word! + fullName: font + summary: 'Gets the text format of the body. Use this to get and set font name, size, color and other properties.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontUpdateData;' + return: + type: '' + - name: style + uid: 'word!Word.Interfaces.BodyUpdateData#style:member' + package: word! + fullName: style + summary: >- + Specifies the style name for the body. Use this property for custom styles and localized style names. To use the + built-in styles that are portable between locales, see the "styleBuiltIn" property. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'style?: string;' + return: + type: string + - name: styleBuiltIn + uid: 'word!Word.Interfaces.BodyUpdateData#styleBuiltIn:member' + package: word! + fullName: styleBuiltIn + summary: >- + Specifies the built-in style name for the body. Use this property for built-in styles that are portable between + locales. To use custom styles or localized style names, see the "style" property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | + "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | + "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | + "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | + "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | + "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | + "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" + | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" + | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" + | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | + "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" + | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | + "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | + "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | + "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | + "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" + | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | + "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | + "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | + "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | + "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | + "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | + "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | + "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + return: + type: >- + | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | + "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | + "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | + "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | + "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | + "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | + "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | + "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | + "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | + "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | + "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | + "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | + "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" + | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" + | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | + "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | + "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | + "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | + "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | + "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | + "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | + "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | + "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | + "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | + "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6" diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.bordercollectiondata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.bordercollectiondata.yml new file mode 100644 index 0000000000..7f1f44a0a5 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.bordercollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.BorderCollectionData +uid: 'word!Word.Interfaces.BorderCollectionData:interface' +package: word! +fullName: Word.Interfaces.BorderCollectionData +summary: An interface describing the data returned by calling `borderCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.BorderCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.BorderData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.bordercollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.bordercollectionupdatedata.yml new file mode 100644 index 0000000000..cf80c090a4 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.bordercollectionupdatedata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.BorderCollectionUpdateData +uid: 'word!Word.Interfaces.BorderCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.BorderCollectionUpdateData +summary: 'An interface for updating data on the `BorderCollection` object, for use in `borderCollection.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.BorderCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.BorderData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.borderdata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.borderdata.yml new file mode 100644 index 0000000000..49e2656057 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.borderdata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.BorderData +uid: 'word!Word.Interfaces.BorderData:interface' +package: word! +fullName: Word.Interfaces.BorderData +summary: An interface describing the data returned by calling `border.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.borderupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.borderupdatedata.yml new file mode 100644 index 0000000000..cebd124c91 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.borderupdatedata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.BorderUpdateData +uid: 'word!Word.Interfaces.BorderUpdateData:interface' +package: word! +fullName: Word.Interfaces.BorderUpdateData +summary: 'An interface for updating data on the `Border` object, for use in `border.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.checkboxcontentcontroldata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.checkboxcontentcontroldata.yml new file mode 100644 index 0000000000..4fcc077ac1 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.checkboxcontentcontroldata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.CheckboxContentControlData +uid: 'word!Word.Interfaces.CheckboxContentControlData:interface' +package: word! +fullName: Word.Interfaces.CheckboxContentControlData +summary: An interface describing the data returned by calling `checkboxContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: isChecked + uid: 'word!Word.Interfaces.CheckboxContentControlData#isChecked:member' + package: word! + fullName: isChecked + summary: Specifies the current state of the checkbox. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'isChecked?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.checkboxcontentcontrolloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.checkboxcontentcontrolloadoptions.yml new file mode 100644 index 0000000000..72d439b157 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.checkboxcontentcontrolloadoptions.yml @@ -0,0 +1,37 @@ +### YamlMime:TSType +name: Word.Interfaces.CheckboxContentControlLoadOptions +uid: 'word!Word.Interfaces.CheckboxContentControlLoadOptions:interface' +package: word! +fullName: Word.Interfaces.CheckboxContentControlLoadOptions +summary: The data specific to content controls of type CheckBox. +remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.CheckboxContentControlLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: isChecked + uid: 'word!Word.Interfaces.CheckboxContentControlLoadOptions#isChecked:member' + package: word! + fullName: isChecked + summary: Specifies the current state of the checkbox. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'isChecked?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.checkboxcontentcontrolupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.checkboxcontentcontrolupdatedata.yml new file mode 100644 index 0000000000..db5ce76eec --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.checkboxcontentcontrolupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.CheckboxContentControlUpdateData +uid: 'word!Word.Interfaces.CheckboxContentControlUpdateData:interface' +package: word! +fullName: Word.Interfaces.CheckboxContentControlUpdateData +summary: >- + An interface for updating data on the `CheckboxContentControl` object, for use in `checkboxContentControl.set({ ... + })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: isChecked + uid: 'word!Word.Interfaces.CheckboxContentControlUpdateData#isChecked:member' + package: word! + fullName: isChecked + summary: Specifies the current state of the checkbox. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'isChecked?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.collectionloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.collectionloadoptions.yml new file mode 100644 index 0000000000..2cb4071ae5 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.collectionloadoptions.yml @@ -0,0 +1,37 @@ +### YamlMime:TSType +name: Word.Interfaces.CollectionLoadOptions +uid: 'word!Word.Interfaces.CollectionLoadOptions:interface' +package: word! +fullName: Word.Interfaces.CollectionLoadOptions +summary: Provides ways to load properties of only a subset of members of a collection. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $skip + uid: 'word!Word.Interfaces.CollectionLoadOptions#$skip:member' + package: word! + fullName: $skip + summary: >- + Specify the number of items in the collection that are to be skipped and not included in the result. If top is + specified, the selection of result will start after skipping the specified number of items. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$skip?: number;' + return: + type: number + - name: $top + uid: 'word!Word.Interfaces.CollectionLoadOptions#$top:member' + package: word! + fullName: $top + summary: Specify the number of items in the queried collection to be included in the result. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$top?: number;' + return: + type: number diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.comboboxcontentcontroldata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.comboboxcontentcontroldata.yml new file mode 100644 index 0000000000..6032dbb944 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.comboboxcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ComboBoxContentControlData +uid: 'word!Word.Interfaces.ComboBoxContentControlData:interface' +package: word! +fullName: Word.Interfaces.ComboBoxContentControlData +summary: An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentcollectiondata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentcollectiondata.yml new file mode 100644 index 0000000000..f8169afbf4 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.CommentCollectionData +uid: 'word!Word.Interfaces.CommentCollectionData:interface' +package: word! +fullName: Word.Interfaces.CommentCollectionData +summary: An interface describing the data returned by calling `commentCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.CommentCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.CommentData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentcollectionloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentcollectionloadoptions.yml new file mode 100644 index 0000000000..e7b02a5a2e --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentcollectionloadoptions.yml @@ -0,0 +1,111 @@ +### YamlMime:TSType +name: Word.Interfaces.CommentCollectionLoadOptions +uid: 'word!Word.Interfaces.CommentCollectionLoadOptions:interface' +package: word! +fullName: Word.Interfaces.CommentCollectionLoadOptions +summary: 'Contains a collection of [Word.Comment](xref:word!Word.Comment:class) objects.' +remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.CommentCollectionLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: authorEmail + uid: 'word!Word.Interfaces.CommentCollectionLoadOptions#authorEmail:member' + package: word! + fullName: authorEmail + summary: 'For EACH ITEM in the collection: Gets the email of the comment''s author.' + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'authorEmail?: boolean;' + return: + type: boolean + - name: authorName + uid: 'word!Word.Interfaces.CommentCollectionLoadOptions#authorName:member' + package: word! + fullName: authorName + summary: 'For EACH ITEM in the collection: Gets the name of the comment''s author.' + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'authorName?: boolean;' + return: + type: boolean + - name: content + uid: 'word!Word.Interfaces.CommentCollectionLoadOptions#content:member' + package: word! + fullName: content + summary: 'For EACH ITEM in the collection: Specifies the comment''s content as plain text.' + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'content?: boolean;' + return: + type: boolean + - name: contentRange + uid: 'word!Word.Interfaces.CommentCollectionLoadOptions#contentRange:member' + package: word! + fullName: contentRange + summary: 'For EACH ITEM in the collection: Specifies the comment''s content range.' + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'contentRange?: Word.Interfaces.CommentContentRangeLoadOptions;' + return: + type: '' + - name: creationDate + uid: 'word!Word.Interfaces.CommentCollectionLoadOptions#creationDate:member' + package: word! + fullName: creationDate + summary: 'For EACH ITEM in the collection: Gets the creation date of the comment.' + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'creationDate?: boolean;' + return: + type: boolean + - name: id + uid: 'word!Word.Interfaces.CommentCollectionLoadOptions#id:member' + package: word! + fullName: id + summary: 'For EACH ITEM in the collection: Gets the ID of the comment.' + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'id?: boolean;' + return: + type: boolean + - name: resolved + uid: 'word!Word.Interfaces.CommentCollectionLoadOptions#resolved:member' + package: word! + fullName: resolved + summary: >- + For EACH ITEM in the collection: Specifies the comment thread's status. Setting to true resolves the comment + thread. Getting a value of true means that the comment thread is resolved. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'resolved?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentcollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentcollectionupdatedata.yml new file mode 100644 index 0000000000..67ed4b255d --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentcollectionupdatedata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.CommentCollectionUpdateData +uid: 'word!Word.Interfaces.CommentCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.CommentCollectionUpdateData +summary: 'An interface for updating data on the `CommentCollection` object, for use in `commentCollection.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.CommentCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.CommentData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentcontentrangedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentcontentrangedata.yml new file mode 100644 index 0000000000..fb66596653 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentcontentrangedata.yml @@ -0,0 +1,105 @@ +### YamlMime:TSType +name: Word.Interfaces.CommentContentRangeData +uid: 'word!Word.Interfaces.CommentContentRangeData:interface' +package: word! +fullName: Word.Interfaces.CommentContentRangeData +summary: An interface describing the data returned by calling `commentContentRange.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: bold + uid: 'word!Word.Interfaces.CommentContentRangeData#bold:member' + package: word! + fullName: bold + summary: Specifies a value that indicates whether the comment text is bold. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'bold?: boolean;' + return: + type: boolean + - name: hyperlink + uid: 'word!Word.Interfaces.CommentContentRangeData#hyperlink:member' + package: word! + fullName: hyperlink + summary: >- + Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted + when you set a new hyperlink on the range. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'hyperlink?: string;' + return: + type: string + - name: isEmpty + uid: 'word!Word.Interfaces.CommentContentRangeData#isEmpty:member' + package: word! + fullName: isEmpty + summary: Checks whether the range length is zero. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'isEmpty?: boolean;' + return: + type: boolean + - name: italic + uid: 'word!Word.Interfaces.CommentContentRangeData#italic:member' + package: word! + fullName: italic + summary: Specifies a value that indicates whether the comment text is italicized. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'italic?: boolean;' + return: + type: boolean + - name: strikeThrough + uid: 'word!Word.Interfaces.CommentContentRangeData#strikeThrough:member' + package: word! + fullName: strikeThrough + summary: Specifies a value that indicates whether the comment text has a strikethrough. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'strikeThrough?: boolean;' + return: + type: boolean + - name: text + uid: 'word!Word.Interfaces.CommentContentRangeData#text:member' + package: word! + fullName: text + summary: Gets the text of the comment range. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'text?: string;' + return: + type: string + - name: underline + uid: 'word!Word.Interfaces.CommentContentRangeData#underline:member' + package: word! + fullName: underline + summary: Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | + "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | + "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | + "WaveDouble"; + return: + type: >- + | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | + "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | + "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | + "WaveHeavy" | "WaveDouble" diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentcontentrangeloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentcontentrangeloadoptions.yml new file mode 100644 index 0000000000..0836773bd3 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentcontentrangeloadoptions.yml @@ -0,0 +1,111 @@ +### YamlMime:TSType +name: Word.Interfaces.CommentContentRangeLoadOptions +uid: 'word!Word.Interfaces.CommentContentRangeLoadOptions:interface' +package: word! +fullName: Word.Interfaces.CommentContentRangeLoadOptions +summary: '' +remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.CommentContentRangeLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: bold + uid: 'word!Word.Interfaces.CommentContentRangeLoadOptions#bold:member' + package: word! + fullName: bold + summary: Specifies a value that indicates whether the comment text is bold. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'bold?: boolean;' + return: + type: boolean + - name: hyperlink + uid: 'word!Word.Interfaces.CommentContentRangeLoadOptions#hyperlink:member' + package: word! + fullName: hyperlink + summary: >- + Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted + when you set a new hyperlink on the range. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'hyperlink?: boolean;' + return: + type: boolean + - name: isEmpty + uid: 'word!Word.Interfaces.CommentContentRangeLoadOptions#isEmpty:member' + package: word! + fullName: isEmpty + summary: Checks whether the range length is zero. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'isEmpty?: boolean;' + return: + type: boolean + - name: italic + uid: 'word!Word.Interfaces.CommentContentRangeLoadOptions#italic:member' + package: word! + fullName: italic + summary: Specifies a value that indicates whether the comment text is italicized. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'italic?: boolean;' + return: + type: boolean + - name: strikeThrough + uid: 'word!Word.Interfaces.CommentContentRangeLoadOptions#strikeThrough:member' + package: word! + fullName: strikeThrough + summary: Specifies a value that indicates whether the comment text has a strikethrough. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'strikeThrough?: boolean;' + return: + type: boolean + - name: text + uid: 'word!Word.Interfaces.CommentContentRangeLoadOptions#text:member' + package: word! + fullName: text + summary: Gets the text of the comment range. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'text?: boolean;' + return: + type: boolean + - name: underline + uid: 'word!Word.Interfaces.CommentContentRangeLoadOptions#underline:member' + package: word! + fullName: underline + summary: Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'underline?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentcontentrangeupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentcontentrangeupdatedata.yml new file mode 100644 index 0000000000..530d043674 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentcontentrangeupdatedata.yml @@ -0,0 +1,83 @@ +### YamlMime:TSType +name: Word.Interfaces.CommentContentRangeUpdateData +uid: 'word!Word.Interfaces.CommentContentRangeUpdateData:interface' +package: word! +fullName: Word.Interfaces.CommentContentRangeUpdateData +summary: >- + An interface for updating data on the `CommentContentRange` object, for use in `commentContentRange.set({ ... })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: bold + uid: 'word!Word.Interfaces.CommentContentRangeUpdateData#bold:member' + package: word! + fullName: bold + summary: Specifies a value that indicates whether the comment text is bold. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'bold?: boolean;' + return: + type: boolean + - name: hyperlink + uid: 'word!Word.Interfaces.CommentContentRangeUpdateData#hyperlink:member' + package: word! + fullName: hyperlink + summary: >- + Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted + when you set a new hyperlink on the range. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'hyperlink?: string;' + return: + type: string + - name: italic + uid: 'word!Word.Interfaces.CommentContentRangeUpdateData#italic:member' + package: word! + fullName: italic + summary: Specifies a value that indicates whether the comment text is italicized. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'italic?: boolean;' + return: + type: boolean + - name: strikeThrough + uid: 'word!Word.Interfaces.CommentContentRangeUpdateData#strikeThrough:member' + package: word! + fullName: strikeThrough + summary: Specifies a value that indicates whether the comment text has a strikethrough. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'strikeThrough?: boolean;' + return: + type: boolean + - name: underline + uid: 'word!Word.Interfaces.CommentContentRangeUpdateData#underline:member' + package: word! + fullName: underline + summary: Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | + "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | + "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | + "WaveDouble"; + return: + type: >- + | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | + "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | + "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | + "WaveHeavy" | "WaveDouble" diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentdata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentdata.yml new file mode 100644 index 0000000000..b28a855b16 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentdata.yml @@ -0,0 +1,109 @@ +### YamlMime:TSType +name: Word.Interfaces.CommentData +uid: 'word!Word.Interfaces.CommentData:interface' +package: word! +fullName: Word.Interfaces.CommentData +summary: An interface describing the data returned by calling `comment.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: authorEmail + uid: 'word!Word.Interfaces.CommentData#authorEmail:member' + package: word! + fullName: authorEmail + summary: Gets the email of the comment's author. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'authorEmail?: string;' + return: + type: string + - name: authorName + uid: 'word!Word.Interfaces.CommentData#authorName:member' + package: word! + fullName: authorName + summary: Gets the name of the comment's author. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'authorName?: string;' + return: + type: string + - name: content + uid: 'word!Word.Interfaces.CommentData#content:member' + package: word! + fullName: content + summary: Specifies the comment's content as plain text. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'content?: string;' + return: + type: string + - name: contentRange + uid: 'word!Word.Interfaces.CommentData#contentRange:member' + package: word! + fullName: contentRange + summary: Specifies the comment's content range. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'contentRange?: Word.Interfaces.CommentContentRangeData;' + return: + type: '' + - name: creationDate + uid: 'word!Word.Interfaces.CommentData#creationDate:member' + package: word! + fullName: creationDate + summary: Gets the creation date of the comment. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'creationDate?: Date;' + return: + type: Date + - name: id + uid: 'word!Word.Interfaces.CommentData#id:member' + package: word! + fullName: id + summary: Gets the ID of the comment. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'id?: string;' + return: + type: string + - name: replies + uid: 'word!Word.Interfaces.CommentData#replies:member' + package: word! + fullName: replies + summary: Gets the collection of reply objects associated with the comment. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'replies?: Word.Interfaces.CommentReplyData[];' + return: + type: '[]' + - name: resolved + uid: 'word!Word.Interfaces.CommentData#resolved:member' + package: word! + fullName: resolved + summary: >- + Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means + that the comment thread is resolved. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'resolved?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentloadoptions.yml new file mode 100644 index 0000000000..fb7b09dcf0 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentloadoptions.yml @@ -0,0 +1,111 @@ +### YamlMime:TSType +name: Word.Interfaces.CommentLoadOptions +uid: 'word!Word.Interfaces.CommentLoadOptions:interface' +package: word! +fullName: Word.Interfaces.CommentLoadOptions +summary: Represents a comment in the document. +remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.CommentLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: authorEmail + uid: 'word!Word.Interfaces.CommentLoadOptions#authorEmail:member' + package: word! + fullName: authorEmail + summary: Gets the email of the comment's author. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'authorEmail?: boolean;' + return: + type: boolean + - name: authorName + uid: 'word!Word.Interfaces.CommentLoadOptions#authorName:member' + package: word! + fullName: authorName + summary: Gets the name of the comment's author. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'authorName?: boolean;' + return: + type: boolean + - name: content + uid: 'word!Word.Interfaces.CommentLoadOptions#content:member' + package: word! + fullName: content + summary: Specifies the comment's content as plain text. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'content?: boolean;' + return: + type: boolean + - name: contentRange + uid: 'word!Word.Interfaces.CommentLoadOptions#contentRange:member' + package: word! + fullName: contentRange + summary: Specifies the comment's content range. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'contentRange?: Word.Interfaces.CommentContentRangeLoadOptions;' + return: + type: '' + - name: creationDate + uid: 'word!Word.Interfaces.CommentLoadOptions#creationDate:member' + package: word! + fullName: creationDate + summary: Gets the creation date of the comment. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'creationDate?: boolean;' + return: + type: boolean + - name: id + uid: 'word!Word.Interfaces.CommentLoadOptions#id:member' + package: word! + fullName: id + summary: Gets the ID of the comment. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'id?: boolean;' + return: + type: boolean + - name: resolved + uid: 'word!Word.Interfaces.CommentLoadOptions#resolved:member' + package: word! + fullName: resolved + summary: >- + Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means + that the comment thread is resolved. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'resolved?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentreplycollectiondata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentreplycollectiondata.yml new file mode 100644 index 0000000000..714af3476d --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentreplycollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.CommentReplyCollectionData +uid: 'word!Word.Interfaces.CommentReplyCollectionData:interface' +package: word! +fullName: Word.Interfaces.CommentReplyCollectionData +summary: An interface describing the data returned by calling `commentReplyCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.CommentReplyCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.CommentReplyData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentreplycollectionloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentreplycollectionloadoptions.yml new file mode 100644 index 0000000000..265b8b34f8 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentreplycollectionloadoptions.yml @@ -0,0 +1,111 @@ +### YamlMime:TSType +name: Word.Interfaces.CommentReplyCollectionLoadOptions +uid: 'word!Word.Interfaces.CommentReplyCollectionLoadOptions:interface' +package: word! +fullName: Word.Interfaces.CommentReplyCollectionLoadOptions +summary: >- + Contains a collection of [Word.CommentReply](xref:word!Word.CommentReply:class) objects. Represents all comment + replies in one comment thread. +remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.CommentReplyCollectionLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: authorEmail + uid: 'word!Word.Interfaces.CommentReplyCollectionLoadOptions#authorEmail:member' + package: word! + fullName: authorEmail + summary: 'For EACH ITEM in the collection: Gets the email of the comment reply''s author.' + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'authorEmail?: boolean;' + return: + type: boolean + - name: authorName + uid: 'word!Word.Interfaces.CommentReplyCollectionLoadOptions#authorName:member' + package: word! + fullName: authorName + summary: 'For EACH ITEM in the collection: Gets the name of the comment reply''s author.' + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'authorName?: boolean;' + return: + type: boolean + - name: content + uid: 'word!Word.Interfaces.CommentReplyCollectionLoadOptions#content:member' + package: word! + fullName: content + summary: 'For EACH ITEM in the collection: Specifies the comment reply''s content. The string is plain text.' + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'content?: boolean;' + return: + type: boolean + - name: contentRange + uid: 'word!Word.Interfaces.CommentReplyCollectionLoadOptions#contentRange:member' + package: word! + fullName: contentRange + summary: 'For EACH ITEM in the collection: Specifies the commentReply''s content range.' + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'contentRange?: Word.Interfaces.CommentContentRangeLoadOptions;' + return: + type: '' + - name: creationDate + uid: 'word!Word.Interfaces.CommentReplyCollectionLoadOptions#creationDate:member' + package: word! + fullName: creationDate + summary: 'For EACH ITEM in the collection: Gets the creation date of the comment reply.' + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'creationDate?: boolean;' + return: + type: boolean + - name: id + uid: 'word!Word.Interfaces.CommentReplyCollectionLoadOptions#id:member' + package: word! + fullName: id + summary: 'For EACH ITEM in the collection: Gets the ID of the comment reply.' + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'id?: boolean;' + return: + type: boolean + - name: parentComment + uid: 'word!Word.Interfaces.CommentReplyCollectionLoadOptions#parentComment:member' + package: word! + fullName: parentComment + summary: 'For EACH ITEM in the collection: Gets the parent comment of this reply.' + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentComment?: Word.Interfaces.CommentLoadOptions;' + return: + type: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentreplycollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentreplycollectionupdatedata.yml new file mode 100644 index 0000000000..5cbad7b245 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentreplycollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.CommentReplyCollectionUpdateData +uid: 'word!Word.Interfaces.CommentReplyCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.CommentReplyCollectionUpdateData +summary: >- + An interface for updating data on the `CommentReplyCollection` object, for use in `commentReplyCollection.set({ ... + })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.CommentReplyCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.CommentReplyData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentreplydata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentreplydata.yml new file mode 100644 index 0000000000..8cfdb240d0 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentreplydata.yml @@ -0,0 +1,95 @@ +### YamlMime:TSType +name: Word.Interfaces.CommentReplyData +uid: 'word!Word.Interfaces.CommentReplyData:interface' +package: word! +fullName: Word.Interfaces.CommentReplyData +summary: An interface describing the data returned by calling `commentReply.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: authorEmail + uid: 'word!Word.Interfaces.CommentReplyData#authorEmail:member' + package: word! + fullName: authorEmail + summary: Gets the email of the comment reply's author. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'authorEmail?: string;' + return: + type: string + - name: authorName + uid: 'word!Word.Interfaces.CommentReplyData#authorName:member' + package: word! + fullName: authorName + summary: Gets the name of the comment reply's author. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'authorName?: string;' + return: + type: string + - name: content + uid: 'word!Word.Interfaces.CommentReplyData#content:member' + package: word! + fullName: content + summary: Specifies the comment reply's content. The string is plain text. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'content?: string;' + return: + type: string + - name: contentRange + uid: 'word!Word.Interfaces.CommentReplyData#contentRange:member' + package: word! + fullName: contentRange + summary: Specifies the commentReply's content range. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'contentRange?: Word.Interfaces.CommentContentRangeData;' + return: + type: '' + - name: creationDate + uid: 'word!Word.Interfaces.CommentReplyData#creationDate:member' + package: word! + fullName: creationDate + summary: Gets the creation date of the comment reply. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'creationDate?: Date;' + return: + type: Date + - name: id + uid: 'word!Word.Interfaces.CommentReplyData#id:member' + package: word! + fullName: id + summary: Gets the ID of the comment reply. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'id?: string;' + return: + type: string + - name: parentComment + uid: 'word!Word.Interfaces.CommentReplyData#parentComment:member' + package: word! + fullName: parentComment + summary: Gets the parent comment of this reply. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentComment?: Word.Interfaces.CommentData;' + return: + type: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentreplyloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentreplyloadoptions.yml new file mode 100644 index 0000000000..cef917e4ea --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentreplyloadoptions.yml @@ -0,0 +1,109 @@ +### YamlMime:TSType +name: Word.Interfaces.CommentReplyLoadOptions +uid: 'word!Word.Interfaces.CommentReplyLoadOptions:interface' +package: word! +fullName: Word.Interfaces.CommentReplyLoadOptions +summary: Represents a comment reply in the document. +remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.CommentReplyLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: authorEmail + uid: 'word!Word.Interfaces.CommentReplyLoadOptions#authorEmail:member' + package: word! + fullName: authorEmail + summary: Gets the email of the comment reply's author. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'authorEmail?: boolean;' + return: + type: boolean + - name: authorName + uid: 'word!Word.Interfaces.CommentReplyLoadOptions#authorName:member' + package: word! + fullName: authorName + summary: Gets the name of the comment reply's author. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'authorName?: boolean;' + return: + type: boolean + - name: content + uid: 'word!Word.Interfaces.CommentReplyLoadOptions#content:member' + package: word! + fullName: content + summary: Specifies the comment reply's content. The string is plain text. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'content?: boolean;' + return: + type: boolean + - name: contentRange + uid: 'word!Word.Interfaces.CommentReplyLoadOptions#contentRange:member' + package: word! + fullName: contentRange + summary: Specifies the commentReply's content range. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'contentRange?: Word.Interfaces.CommentContentRangeLoadOptions;' + return: + type: '' + - name: creationDate + uid: 'word!Word.Interfaces.CommentReplyLoadOptions#creationDate:member' + package: word! + fullName: creationDate + summary: Gets the creation date of the comment reply. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'creationDate?: boolean;' + return: + type: boolean + - name: id + uid: 'word!Word.Interfaces.CommentReplyLoadOptions#id:member' + package: word! + fullName: id + summary: Gets the ID of the comment reply. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'id?: boolean;' + return: + type: boolean + - name: parentComment + uid: 'word!Word.Interfaces.CommentReplyLoadOptions#parentComment:member' + package: word! + fullName: parentComment + summary: Gets the parent comment of this reply. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentComment?: Word.Interfaces.CommentLoadOptions;' + return: + type: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentreplyupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentreplyupdatedata.yml new file mode 100644 index 0000000000..ee89a2b5fa --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentreplyupdatedata.yml @@ -0,0 +1,47 @@ +### YamlMime:TSType +name: Word.Interfaces.CommentReplyUpdateData +uid: 'word!Word.Interfaces.CommentReplyUpdateData:interface' +package: word! +fullName: Word.Interfaces.CommentReplyUpdateData +summary: 'An interface for updating data on the `CommentReply` object, for use in `commentReply.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: content + uid: 'word!Word.Interfaces.CommentReplyUpdateData#content:member' + package: word! + fullName: content + summary: Specifies the comment reply's content. The string is plain text. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'content?: string;' + return: + type: string + - name: contentRange + uid: 'word!Word.Interfaces.CommentReplyUpdateData#contentRange:member' + package: word! + fullName: contentRange + summary: Specifies the commentReply's content range. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'contentRange?: Word.Interfaces.CommentContentRangeUpdateData;' + return: + type: '' + - name: parentComment + uid: 'word!Word.Interfaces.CommentReplyUpdateData#parentComment:member' + package: word! + fullName: parentComment + summary: Gets the parent comment of this reply. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentComment?: Word.Interfaces.CommentUpdateData;' + return: + type: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentupdatedata.yml new file mode 100644 index 0000000000..1320045be1 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.commentupdatedata.yml @@ -0,0 +1,49 @@ +### YamlMime:TSType +name: Word.Interfaces.CommentUpdateData +uid: 'word!Word.Interfaces.CommentUpdateData:interface' +package: word! +fullName: Word.Interfaces.CommentUpdateData +summary: 'An interface for updating data on the `Comment` object, for use in `comment.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: content + uid: 'word!Word.Interfaces.CommentUpdateData#content:member' + package: word! + fullName: content + summary: Specifies the comment's content as plain text. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'content?: string;' + return: + type: string + - name: contentRange + uid: 'word!Word.Interfaces.CommentUpdateData#contentRange:member' + package: word! + fullName: contentRange + summary: Specifies the comment's content range. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'contentRange?: Word.Interfaces.CommentContentRangeUpdateData;' + return: + type: '' + - name: resolved + uid: 'word!Word.Interfaces.CommentUpdateData#resolved:member' + package: word! + fullName: resolved + summary: >- + Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means + that the comment thread is resolved. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'resolved?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrolcollectiondata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrolcollectiondata.yml new file mode 100644 index 0000000000..b574dc67a0 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrolcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlCollectionData +uid: 'word!Word.Interfaces.ContentControlCollectionData:interface' +package: word! +fullName: Word.Interfaces.ContentControlCollectionData +summary: An interface describing the data returned by calling `contentControlCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrolcollectionloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrolcollectionloadoptions.yml new file mode 100644 index 0000000000..91ad1b9984 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrolcollectionloadoptions.yml @@ -0,0 +1,354 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlCollectionLoadOptions +uid: 'word!Word.Interfaces.ContentControlCollectionLoadOptions:interface' +package: word! +fullName: Word.Interfaces.ContentControlCollectionLoadOptions +summary: >- + Contains a collection of [Word.ContentControl](xref:word!Word.ContentControl:class) objects. Content controls are + bounded and potentially labeled regions in a document that serve as containers for specific types of content. + Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, + only rich text and plain text content controls are supported. +remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.ContentControlCollectionLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: appearance + uid: 'word!Word.Interfaces.ContentControlCollectionLoadOptions#appearance:member' + package: word! + fullName: appearance + summary: >- + For EACH ITEM in the collection: Specifies the appearance of the content control. The value can be 'BoundingBox', + 'Tags', or 'Hidden'. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'appearance?: boolean;' + return: + type: boolean + - name: cannotDelete + uid: 'word!Word.Interfaces.ContentControlCollectionLoadOptions#cannotDelete:member' + package: word! + fullName: cannotDelete + summary: >- + For EACH ITEM in the collection: Specifies a value that indicates whether the user can delete the content control. + Mutually exclusive with removeWhenEdited. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'cannotDelete?: boolean;' + return: + type: boolean + - name: cannotEdit + uid: 'word!Word.Interfaces.ContentControlCollectionLoadOptions#cannotEdit:member' + package: word! + fullName: cannotEdit + summary: >- + For EACH ITEM in the collection: Specifies a value that indicates whether the user can edit the contents of the + content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'cannotEdit?: boolean;' + return: + type: boolean + - name: checkboxContentControl + uid: 'word!Word.Interfaces.ContentControlCollectionLoadOptions#checkboxContentControl:member' + package: word! + fullName: checkboxContentControl + summary: >- + For EACH ITEM in the collection: Gets the data of the content control when its type is 'CheckBox'. It's `null` + otherwise. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'checkboxContentControl?: Word.Interfaces.CheckboxContentControlLoadOptions;' + return: + type: '' + - name: color + uid: 'word!Word.Interfaces.ContentControlCollectionLoadOptions#color:member' + package: word! + fullName: color + summary: >- + For EACH ITEM in the collection: Specifies the color of the content control. Color is specified in '\#RRGGBB' + format or by using the color name. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'color?: boolean;' + return: + type: boolean + - name: font + uid: 'word!Word.Interfaces.ContentControlCollectionLoadOptions#font:member' + package: word! + fullName: font + summary: >- + For EACH ITEM in the collection: Gets the text format of the content control. Use this to get and set font name, + size, color, and other properties. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontLoadOptions;' + return: + type: '' + - name: id + uid: 'word!Word.Interfaces.ContentControlCollectionLoadOptions#id:member' + package: word! + fullName: id + summary: 'For EACH ITEM in the collection: Gets an integer that represents the content control identifier.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'id?: boolean;' + return: + type: boolean + - name: parentBody + uid: 'word!Word.Interfaces.ContentControlCollectionLoadOptions#parentBody:member' + package: word! + fullName: parentBody + summary: 'For EACH ITEM in the collection: Gets the parent body of the content control.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentBody?: Word.Interfaces.BodyLoadOptions;' + return: + type: '' + - name: parentContentControl + uid: 'word!Word.Interfaces.ContentControlCollectionLoadOptions#parentContentControl:member' + package: word! + fullName: parentContentControl + summary: >- + For EACH ITEM in the collection: Gets the content control that contains the content control. Throws an + `ItemNotFound` error if there isn't a parent content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControl?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentContentControlOrNullObject + uid: 'word!Word.Interfaces.ContentControlCollectionLoadOptions#parentContentControlOrNullObject:member' + package: word! + fullName: parentContentControlOrNullObject + summary: >- + For EACH ITEM in the collection: Gets the content control that contains the content control. If there isn't a + parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentTable + uid: 'word!Word.Interfaces.ContentControlCollectionLoadOptions#parentTable:member' + package: word! + fullName: parentTable + summary: >- + For EACH ITEM in the collection: Gets the table that contains the content control. Throws an `ItemNotFound` error + if it isn't contained in a table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTable?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: parentTableCell + uid: 'word!Word.Interfaces.ContentControlCollectionLoadOptions#parentTableCell:member' + package: word! + fullName: parentTableCell + summary: >- + For EACH ITEM in the collection: Gets the table cell that contains the content control. Throws an `ItemNotFound` + error if it isn't contained in a table cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableCell?: Word.Interfaces.TableCellLoadOptions;' + return: + type: '' + - name: parentTableCellOrNullObject + uid: 'word!Word.Interfaces.ContentControlCollectionLoadOptions#parentTableCellOrNullObject:member' + package: word! + fullName: parentTableCellOrNullObject + summary: >- + For EACH ITEM in the collection: Gets the table cell that contains the content control. If it isn't contained in a + table cell, then this method will return an object with its `isNullObject` property set to `true`. For + further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions;' + return: + type: '' + - name: parentTableOrNullObject + uid: 'word!Word.Interfaces.ContentControlCollectionLoadOptions#parentTableOrNullObject:member' + package: word! + fullName: parentTableOrNullObject + summary: >- + For EACH ITEM in the collection: Gets the table that contains the content control. If it isn't contained in a + table, then this method will return an object with its `isNullObject` property set to `true`. For further + information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableOrNullObject?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: placeholderText + uid: 'word!Word.Interfaces.ContentControlCollectionLoadOptions#placeholderText:member' + package: word! + fullName: placeholderText + summary: >- + For EACH ITEM in the collection: Specifies the placeholder text of the content control. Dimmed text will be + displayed when the content control is empty. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'placeholderText?: boolean;' + return: + type: boolean + - name: removeWhenEdited + uid: 'word!Word.Interfaces.ContentControlCollectionLoadOptions#removeWhenEdited:member' + package: word! + fullName: removeWhenEdited + summary: >- + For EACH ITEM in the collection: Specifies a value that indicates whether the content control is removed after it + is edited. Mutually exclusive with cannotDelete. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'removeWhenEdited?: boolean;' + return: + type: boolean + - name: style + uid: 'word!Word.Interfaces.ContentControlCollectionLoadOptions#style:member' + package: word! + fullName: style + summary: >- + For EACH ITEM in the collection: Specifies the style name for the content control. Use this property for custom + styles and localized style names. To use the built-in styles that are portable between locales, see the + "styleBuiltIn" property. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'style?: boolean;' + return: + type: boolean + - name: styleBuiltIn + uid: 'word!Word.Interfaces.ContentControlCollectionLoadOptions#styleBuiltIn:member' + package: word! + fullName: styleBuiltIn + summary: >- + For EACH ITEM in the collection: Specifies the built-in style name for the content control. Use this property for + built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" + property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleBuiltIn?: boolean;' + return: + type: boolean + - name: subtype + uid: 'word!Word.Interfaces.ContentControlCollectionLoadOptions#subtype:member' + package: word! + fullName: subtype + summary: >- + For EACH ITEM in the collection: Gets the content control subtype. The subtype can be 'RichTextInline', + 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, + or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content + controls. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'subtype?: boolean;' + return: + type: boolean + - name: tag + uid: 'word!Word.Interfaces.ContentControlCollectionLoadOptions#tag:member' + package: word! + fullName: tag + summary: 'For EACH ITEM in the collection: Specifies a tag to identify a content control.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'tag?: boolean;' + return: + type: boolean + - name: text + uid: 'word!Word.Interfaces.ContentControlCollectionLoadOptions#text:member' + package: word! + fullName: text + summary: 'For EACH ITEM in the collection: Gets the text of the content control.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'text?: boolean;' + return: + type: boolean + - name: title + uid: 'word!Word.Interfaces.ContentControlCollectionLoadOptions#title:member' + package: word! + fullName: title + summary: 'For EACH ITEM in the collection: Specifies the title for a content control.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'title?: boolean;' + return: + type: boolean + - name: type + uid: 'word!Word.Interfaces.ContentControlCollectionLoadOptions#type:member' + package: word! + fullName: type + summary: >- + For EACH ITEM in the collection: Gets the content control type. Only rich text, plain text, and checkbox content + controls are supported currently. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrolcollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrolcollectionupdatedata.yml new file mode 100644 index 0000000000..10314e36a8 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrolcollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlCollectionUpdateData +uid: 'word!Word.Interfaces.ContentControlCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlCollectionUpdateData +summary: >- + An interface for updating data on the `ContentControlCollection` object, for use in `contentControlCollection.set({ + ... })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontroldata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontroldata.yml new file mode 100644 index 0000000000..c0549d0c74 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontroldata.yml @@ -0,0 +1,398 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlData +uid: 'word!Word.Interfaces.ContentControlData:interface' +package: word! +fullName: Word.Interfaces.ContentControlData +summary: An interface describing the data returned by calling `contentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: appearance + uid: 'word!Word.Interfaces.ContentControlData#appearance:member' + package: word! + fullName: appearance + summary: 'Specifies the appearance of the content control. The value can be ''BoundingBox'', ''Tags'', or ''Hidden''.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'appearance?: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden";' + return: + type: ' | "BoundingBox" | "Tags" | "Hidden"' + - name: cannotDelete + uid: 'word!Word.Interfaces.ContentControlData#cannotDelete:member' + package: word! + fullName: cannotDelete + summary: >- + Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with + removeWhenEdited. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'cannotDelete?: boolean;' + return: + type: boolean + - name: cannotEdit + uid: 'word!Word.Interfaces.ContentControlData#cannotEdit:member' + package: word! + fullName: cannotEdit + summary: Specifies a value that indicates whether the user can edit the contents of the content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'cannotEdit?: boolean;' + return: + type: boolean + - name: checkboxContentControl + uid: 'word!Word.Interfaces.ContentControlData#checkboxContentControl:member' + package: word! + fullName: checkboxContentControl + summary: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'checkboxContentControl?: Word.Interfaces.CheckboxContentControlData;' + return: + type: '' + - name: color + uid: 'word!Word.Interfaces.ContentControlData#color:member' + package: word! + fullName: color + summary: 'Specifies the color of the content control. Color is specified in ''\#RRGGBB'' format or by using the color name.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'color?: string;' + return: + type: string + - name: comboBoxContentControl + uid: 'word!Word.Interfaces.ContentControlData#comboBoxContentControl:member' + package: word! + fullName: comboBoxContentControl + summary: Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'comboBoxContentControl?: Word.Interfaces.ComboBoxContentControlData;' + return: + type: '' + - name: contentControls + uid: 'word!Word.Interfaces.ContentControlData#contentControls:member' + package: word! + fullName: contentControls + summary: Gets the collection of content control objects in the content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'contentControls?: Word.Interfaces.ContentControlData[];' + return: + type: '[]' + - name: dropDownListContentControl + uid: 'word!Word.Interfaces.ContentControlData#dropDownListContentControl:member' + package: word! + fullName: dropDownListContentControl + summary: Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'dropDownListContentControl?: Word.Interfaces.DropDownListContentControlData;' + return: + type: '' + - name: fields + uid: 'word!Word.Interfaces.ContentControlData#fields:member' + package: word! + fullName: fields + summary: Gets the collection of field objects in the content control. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'fields?: Word.Interfaces.FieldData[];' + return: + type: '[]' + - name: font + uid: 'word!Word.Interfaces.ContentControlData#font:member' + package: word! + fullName: font + summary: 'Gets the text format of the content control. Use this to get and set font name, size, color, and other properties.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontData;' + return: + type: '' + - name: id + uid: 'word!Word.Interfaces.ContentControlData#id:member' + package: word! + fullName: id + summary: Gets an integer that represents the content control identifier. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'id?: number;' + return: + type: number + - name: inlinePictures + uid: 'word!Word.Interfaces.ContentControlData#inlinePictures:member' + package: word! + fullName: inlinePictures + summary: >- + Gets the collection of InlinePicture objects in the content control. The collection doesn't include floating + images. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'inlinePictures?: Word.Interfaces.InlinePictureData[];' + return: + type: '[]' + - name: lists + uid: 'word!Word.Interfaces.ContentControlData#lists:member' + package: word! + fullName: lists + summary: Gets the collection of list objects in the content control. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lists?: Word.Interfaces.ListData[];' + return: + type: '[]' + - name: paragraphs + uid: 'word!Word.Interfaces.ContentControlData#paragraphs:member' + package: word! + fullName: paragraphs + summary: Gets the collection of paragraph objects in the content control. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Important: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this content control + aren't returned. From requirement set 1.3, paragraphs in such tables are also returned. + isPreview: false + isDeprecated: false + syntax: + content: 'paragraphs?: Word.Interfaces.ParagraphData[];' + return: + type: '[]' + - name: placeholderText + uid: 'word!Word.Interfaces.ContentControlData#placeholderText:member' + package: word! + fullName: placeholderText + summary: >- + Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is + empty. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'placeholderText?: string;' + return: + type: string + - name: removeWhenEdited + uid: 'word!Word.Interfaces.ContentControlData#removeWhenEdited:member' + package: word! + fullName: removeWhenEdited + summary: >- + Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive + with cannotDelete. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'removeWhenEdited?: boolean;' + return: + type: boolean + - name: style + uid: 'word!Word.Interfaces.ContentControlData#style:member' + package: word! + fullName: style + summary: >- + Specifies the style name for the content control. Use this property for custom styles and localized style names. + To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'style?: string;' + return: + type: string + - name: styleBuiltIn + uid: 'word!Word.Interfaces.ContentControlData#styleBuiltIn:member' + package: word! + fullName: styleBuiltIn + summary: >- + Specifies the built-in style name for the content control. Use this property for built-in styles that are portable + between locales. To use custom styles or localized style names, see the "style" property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | + "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | + "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | + "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | + "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | + "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | + "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" + | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" + | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" + | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | + "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" + | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | + "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | + "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | + "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | + "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" + | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | + "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | + "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | + "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | + "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | + "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | + "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | + "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + return: + type: >- + | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | + "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | + "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | + "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | + "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | + "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | + "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | + "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | + "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | + "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | + "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | + "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | + "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" + | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" + | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | + "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | + "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | + "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | + "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | + "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | + "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | + "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | + "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | + "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | + "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6" + - name: subtype + uid: 'word!Word.Interfaces.ContentControlData#subtype:member' + package: word! + fullName: subtype + summary: >- + Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', + 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and + 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + subtype?: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | + "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | + "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | + "RichText" | "PlainText"; + return: + type: >- + | "Unknown" | "RichTextInline" | "RichTextParagraphs" | + "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | + "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | + "RepeatingSection" | "RichText" | "PlainText" + - name: tables + uid: 'word!Word.Interfaces.ContentControlData#tables:member' + package: word! + fullName: tables + summary: Gets the collection of table objects in the content control. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'tables?: Word.Interfaces.TableData[];' + return: + type: '[]' + - name: tag + uid: 'word!Word.Interfaces.ContentControlData#tag:member' + package: word! + fullName: tag + summary: Specifies a tag to identify a content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'tag?: string;' + return: + type: string + - name: text + uid: 'word!Word.Interfaces.ContentControlData#text:member' + package: word! + fullName: text + summary: Gets the text of the content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'text?: string;' + return: + type: string + - name: title + uid: 'word!Word.Interfaces.ContentControlData#title:member' + package: word! + fullName: title + summary: Specifies the title for a content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'title?: string;' + return: + type: string + - name: type + uid: 'word!Word.Interfaces.ContentControlData#type:member' + package: word! + fullName: type + summary: 'Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + type?: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | + "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | + "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | + "RichText" | "PlainText"; + return: + type: >- + | "Unknown" | "RichTextInline" | "RichTextParagraphs" | + "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | + "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | + "RepeatingSection" | "RichText" | "PlainText" diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrollistitemcollectiondata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrollistitemcollectiondata.yml new file mode 100644 index 0000000000..75af720340 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrollistitemcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionData +summary: An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrollistitemcollectionloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrollistitemcollectionloadoptions.yml new file mode 100644 index 0000000000..007570b4e8 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrollistitemcollectionloadoptions.yml @@ -0,0 +1,69 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionLoadOptions +uid: 'word!Word.Interfaces.ContentControlListItemCollectionLoadOptions:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionLoadOptions +summary: >- + Contains a collection of [Word.ContentControlListItem](xref:word!Word.ContentControlListItem:class) objects that + represent the items in a dropdown list or combo box content control. +remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.ContentControlListItemCollectionLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: displayText + uid: 'word!Word.Interfaces.ContentControlListItemCollectionLoadOptions#displayText:member' + package: word! + fullName: displayText + summary: >- + For EACH ITEM in the collection: Specifies the display text of a list item for a dropdown list or combo box + content control. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'displayText?: boolean;' + return: + type: boolean + - name: index + uid: 'word!Word.Interfaces.ContentControlListItemCollectionLoadOptions#index:member' + package: word! + fullName: index + summary: >- + For EACH ITEM in the collection: Specifies the index location of a content control list item in the collection of + list items. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'index?: boolean;' + return: + type: boolean + - name: value + uid: 'word!Word.Interfaces.ContentControlListItemCollectionLoadOptions#value:member' + package: word! + fullName: value + summary: >- + For EACH ITEM in the collection: Specifies the programmatic value of a list item for a dropdown list or combo box + content control. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'value?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml new file mode 100644 index 0000000000..e22526b0d5 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionUpdateData +summary: >- + An interface for updating data on the `ContentControlListItemCollection` object, for use in + `contentControlListItemCollection.set({ ... })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrollistitemdata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrollistitemdata.yml new file mode 100644 index 0000000000..69ef8934f1 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrollistitemdata.yml @@ -0,0 +1,47 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemData +uid: 'word!Word.Interfaces.ContentControlListItemData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemData +summary: An interface describing the data returned by calling `contentControlListItem.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: displayText + uid: 'word!Word.Interfaces.ContentControlListItemData#displayText:member' + package: word! + fullName: displayText + summary: Specifies the display text of a list item for a dropdown list or combo box content control. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'displayText?: string;' + return: + type: string + - name: index + uid: 'word!Word.Interfaces.ContentControlListItemData#index:member' + package: word! + fullName: index + summary: Specifies the index location of a content control list item in the collection of list items. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'index?: number;' + return: + type: number + - name: value + uid: 'word!Word.Interfaces.ContentControlListItemData#value:member' + package: word! + fullName: value + summary: Specifies the programmatic value of a list item for a dropdown list or combo box content control. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'value?: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrollistitemloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrollistitemloadoptions.yml new file mode 100644 index 0000000000..3961f99bcc --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrollistitemloadoptions.yml @@ -0,0 +1,61 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemLoadOptions +uid: 'word!Word.Interfaces.ContentControlListItemLoadOptions:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemLoadOptions +summary: Represents a list item in a dropdown list or combo box content control. +remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.ContentControlListItemLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: displayText + uid: 'word!Word.Interfaces.ContentControlListItemLoadOptions#displayText:member' + package: word! + fullName: displayText + summary: Specifies the display text of a list item for a dropdown list or combo box content control. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'displayText?: boolean;' + return: + type: boolean + - name: index + uid: 'word!Word.Interfaces.ContentControlListItemLoadOptions#index:member' + package: word! + fullName: index + summary: Specifies the index location of a content control list item in the collection of list items. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'index?: boolean;' + return: + type: boolean + - name: value + uid: 'word!Word.Interfaces.ContentControlListItemLoadOptions#value:member' + package: word! + fullName: value + summary: Specifies the programmatic value of a list item for a dropdown list or combo box content control. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'value?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrollistitemupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrollistitemupdatedata.yml new file mode 100644 index 0000000000..278599b7da --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrollistitemupdatedata.yml @@ -0,0 +1,49 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemUpdateData +summary: >- + An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... + })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: displayText + uid: 'word!Word.Interfaces.ContentControlListItemUpdateData#displayText:member' + package: word! + fullName: displayText + summary: Specifies the display text of a list item for a dropdown list or combo box content control. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'displayText?: string;' + return: + type: string + - name: index + uid: 'word!Word.Interfaces.ContentControlListItemUpdateData#index:member' + package: word! + fullName: index + summary: Specifies the index location of a content control list item in the collection of list items. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'index?: number;' + return: + type: number + - name: value + uid: 'word!Word.Interfaces.ContentControlListItemUpdateData#value:member' + package: word! + fullName: value + summary: Specifies the programmatic value of a list item for a dropdown list or combo box content control. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'value?: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrolloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrolloadoptions.yml new file mode 100644 index 0000000000..2b497a9074 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrolloadoptions.yml @@ -0,0 +1,336 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlLoadOptions +uid: 'word!Word.Interfaces.ContentControlLoadOptions:interface' +package: word! +fullName: Word.Interfaces.ContentControlLoadOptions +summary: >- + Represents a content control. Content controls are bounded and potentially labeled regions in a document that serve as + containers for specific types of content. Individual content controls may contain contents such as images, tables, or + paragraphs of formatted text. Currently, only rich text, plain text, and checkbox content controls are supported. +remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.ContentControlLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: appearance + uid: 'word!Word.Interfaces.ContentControlLoadOptions#appearance:member' + package: word! + fullName: appearance + summary: 'Specifies the appearance of the content control. The value can be ''BoundingBox'', ''Tags'', or ''Hidden''.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'appearance?: boolean;' + return: + type: boolean + - name: cannotDelete + uid: 'word!Word.Interfaces.ContentControlLoadOptions#cannotDelete:member' + package: word! + fullName: cannotDelete + summary: >- + Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with + removeWhenEdited. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'cannotDelete?: boolean;' + return: + type: boolean + - name: cannotEdit + uid: 'word!Word.Interfaces.ContentControlLoadOptions#cannotEdit:member' + package: word! + fullName: cannotEdit + summary: Specifies a value that indicates whether the user can edit the contents of the content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'cannotEdit?: boolean;' + return: + type: boolean + - name: checkboxContentControl + uid: 'word!Word.Interfaces.ContentControlLoadOptions#checkboxContentControl:member' + package: word! + fullName: checkboxContentControl + summary: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'checkboxContentControl?: Word.Interfaces.CheckboxContentControlLoadOptions;' + return: + type: '' + - name: color + uid: 'word!Word.Interfaces.ContentControlLoadOptions#color:member' + package: word! + fullName: color + summary: 'Specifies the color of the content control. Color is specified in ''\#RRGGBB'' format or by using the color name.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'color?: boolean;' + return: + type: boolean + - name: font + uid: 'word!Word.Interfaces.ContentControlLoadOptions#font:member' + package: word! + fullName: font + summary: 'Gets the text format of the content control. Use this to get and set font name, size, color, and other properties.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontLoadOptions;' + return: + type: '' + - name: id + uid: 'word!Word.Interfaces.ContentControlLoadOptions#id:member' + package: word! + fullName: id + summary: Gets an integer that represents the content control identifier. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'id?: boolean;' + return: + type: boolean + - name: parentBody + uid: 'word!Word.Interfaces.ContentControlLoadOptions#parentBody:member' + package: word! + fullName: parentBody + summary: Gets the parent body of the content control. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentBody?: Word.Interfaces.BodyLoadOptions;' + return: + type: '' + - name: parentContentControl + uid: 'word!Word.Interfaces.ContentControlLoadOptions#parentContentControl:member' + package: word! + fullName: parentContentControl + summary: >- + Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent + content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControl?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentContentControlOrNullObject + uid: 'word!Word.Interfaces.ContentControlLoadOptions#parentContentControlOrNullObject:member' + package: word! + fullName: parentContentControlOrNullObject + summary: >- + Gets the content control that contains the content control. If there isn't a parent content control, then this + method will return an object with its `isNullObject` property set to `true`. For further information, see + [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentTable + uid: 'word!Word.Interfaces.ContentControlLoadOptions#parentTable:member' + package: word! + fullName: parentTable + summary: Gets the table that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTable?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: parentTableCell + uid: 'word!Word.Interfaces.ContentControlLoadOptions#parentTableCell:member' + package: word! + fullName: parentTableCell + summary: >- + Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a + table cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableCell?: Word.Interfaces.TableCellLoadOptions;' + return: + type: '' + - name: parentTableCellOrNullObject + uid: 'word!Word.Interfaces.ContentControlLoadOptions#parentTableCellOrNullObject:member' + package: word! + fullName: parentTableCellOrNullObject + summary: >- + Gets the table cell that contains the content control. If it isn't contained in a table cell, then this method + will return an object with its `isNullObject` property set to `true`. For further information, see + [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions;' + return: + type: '' + - name: parentTableOrNullObject + uid: 'word!Word.Interfaces.ContentControlLoadOptions#parentTableOrNullObject:member' + package: word! + fullName: parentTableOrNullObject + summary: >- + Gets the table that contains the content control. If it isn't contained in a table, then this method will return + an object with its `isNullObject` property set to `true`. For further information, see [*OrNullObject + methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableOrNullObject?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: placeholderText + uid: 'word!Word.Interfaces.ContentControlLoadOptions#placeholderText:member' + package: word! + fullName: placeholderText + summary: >- + Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is + empty. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'placeholderText?: boolean;' + return: + type: boolean + - name: removeWhenEdited + uid: 'word!Word.Interfaces.ContentControlLoadOptions#removeWhenEdited:member' + package: word! + fullName: removeWhenEdited + summary: >- + Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive + with cannotDelete. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'removeWhenEdited?: boolean;' + return: + type: boolean + - name: style + uid: 'word!Word.Interfaces.ContentControlLoadOptions#style:member' + package: word! + fullName: style + summary: >- + Specifies the style name for the content control. Use this property for custom styles and localized style names. + To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'style?: boolean;' + return: + type: boolean + - name: styleBuiltIn + uid: 'word!Word.Interfaces.ContentControlLoadOptions#styleBuiltIn:member' + package: word! + fullName: styleBuiltIn + summary: >- + Specifies the built-in style name for the content control. Use this property for built-in styles that are portable + between locales. To use custom styles or localized style names, see the "style" property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleBuiltIn?: boolean;' + return: + type: boolean + - name: subtype + uid: 'word!Word.Interfaces.ContentControlLoadOptions#subtype:member' + package: word! + fullName: subtype + summary: >- + Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', + 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and + 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'subtype?: boolean;' + return: + type: boolean + - name: tag + uid: 'word!Word.Interfaces.ContentControlLoadOptions#tag:member' + package: word! + fullName: tag + summary: Specifies a tag to identify a content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'tag?: boolean;' + return: + type: boolean + - name: text + uid: 'word!Word.Interfaces.ContentControlLoadOptions#text:member' + package: word! + fullName: text + summary: Gets the text of the content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'text?: boolean;' + return: + type: boolean + - name: title + uid: 'word!Word.Interfaces.ContentControlLoadOptions#title:member' + package: word! + fullName: title + summary: Specifies the title for a content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'title?: boolean;' + return: + type: boolean + - name: type + uid: 'word!Word.Interfaces.ContentControlLoadOptions#type:member' + package: word! + fullName: type + summary: 'Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrolupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrolupdatedata.yml new file mode 100644 index 0000000000..001ea1bf3d --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.contentcontrolupdatedata.yml @@ -0,0 +1,228 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlUpdateData +uid: 'word!Word.Interfaces.ContentControlUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlUpdateData +summary: 'An interface for updating data on the `ContentControl` object, for use in `contentControl.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: appearance + uid: 'word!Word.Interfaces.ContentControlUpdateData#appearance:member' + package: word! + fullName: appearance + summary: 'Specifies the appearance of the content control. The value can be ''BoundingBox'', ''Tags'', or ''Hidden''.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'appearance?: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden";' + return: + type: ' | "BoundingBox" | "Tags" | "Hidden"' + - name: cannotDelete + uid: 'word!Word.Interfaces.ContentControlUpdateData#cannotDelete:member' + package: word! + fullName: cannotDelete + summary: >- + Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with + removeWhenEdited. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'cannotDelete?: boolean;' + return: + type: boolean + - name: cannotEdit + uid: 'word!Word.Interfaces.ContentControlUpdateData#cannotEdit:member' + package: word! + fullName: cannotEdit + summary: Specifies a value that indicates whether the user can edit the contents of the content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'cannotEdit?: boolean;' + return: + type: boolean + - name: checkboxContentControl + uid: 'word!Word.Interfaces.ContentControlUpdateData#checkboxContentControl:member' + package: word! + fullName: checkboxContentControl + summary: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'checkboxContentControl?: Word.Interfaces.CheckboxContentControlUpdateData;' + return: + type: '' + - name: color + uid: 'word!Word.Interfaces.ContentControlUpdateData#color:member' + package: word! + fullName: color + summary: 'Specifies the color of the content control. Color is specified in ''\#RRGGBB'' format or by using the color name.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'color?: string;' + return: + type: string + - name: font + uid: 'word!Word.Interfaces.ContentControlUpdateData#font:member' + package: word! + fullName: font + summary: 'Gets the text format of the content control. Use this to get and set font name, size, color, and other properties.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontUpdateData;' + return: + type: '' + - name: placeholderText + uid: 'word!Word.Interfaces.ContentControlUpdateData#placeholderText:member' + package: word! + fullName: placeholderText + summary: >- + Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is + empty. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'placeholderText?: string;' + return: + type: string + - name: removeWhenEdited + uid: 'word!Word.Interfaces.ContentControlUpdateData#removeWhenEdited:member' + package: word! + fullName: removeWhenEdited + summary: >- + Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive + with cannotDelete. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'removeWhenEdited?: boolean;' + return: + type: boolean + - name: style + uid: 'word!Word.Interfaces.ContentControlUpdateData#style:member' + package: word! + fullName: style + summary: >- + Specifies the style name for the content control. Use this property for custom styles and localized style names. + To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'style?: string;' + return: + type: string + - name: styleBuiltIn + uid: 'word!Word.Interfaces.ContentControlUpdateData#styleBuiltIn:member' + package: word! + fullName: styleBuiltIn + summary: >- + Specifies the built-in style name for the content control. Use this property for built-in styles that are portable + between locales. To use custom styles or localized style names, see the "style" property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | + "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | + "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | + "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | + "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | + "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | + "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" + | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" + | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" + | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | + "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" + | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | + "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | + "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | + "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | + "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" + | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | + "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | + "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | + "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | + "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | + "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | + "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | + "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + return: + type: >- + | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | + "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | + "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | + "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | + "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | + "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | + "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | + "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | + "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | + "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | + "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | + "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | + "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" + | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" + | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | + "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | + "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | + "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | + "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | + "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | + "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | + "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | + "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | + "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | + "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6" + - name: tag + uid: 'word!Word.Interfaces.ContentControlUpdateData#tag:member' + package: word! + fullName: tag + summary: Specifies a tag to identify a content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'tag?: string;' + return: + type: string + - name: title + uid: 'word!Word.Interfaces.ContentControlUpdateData#title:member' + package: word! + fullName: title + summary: Specifies the title for a content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'title?: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.critiqueannotationdata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.critiqueannotationdata.yml new file mode 100644 index 0000000000..ebda53f66d --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.critiqueannotationdata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.CritiqueAnnotationData +uid: 'word!Word.Interfaces.CritiqueAnnotationData:interface' +package: word! +fullName: Word.Interfaces.CritiqueAnnotationData +summary: An interface describing the data returned by calling `critiqueAnnotation.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: critique + uid: 'word!Word.Interfaces.CritiqueAnnotationData#critique:member' + package: word! + fullName: critique + summary: Gets the critique that was passed when the annotation was inserted. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'critique?: Word.Critique;' + return: + type: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.critiqueannotationloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.critiqueannotationloadoptions.yml new file mode 100644 index 0000000000..21e17aa474 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.critiqueannotationloadoptions.yml @@ -0,0 +1,49 @@ +### YamlMime:TSType +name: Word.Interfaces.CritiqueAnnotationLoadOptions +uid: 'word!Word.Interfaces.CritiqueAnnotationLoadOptions:interface' +package: word! +fullName: Word.Interfaces.CritiqueAnnotationLoadOptions +summary: Represents an annotation wrapper around critique displayed in the document. +remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.CritiqueAnnotationLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: critique + uid: 'word!Word.Interfaces.CritiqueAnnotationLoadOptions#critique:member' + package: word! + fullName: critique + summary: Gets the critique that was passed when the annotation was inserted. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'critique?: boolean;' + return: + type: boolean + - name: range + uid: 'word!Word.Interfaces.CritiqueAnnotationLoadOptions#range:member' + package: word! + fullName: range + summary: Gets the range of text that is annotated. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'range?: Word.Interfaces.RangeLoadOptions;' + return: + type: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.custompropertycollectiondata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.custompropertycollectiondata.yml new file mode 100644 index 0000000000..8a329b951d --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.custompropertycollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.CustomPropertyCollectionData +uid: 'word!Word.Interfaces.CustomPropertyCollectionData:interface' +package: word! +fullName: Word.Interfaces.CustomPropertyCollectionData +summary: An interface describing the data returned by calling `customPropertyCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.CustomPropertyCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.CustomPropertyData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.custompropertycollectionloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.custompropertycollectionloadoptions.yml new file mode 100644 index 0000000000..02c841c867 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.custompropertycollectionloadoptions.yml @@ -0,0 +1,66 @@ +### YamlMime:TSType +name: Word.Interfaces.CustomPropertyCollectionLoadOptions +uid: 'word!Word.Interfaces.CustomPropertyCollectionLoadOptions:interface' +package: word! +fullName: Word.Interfaces.CustomPropertyCollectionLoadOptions +summary: 'Contains the collection of [Word.CustomProperty](xref:word!Word.CustomProperty:class) objects.' +remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.CustomPropertyCollectionLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: key + uid: 'word!Word.Interfaces.CustomPropertyCollectionLoadOptions#key:member' + package: word! + fullName: key + summary: 'For EACH ITEM in the collection: Gets the key of the custom property.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'key?: boolean;' + return: + type: boolean + - name: type + uid: 'word!Word.Interfaces.CustomPropertyCollectionLoadOptions#type:member' + package: word! + fullName: type + summary: >- + For EACH ITEM in the collection: Gets the value type of the custom property. Possible values are: String, Number, + Date, Boolean. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type?: boolean;' + return: + type: boolean + - name: value + uid: 'word!Word.Interfaces.CustomPropertyCollectionLoadOptions#value:member' + package: word! + fullName: value + summary: >- + For EACH ITEM in the collection: Specifies the value of the custom property. Note that even though Word on the web + and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate + string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'value?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.custompropertycollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.custompropertycollectionupdatedata.yml new file mode 100644 index 0000000000..48bf62512a --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.custompropertycollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.CustomPropertyCollectionUpdateData +uid: 'word!Word.Interfaces.CustomPropertyCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.CustomPropertyCollectionUpdateData +summary: >- + An interface for updating data on the `CustomPropertyCollection` object, for use in `customPropertyCollection.set({ + ... })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.CustomPropertyCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.CustomPropertyData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.custompropertydata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.custompropertydata.yml new file mode 100644 index 0000000000..9320984135 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.custompropertydata.yml @@ -0,0 +1,50 @@ +### YamlMime:TSType +name: Word.Interfaces.CustomPropertyData +uid: 'word!Word.Interfaces.CustomPropertyData:interface' +package: word! +fullName: Word.Interfaces.CustomPropertyData +summary: An interface describing the data returned by calling `customProperty.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: key + uid: 'word!Word.Interfaces.CustomPropertyData#key:member' + package: word! + fullName: key + summary: Gets the key of the custom property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'key?: string;' + return: + type: string + - name: type + uid: 'word!Word.Interfaces.CustomPropertyData#type:member' + package: word! + fullName: type + summary: 'Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type?: Word.DocumentPropertyType | "String" | "Number" | "Date" | "Boolean";' + return: + type: ' | "String" | "Number" | "Date" | "Boolean"' + - name: value + uid: 'word!Word.Interfaces.CustomPropertyData#value:member' + package: word! + fullName: value + summary: >- + Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow + these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit + chars (possibly creating invalid unicode by breaking up a surrogate pair). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'value?: any;' + return: + type: any diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.custompropertyloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.custompropertyloadoptions.yml new file mode 100644 index 0000000000..3790a4d959 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.custompropertyloadoptions.yml @@ -0,0 +1,64 @@ +### YamlMime:TSType +name: Word.Interfaces.CustomPropertyLoadOptions +uid: 'word!Word.Interfaces.CustomPropertyLoadOptions:interface' +package: word! +fullName: Word.Interfaces.CustomPropertyLoadOptions +summary: Represents a custom property. +remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.CustomPropertyLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: key + uid: 'word!Word.Interfaces.CustomPropertyLoadOptions#key:member' + package: word! + fullName: key + summary: Gets the key of the custom property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'key?: boolean;' + return: + type: boolean + - name: type + uid: 'word!Word.Interfaces.CustomPropertyLoadOptions#type:member' + package: word! + fullName: type + summary: 'Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type?: boolean;' + return: + type: boolean + - name: value + uid: 'word!Word.Interfaces.CustomPropertyLoadOptions#value:member' + package: word! + fullName: value + summary: >- + Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow + these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit + chars (possibly creating invalid unicode by breaking up a surrogate pair). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'value?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.custompropertyupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.custompropertyupdatedata.yml new file mode 100644 index 0000000000..c16ea42a8e --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.custompropertyupdatedata.yml @@ -0,0 +1,26 @@ +### YamlMime:TSType +name: Word.Interfaces.CustomPropertyUpdateData +uid: 'word!Word.Interfaces.CustomPropertyUpdateData:interface' +package: word! +fullName: Word.Interfaces.CustomPropertyUpdateData +summary: 'An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: value + uid: 'word!Word.Interfaces.CustomPropertyUpdateData#value:member' + package: word! + fullName: value + summary: >- + Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow + these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit + chars (possibly creating invalid unicode by breaking up a surrogate pair). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'value?: any;' + return: + type: any diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartcollectiondata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartcollectiondata.yml new file mode 100644 index 0000000000..1b1ed79ac7 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.CustomXmlPartCollectionData +uid: 'word!Word.Interfaces.CustomXmlPartCollectionData:interface' +package: word! +fullName: Word.Interfaces.CustomXmlPartCollectionData +summary: An interface describing the data returned by calling `customXmlPartCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.CustomXmlPartCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.CustomXmlPartData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartcollectionloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartcollectionloadoptions.yml new file mode 100644 index 0000000000..776b1027c2 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartcollectionloadoptions.yml @@ -0,0 +1,49 @@ +### YamlMime:TSType +name: Word.Interfaces.CustomXmlPartCollectionLoadOptions +uid: 'word!Word.Interfaces.CustomXmlPartCollectionLoadOptions:interface' +package: word! +fullName: Word.Interfaces.CustomXmlPartCollectionLoadOptions +summary: 'Contains the collection of [Word.CustomXmlPart](xref:word!Word.CustomXmlPart:class) objects.' +remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.CustomXmlPartCollectionLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: id + uid: 'word!Word.Interfaces.CustomXmlPartCollectionLoadOptions#id:member' + package: word! + fullName: id + summary: 'For EACH ITEM in the collection: Gets the ID of the custom XML part.' + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'id?: boolean;' + return: + type: boolean + - name: namespaceUri + uid: 'word!Word.Interfaces.CustomXmlPartCollectionLoadOptions#namespaceUri:member' + package: word! + fullName: namespaceUri + summary: 'For EACH ITEM in the collection: Gets the namespace URI of the custom XML part.' + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'namespaceUri?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartcollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartcollectionupdatedata.yml new file mode 100644 index 0000000000..d71160e753 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartcollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.CustomXmlPartCollectionUpdateData +uid: 'word!Word.Interfaces.CustomXmlPartCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.CustomXmlPartCollectionUpdateData +summary: >- + An interface for updating data on the `CustomXmlPartCollection` object, for use in `customXmlPartCollection.set({ ... + })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.CustomXmlPartCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.CustomXmlPartData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartdata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartdata.yml new file mode 100644 index 0000000000..6ae6b4ecc2 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartdata.yml @@ -0,0 +1,35 @@ +### YamlMime:TSType +name: Word.Interfaces.CustomXmlPartData +uid: 'word!Word.Interfaces.CustomXmlPartData:interface' +package: word! +fullName: Word.Interfaces.CustomXmlPartData +summary: An interface describing the data returned by calling `customXmlPart.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: id + uid: 'word!Word.Interfaces.CustomXmlPartData#id:member' + package: word! + fullName: id + summary: Gets the ID of the custom XML part. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'id?: string;' + return: + type: string + - name: namespaceUri + uid: 'word!Word.Interfaces.CustomXmlPartData#namespaceUri:member' + package: word! + fullName: namespaceUri + summary: Gets the namespace URI of the custom XML part. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'namespaceUri?: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartloadoptions.yml new file mode 100644 index 0000000000..5088291d83 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartloadoptions.yml @@ -0,0 +1,49 @@ +### YamlMime:TSType +name: Word.Interfaces.CustomXmlPartLoadOptions +uid: 'word!Word.Interfaces.CustomXmlPartLoadOptions:interface' +package: word! +fullName: Word.Interfaces.CustomXmlPartLoadOptions +summary: Represents a custom XML part. +remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.CustomXmlPartLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: id + uid: 'word!Word.Interfaces.CustomXmlPartLoadOptions#id:member' + package: word! + fullName: id + summary: Gets the ID of the custom XML part. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'id?: boolean;' + return: + type: boolean + - name: namespaceUri + uid: 'word!Word.Interfaces.CustomXmlPartLoadOptions#namespaceUri:member' + package: word! + fullName: namespaceUri + summary: Gets the namespace URI of the custom XML part. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'namespaceUri?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartscopedcollectiondata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartscopedcollectiondata.yml new file mode 100644 index 0000000000..ea20425574 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartscopedcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.CustomXmlPartScopedCollectionData +uid: 'word!Word.Interfaces.CustomXmlPartScopedCollectionData:interface' +package: word! +fullName: Word.Interfaces.CustomXmlPartScopedCollectionData +summary: An interface describing the data returned by calling `customXmlPartScopedCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.CustomXmlPartScopedCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.CustomXmlPartData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartscopedcollectionloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartscopedcollectionloadoptions.yml new file mode 100644 index 0000000000..a2a60306e5 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartscopedcollectionloadoptions.yml @@ -0,0 +1,49 @@ +### YamlMime:TSType +name: Word.Interfaces.CustomXmlPartScopedCollectionLoadOptions +uid: 'word!Word.Interfaces.CustomXmlPartScopedCollectionLoadOptions:interface' +package: word! +fullName: Word.Interfaces.CustomXmlPartScopedCollectionLoadOptions +summary: 'Contains the collection of [Word.CustomXmlPart](xref:word!Word.CustomXmlPart:class) objects with a specific namespace.' +remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.CustomXmlPartScopedCollectionLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: id + uid: 'word!Word.Interfaces.CustomXmlPartScopedCollectionLoadOptions#id:member' + package: word! + fullName: id + summary: 'For EACH ITEM in the collection: Gets the ID of the custom XML part.' + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'id?: boolean;' + return: + type: boolean + - name: namespaceUri + uid: 'word!Word.Interfaces.CustomXmlPartScopedCollectionLoadOptions#namespaceUri:member' + package: word! + fullName: namespaceUri + summary: 'For EACH ITEM in the collection: Gets the namespace URI of the custom XML part.' + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'namespaceUri?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartscopedcollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartscopedcollectionupdatedata.yml new file mode 100644 index 0000000000..4732746f2b --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.customxmlpartscopedcollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.CustomXmlPartScopedCollectionUpdateData +uid: 'word!Word.Interfaces.CustomXmlPartScopedCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.CustomXmlPartScopedCollectionUpdateData +summary: >- + An interface for updating data on the `CustomXmlPartScopedCollection` object, for use in + `customXmlPartScopedCollection.set({ ... })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.CustomXmlPartScopedCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.CustomXmlPartData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentcreateddata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentcreateddata.yml new file mode 100644 index 0000000000..46cf208d9d --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentcreateddata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.DocumentCreatedData +uid: 'word!Word.Interfaces.DocumentCreatedData:interface' +package: word! +fullName: Word.Interfaces.DocumentCreatedData +summary: An interface describing the data returned by calling `documentCreated.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentcreatedloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentcreatedloadoptions.yml new file mode 100644 index 0000000000..636ef2846e --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentcreatedloadoptions.yml @@ -0,0 +1,27 @@ +### YamlMime:TSType +name: Word.Interfaces.DocumentCreatedLoadOptions +uid: 'word!Word.Interfaces.DocumentCreatedLoadOptions:interface' +package: word! +fullName: Word.Interfaces.DocumentCreatedLoadOptions +summary: >- + The DocumentCreated object is the top level object created by Application.CreateDocument. A DocumentCreated object is + a special Document object. +remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.DocumentCreatedLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentcreatedupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentcreatedupdatedata.yml new file mode 100644 index 0000000000..50c06e8c73 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentcreatedupdatedata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.DocumentCreatedUpdateData +uid: 'word!Word.Interfaces.DocumentCreatedUpdateData:interface' +package: word! +fullName: Word.Interfaces.DocumentCreatedUpdateData +summary: 'An interface for updating data on the `DocumentCreated` object, for use in `documentCreated.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentdata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentdata.yml new file mode 100644 index 0000000000..5fd9c9cfd8 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentdata.yml @@ -0,0 +1,113 @@ +### YamlMime:TSType +name: Word.Interfaces.DocumentData +uid: 'word!Word.Interfaces.DocumentData:interface' +package: word! +fullName: Word.Interfaces.DocumentData +summary: An interface describing the data returned by calling `document.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: body + uid: 'word!Word.Interfaces.DocumentData#body:member' + package: word! + fullName: body + summary: >- + Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, + textboxes, etc. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'body?: Word.Interfaces.BodyData;' + return: + type: '' + - name: changeTrackingMode + uid: 'word!Word.Interfaces.DocumentData#changeTrackingMode:member' + package: word! + fullName: changeTrackingMode + summary: Specifies the ChangeTracking mode. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'changeTrackingMode?: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly";' + return: + type: ' | "Off" | "TrackAll" | "TrackMineOnly"' + - name: contentControls + uid: 'word!Word.Interfaces.DocumentData#contentControls:member' + package: word! + fullName: contentControls + summary: >- + Gets the collection of content control objects in the document. This includes content controls in the body of the + document, headers, footers, textboxes, etc. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'contentControls?: Word.Interfaces.ContentControlData[];' + return: + type: '[]' + - name: customXmlParts + uid: 'word!Word.Interfaces.DocumentData#customXmlParts:member' + package: word! + fullName: customXmlParts + summary: Gets the custom XML parts in the document. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'customXmlParts?: Word.Interfaces.CustomXmlPartData[];' + return: + type: '[]' + - name: properties + uid: 'word!Word.Interfaces.DocumentData#properties:member' + package: word! + fullName: properties + summary: Gets the properties of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'properties?: Word.Interfaces.DocumentPropertiesData;' + return: + type: '' + - name: saved + uid: 'word!Word.Interfaces.DocumentData#saved:member' + package: word! + fullName: saved + summary: >- + Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't + changed since it was saved. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'saved?: boolean;' + return: + type: boolean + - name: sections + uid: 'word!Word.Interfaces.DocumentData#sections:member' + package: word! + fullName: sections + summary: Gets the collection of section objects in the document. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'sections?: Word.Interfaces.SectionData[];' + return: + type: '[]' + - name: settings + uid: 'word!Word.Interfaces.DocumentData#settings:member' + package: word! + fullName: settings + summary: Gets the add-in's settings in the document. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'settings?: Word.Interfaces.SettingData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentloadoptions.yml new file mode 100644 index 0000000000..7da673620c --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentloadoptions.yml @@ -0,0 +1,79 @@ +### YamlMime:TSType +name: Word.Interfaces.DocumentLoadOptions +uid: 'word!Word.Interfaces.DocumentLoadOptions:interface' +package: word! +fullName: Word.Interfaces.DocumentLoadOptions +summary: >- + The Document object is the top level object. A Document object contains one or more sections, content controls, and + the body that contains the contents of the document. +remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.DocumentLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: body + uid: 'word!Word.Interfaces.DocumentLoadOptions#body:member' + package: word! + fullName: body + summary: >- + Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, + textboxes, etc. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'body?: Word.Interfaces.BodyLoadOptions;' + return: + type: '' + - name: changeTrackingMode + uid: 'word!Word.Interfaces.DocumentLoadOptions#changeTrackingMode:member' + package: word! + fullName: changeTrackingMode + summary: Specifies the ChangeTracking mode. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'changeTrackingMode?: boolean;' + return: + type: boolean + - name: properties + uid: 'word!Word.Interfaces.DocumentLoadOptions#properties:member' + package: word! + fullName: properties + summary: Gets the properties of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'properties?: Word.Interfaces.DocumentPropertiesLoadOptions;' + return: + type: '' + - name: saved + uid: 'word!Word.Interfaces.DocumentLoadOptions#saved:member' + package: word! + fullName: saved + summary: >- + Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't + changed since it was saved. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'saved?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentpropertiesdata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentpropertiesdata.yml new file mode 100644 index 0000000000..a6bcfd9b2a --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentpropertiesdata.yml @@ -0,0 +1,236 @@ +### YamlMime:TSType +name: Word.Interfaces.DocumentPropertiesData +uid: 'word!Word.Interfaces.DocumentPropertiesData:interface' +package: word! +fullName: Word.Interfaces.DocumentPropertiesData +summary: An interface describing the data returned by calling `documentProperties.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: applicationName + uid: 'word!Word.Interfaces.DocumentPropertiesData#applicationName:member' + package: word! + fullName: applicationName + summary: Gets the application name of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'applicationName?: string;' + return: + type: string + - name: author + uid: 'word!Word.Interfaces.DocumentPropertiesData#author:member' + package: word! + fullName: author + summary: Specifies the author of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'author?: string;' + return: + type: string + - name: category + uid: 'word!Word.Interfaces.DocumentPropertiesData#category:member' + package: word! + fullName: category + summary: Specifies the category of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'category?: string;' + return: + type: string + - name: comments + uid: 'word!Word.Interfaces.DocumentPropertiesData#comments:member' + package: word! + fullName: comments + summary: >- + Specifies the Comments field in the metadata of the document. These have no connection to comments by users made + in the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'comments?: string;' + return: + type: string + - name: company + uid: 'word!Word.Interfaces.DocumentPropertiesData#company:member' + package: word! + fullName: company + summary: Specifies the company of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'company?: string;' + return: + type: string + - name: creationDate + uid: 'word!Word.Interfaces.DocumentPropertiesData#creationDate:member' + package: word! + fullName: creationDate + summary: Gets the creation date of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'creationDate?: Date;' + return: + type: Date + - name: customProperties + uid: 'word!Word.Interfaces.DocumentPropertiesData#customProperties:member' + package: word! + fullName: customProperties + summary: Gets the collection of custom properties of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'customProperties?: Word.Interfaces.CustomPropertyData[];' + return: + type: '[]' + - name: format + uid: 'word!Word.Interfaces.DocumentPropertiesData#format:member' + package: word! + fullName: format + summary: Specifies the format of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'format?: string;' + return: + type: string + - name: keywords + uid: 'word!Word.Interfaces.DocumentPropertiesData#keywords:member' + package: word! + fullName: keywords + summary: Specifies the keywords of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'keywords?: string;' + return: + type: string + - name: lastAuthor + uid: 'word!Word.Interfaces.DocumentPropertiesData#lastAuthor:member' + package: word! + fullName: lastAuthor + summary: Gets the last author of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lastAuthor?: string;' + return: + type: string + - name: lastPrintDate + uid: 'word!Word.Interfaces.DocumentPropertiesData#lastPrintDate:member' + package: word! + fullName: lastPrintDate + summary: Gets the last print date of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lastPrintDate?: Date;' + return: + type: Date + - name: lastSaveTime + uid: 'word!Word.Interfaces.DocumentPropertiesData#lastSaveTime:member' + package: word! + fullName: lastSaveTime + summary: Gets the last save time of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lastSaveTime?: Date;' + return: + type: Date + - name: manager + uid: 'word!Word.Interfaces.DocumentPropertiesData#manager:member' + package: word! + fullName: manager + summary: Specifies the manager of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'manager?: string;' + return: + type: string + - name: revisionNumber + uid: 'word!Word.Interfaces.DocumentPropertiesData#revisionNumber:member' + package: word! + fullName: revisionNumber + summary: Gets the revision number of the document. + remarks: '\[ [API set: WordApi 1.3](/office/dev/add-ins/reference/overview/visio-javascript-reference-overview) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'revisionNumber?: string;' + return: + type: string + - name: security + uid: 'word!Word.Interfaces.DocumentPropertiesData#security:member' + package: word! + fullName: security + summary: >- + Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document + Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is + encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: + Both \#1 and \#2; 4 = File on disk is read-only; 5 = Both \#1 and \#4; 6 = Both \#2 and \#4; 7 = All of \#1, \#2, + and \#4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both \#1 and \#8; 10 = Both \#2 and \#8; 11 = All + of \#1, \#2, and \#8; 12 = Both \#4 and \#8; 13 = All of \#1, \#4, and \#8; 14 = All of \#2, \#4, and \#8; 15 = + All of \#1, \#2, \#4, and \#8. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'security?: number;' + return: + type: number + - name: subject + uid: 'word!Word.Interfaces.DocumentPropertiesData#subject:member' + package: word! + fullName: subject + summary: Specifies the subject of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'subject?: string;' + return: + type: string + - name: template + uid: 'word!Word.Interfaces.DocumentPropertiesData#template:member' + package: word! + fullName: template + summary: Gets the template of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'template?: string;' + return: + type: string + - name: title + uid: 'word!Word.Interfaces.DocumentPropertiesData#title:member' + package: word! + fullName: title + summary: Specifies the title of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'title?: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentpropertiesloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentpropertiesloadoptions.yml new file mode 100644 index 0000000000..ef2303f541 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentpropertiesloadoptions.yml @@ -0,0 +1,238 @@ +### YamlMime:TSType +name: Word.Interfaces.DocumentPropertiesLoadOptions +uid: 'word!Word.Interfaces.DocumentPropertiesLoadOptions:interface' +package: word! +fullName: Word.Interfaces.DocumentPropertiesLoadOptions +summary: Represents document properties. +remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.DocumentPropertiesLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: applicationName + uid: 'word!Word.Interfaces.DocumentPropertiesLoadOptions#applicationName:member' + package: word! + fullName: applicationName + summary: Gets the application name of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'applicationName?: boolean;' + return: + type: boolean + - name: author + uid: 'word!Word.Interfaces.DocumentPropertiesLoadOptions#author:member' + package: word! + fullName: author + summary: Specifies the author of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'author?: boolean;' + return: + type: boolean + - name: category + uid: 'word!Word.Interfaces.DocumentPropertiesLoadOptions#category:member' + package: word! + fullName: category + summary: Specifies the category of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'category?: boolean;' + return: + type: boolean + - name: comments + uid: 'word!Word.Interfaces.DocumentPropertiesLoadOptions#comments:member' + package: word! + fullName: comments + summary: >- + Specifies the Comments field in the metadata of the document. These have no connection to comments by users made + in the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'comments?: boolean;' + return: + type: boolean + - name: company + uid: 'word!Word.Interfaces.DocumentPropertiesLoadOptions#company:member' + package: word! + fullName: company + summary: Specifies the company of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'company?: boolean;' + return: + type: boolean + - name: creationDate + uid: 'word!Word.Interfaces.DocumentPropertiesLoadOptions#creationDate:member' + package: word! + fullName: creationDate + summary: Gets the creation date of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'creationDate?: boolean;' + return: + type: boolean + - name: format + uid: 'word!Word.Interfaces.DocumentPropertiesLoadOptions#format:member' + package: word! + fullName: format + summary: Specifies the format of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'format?: boolean;' + return: + type: boolean + - name: keywords + uid: 'word!Word.Interfaces.DocumentPropertiesLoadOptions#keywords:member' + package: word! + fullName: keywords + summary: Specifies the keywords of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'keywords?: boolean;' + return: + type: boolean + - name: lastAuthor + uid: 'word!Word.Interfaces.DocumentPropertiesLoadOptions#lastAuthor:member' + package: word! + fullName: lastAuthor + summary: Gets the last author of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lastAuthor?: boolean;' + return: + type: boolean + - name: lastPrintDate + uid: 'word!Word.Interfaces.DocumentPropertiesLoadOptions#lastPrintDate:member' + package: word! + fullName: lastPrintDate + summary: Gets the last print date of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lastPrintDate?: boolean;' + return: + type: boolean + - name: lastSaveTime + uid: 'word!Word.Interfaces.DocumentPropertiesLoadOptions#lastSaveTime:member' + package: word! + fullName: lastSaveTime + summary: Gets the last save time of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lastSaveTime?: boolean;' + return: + type: boolean + - name: manager + uid: 'word!Word.Interfaces.DocumentPropertiesLoadOptions#manager:member' + package: word! + fullName: manager + summary: Specifies the manager of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'manager?: boolean;' + return: + type: boolean + - name: revisionNumber + uid: 'word!Word.Interfaces.DocumentPropertiesLoadOptions#revisionNumber:member' + package: word! + fullName: revisionNumber + summary: Gets the revision number of the document. + remarks: '\[ [API set: WordApi 1.3](/office/dev/add-ins/reference/overview/visio-javascript-reference-overview) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'revisionNumber?: boolean;' + return: + type: boolean + - name: security + uid: 'word!Word.Interfaces.DocumentPropertiesLoadOptions#security:member' + package: word! + fullName: security + summary: >- + Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document + Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is + encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: + Both \#1 and \#2; 4 = File on disk is read-only; 5 = Both \#1 and \#4; 6 = Both \#2 and \#4; 7 = All of \#1, \#2, + and \#4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both \#1 and \#8; 10 = Both \#2 and \#8; 11 = All + of \#1, \#2, and \#8; 12 = Both \#4 and \#8; 13 = All of \#1, \#4, and \#8; 14 = All of \#2, \#4, and \#8; 15 = + All of \#1, \#2, \#4, and \#8. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'security?: boolean;' + return: + type: boolean + - name: subject + uid: 'word!Word.Interfaces.DocumentPropertiesLoadOptions#subject:member' + package: word! + fullName: subject + summary: Specifies the subject of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'subject?: boolean;' + return: + type: boolean + - name: template + uid: 'word!Word.Interfaces.DocumentPropertiesLoadOptions#template:member' + package: word! + fullName: template + summary: Gets the template of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'template?: boolean;' + return: + type: boolean + - name: title + uid: 'word!Word.Interfaces.DocumentPropertiesLoadOptions#title:member' + package: word! + fullName: title + summary: Specifies the title of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'title?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentpropertiesupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentpropertiesupdatedata.yml new file mode 100644 index 0000000000..1003e57fa1 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentpropertiesupdatedata.yml @@ -0,0 +1,123 @@ +### YamlMime:TSType +name: Word.Interfaces.DocumentPropertiesUpdateData +uid: 'word!Word.Interfaces.DocumentPropertiesUpdateData:interface' +package: word! +fullName: Word.Interfaces.DocumentPropertiesUpdateData +summary: >- + An interface for updating data on the `DocumentProperties` object, for use in `documentProperties.set({ ... })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: author + uid: 'word!Word.Interfaces.DocumentPropertiesUpdateData#author:member' + package: word! + fullName: author + summary: Specifies the author of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'author?: string;' + return: + type: string + - name: category + uid: 'word!Word.Interfaces.DocumentPropertiesUpdateData#category:member' + package: word! + fullName: category + summary: Specifies the category of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'category?: string;' + return: + type: string + - name: comments + uid: 'word!Word.Interfaces.DocumentPropertiesUpdateData#comments:member' + package: word! + fullName: comments + summary: >- + Specifies the Comments field in the metadata of the document. These have no connection to comments by users made + in the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'comments?: string;' + return: + type: string + - name: company + uid: 'word!Word.Interfaces.DocumentPropertiesUpdateData#company:member' + package: word! + fullName: company + summary: Specifies the company of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'company?: string;' + return: + type: string + - name: format + uid: 'word!Word.Interfaces.DocumentPropertiesUpdateData#format:member' + package: word! + fullName: format + summary: Specifies the format of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'format?: string;' + return: + type: string + - name: keywords + uid: 'word!Word.Interfaces.DocumentPropertiesUpdateData#keywords:member' + package: word! + fullName: keywords + summary: Specifies the keywords of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'keywords?: string;' + return: + type: string + - name: manager + uid: 'word!Word.Interfaces.DocumentPropertiesUpdateData#manager:member' + package: word! + fullName: manager + summary: Specifies the manager of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'manager?: string;' + return: + type: string + - name: subject + uid: 'word!Word.Interfaces.DocumentPropertiesUpdateData#subject:member' + package: word! + fullName: subject + summary: Specifies the subject of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'subject?: string;' + return: + type: string + - name: title + uid: 'word!Word.Interfaces.DocumentPropertiesUpdateData#title:member' + package: word! + fullName: title + summary: Specifies the title of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'title?: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentupdatedata.yml new file mode 100644 index 0000000000..e56c5c3dfa --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.documentupdatedata.yml @@ -0,0 +1,49 @@ +### YamlMime:TSType +name: Word.Interfaces.DocumentUpdateData +uid: 'word!Word.Interfaces.DocumentUpdateData:interface' +package: word! +fullName: Word.Interfaces.DocumentUpdateData +summary: 'An interface for updating data on the `Document` object, for use in `document.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: body + uid: 'word!Word.Interfaces.DocumentUpdateData#body:member' + package: word! + fullName: body + summary: >- + Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, + textboxes, etc. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'body?: Word.Interfaces.BodyUpdateData;' + return: + type: '' + - name: changeTrackingMode + uid: 'word!Word.Interfaces.DocumentUpdateData#changeTrackingMode:member' + package: word! + fullName: changeTrackingMode + summary: Specifies the ChangeTracking mode. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'changeTrackingMode?: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly";' + return: + type: ' | "Off" | "TrackAll" | "TrackMineOnly"' + - name: properties + uid: 'word!Word.Interfaces.DocumentUpdateData#properties:member' + package: word! + fullName: properties + summary: Gets the properties of the document. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'properties?: Word.Interfaces.DocumentPropertiesUpdateData;' + return: + type: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.dropdownlistcontentcontroldata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.dropdownlistcontentcontroldata.yml new file mode 100644 index 0000000000..0802e15d92 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.dropdownlistcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.DropDownListContentControlData +uid: 'word!Word.Interfaces.DropDownListContentControlData:interface' +package: word! +fullName: Word.Interfaces.DropDownListContentControlData +summary: An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fieldcollectiondata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fieldcollectiondata.yml new file mode 100644 index 0000000000..8d2d522e1c --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fieldcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.FieldCollectionData +uid: 'word!Word.Interfaces.FieldCollectionData:interface' +package: word! +fullName: Word.Interfaces.FieldCollectionData +summary: An interface describing the data returned by calling `fieldCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.FieldCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.FieldData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fieldcollectionloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fieldcollectionloadoptions.yml new file mode 100644 index 0000000000..9edc7251c3 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fieldcollectionloadoptions.yml @@ -0,0 +1,219 @@ +### YamlMime:TSType +name: Word.Interfaces.FieldCollectionLoadOptions +uid: 'word!Word.Interfaces.FieldCollectionLoadOptions:interface' +package: word! +fullName: Word.Interfaces.FieldCollectionLoadOptions +summary: 'Contains a collection of [Word.Field](xref:word!Word.Field:class) objects.' +remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Important: To learn more about which fields can be inserted, see the `Word.Range.insertField API` introduced in + requirement set 1.5. Support for managing fields is similar to what's available in the Word UI. However, while the + Word UI on the web primarily only supports fields as read-only (see [Field codes in Word for the + web](https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1)), the `Addin` field is + editable. To learn more about Word UI clients that more fully support fields, see the product list at the beginning of + [Insert, edit, and view fields in Word](https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb). +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.FieldCollectionLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: code + uid: 'word!Word.Interfaces.FieldCollectionLoadOptions#code:member' + package: word! + fullName: code + summary: 'For EACH ITEM in the collection: Specifies the field''s code instruction.' + remarks: |- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + Note: The ability to set the code was introduced in WordApi 1.5. + isPreview: false + isDeprecated: false + syntax: + content: 'code?: boolean;' + return: + type: boolean + - name: data + uid: 'word!Word.Interfaces.FieldCollectionLoadOptions#data:member' + package: word! + fullName: data + summary: >- + For EACH ITEM in the collection: Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is + `null` and it will throw a general exception when code attempts to set it. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'data?: boolean;' + return: + type: boolean + - name: kind + uid: 'word!Word.Interfaces.FieldCollectionLoadOptions#kind:member' + package: word! + fullName: kind + summary: 'For EACH ITEM in the collection: Gets the field''s kind.' + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'kind?: boolean;' + return: + type: boolean + - name: locked + uid: 'word!Word.Interfaces.FieldCollectionLoadOptions#locked:member' + package: word! + fullName: locked + summary: >- + For EACH ITEM in the collection: Specifies whether the field is locked. `true` if the field is locked, `false` + otherwise. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'locked?: boolean;' + return: + type: boolean + - name: parentBody + uid: 'word!Word.Interfaces.FieldCollectionLoadOptions#parentBody:member' + package: word! + fullName: parentBody + summary: 'For EACH ITEM in the collection: Gets the parent body of the field.' + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentBody?: Word.Interfaces.BodyLoadOptions;' + return: + type: '' + - name: parentContentControl + uid: 'word!Word.Interfaces.FieldCollectionLoadOptions#parentContentControl:member' + package: word! + fullName: parentContentControl + summary: >- + For EACH ITEM in the collection: Gets the content control that contains the field. Throws an `ItemNotFound` error + if there isn't a parent content control. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControl?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentContentControlOrNullObject + uid: 'word!Word.Interfaces.FieldCollectionLoadOptions#parentContentControlOrNullObject:member' + package: word! + fullName: parentContentControlOrNullObject + summary: >- + For EACH ITEM in the collection: Gets the content control that contains the field. If there isn't a parent content + control, then this method will return an object with its `isNullObject` property set to `true`. For + further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentTable + uid: 'word!Word.Interfaces.FieldCollectionLoadOptions#parentTable:member' + package: word! + fullName: parentTable + summary: >- + For EACH ITEM in the collection: Gets the table that contains the field. Throws an `ItemNotFound` error if it + isn't contained in a table. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTable?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: parentTableCell + uid: 'word!Word.Interfaces.FieldCollectionLoadOptions#parentTableCell:member' + package: word! + fullName: parentTableCell + summary: >- + For EACH ITEM in the collection: Gets the table cell that contains the field. Throws an `ItemNotFound` error if it + isn't contained in a table cell. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableCell?: Word.Interfaces.TableCellLoadOptions;' + return: + type: '' + - name: parentTableCellOrNullObject + uid: 'word!Word.Interfaces.FieldCollectionLoadOptions#parentTableCellOrNullObject:member' + package: word! + fullName: parentTableCellOrNullObject + summary: >- + For EACH ITEM in the collection: Gets the table cell that contains the field. If it isn't contained in a table + cell, then this method will return an object with its `isNullObject` property set to `true`. For further + information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions;' + return: + type: '' + - name: parentTableOrNullObject + uid: 'word!Word.Interfaces.FieldCollectionLoadOptions#parentTableOrNullObject:member' + package: word! + fullName: parentTableOrNullObject + summary: >- + For EACH ITEM in the collection: Gets the table that contains the field. If it isn't contained in a table, then + this method will return an object with its `isNullObject` property set to `true`. For further information, + see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableOrNullObject?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: result + uid: 'word!Word.Interfaces.FieldCollectionLoadOptions#result:member' + package: word! + fullName: result + summary: 'For EACH ITEM in the collection: Gets the field''s result data.' + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'result?: Word.Interfaces.RangeLoadOptions;' + return: + type: '' + - name: type + uid: 'word!Word.Interfaces.FieldCollectionLoadOptions#type:member' + package: word! + fullName: type + summary: 'For EACH ITEM in the collection: Gets the field''s type.' + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fieldcollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fieldcollectionupdatedata.yml new file mode 100644 index 0000000000..e8b953b4b4 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fieldcollectionupdatedata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.FieldCollectionUpdateData +uid: 'word!Word.Interfaces.FieldCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.FieldCollectionUpdateData +summary: 'An interface for updating data on the `FieldCollection` object, for use in `fieldCollection.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.FieldCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.FieldData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fielddata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fielddata.yml new file mode 100644 index 0000000000..24efff1d7e --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fielddata.yml @@ -0,0 +1,110 @@ +### YamlMime:TSType +name: Word.Interfaces.FieldData +uid: 'word!Word.Interfaces.FieldData:interface' +package: word! +fullName: Word.Interfaces.FieldData +summary: An interface describing the data returned by calling `field.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: code + uid: 'word!Word.Interfaces.FieldData#code:member' + package: word! + fullName: code + summary: Specifies the field's code instruction. + remarks: |- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + Note: The ability to set the code was introduced in WordApi 1.5. + isPreview: false + isDeprecated: false + syntax: + content: 'code?: string;' + return: + type: string + - name: data + uid: 'word!Word.Interfaces.FieldData#data:member' + package: word! + fullName: data + summary: >- + Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general + exception when code attempts to set it. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'data?: string;' + return: + type: string + - name: kind + uid: 'word!Word.Interfaces.FieldData#kind:member' + package: word! + fullName: kind + summary: Gets the field's kind. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'kind?: Word.FieldKind | "None" | "Hot" | "Warm" | "Cold";' + return: + type: ' | "None" | "Hot" | "Warm" | "Cold"' + - name: locked + uid: 'word!Word.Interfaces.FieldData#locked:member' + package: word! + fullName: locked + summary: 'Specifies whether the field is locked. `true` if the field is locked, `false` otherwise.' + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'locked?: boolean;' + return: + type: boolean + - name: result + uid: 'word!Word.Interfaces.FieldData#result:member' + package: word! + fullName: result + summary: Gets the field's result data. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'result?: Word.Interfaces.RangeData;' + return: + type: '' + - name: type + uid: 'word!Word.Interfaces.FieldData#type:member' + package: word! + fullName: type + summary: Gets the field's type. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + type?: Word.FieldType | "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | + "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | + "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | + "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" + | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | + "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | + "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" + | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | + "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | + "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | + "Empty" | "Others" | "Undefined"; + return: + type: >- + | "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" + | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | + "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | + "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | + "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | + "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | + "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | + "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | + "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | + "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | + "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined" diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fieldloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fieldloadoptions.yml new file mode 100644 index 0000000000..5c8463ee0e --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fieldloadoptions.yml @@ -0,0 +1,212 @@ +### YamlMime:TSType +name: Word.Interfaces.FieldLoadOptions +uid: 'word!Word.Interfaces.FieldLoadOptions:interface' +package: word! +fullName: Word.Interfaces.FieldLoadOptions +summary: Represents a field. +remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Important: To learn more about which fields can be inserted, see the `Word.Range.insertField` API introduced in + requirement set 1.5. Support for managing fields is similar to what's available in the Word UI. However, while the + Word UI on the web primarily only supports fields as read-only (see [Field codes in Word for the + web](https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1)), the `Addin` field is + editable. To learn more about Word UI clients that more fully support fields, see the product list at the beginning of + [Insert, edit, and view fields in Word](https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb). +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.FieldLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: code + uid: 'word!Word.Interfaces.FieldLoadOptions#code:member' + package: word! + fullName: code + summary: Specifies the field's code instruction. + remarks: |- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + Note: The ability to set the code was introduced in WordApi 1.5. + isPreview: false + isDeprecated: false + syntax: + content: 'code?: boolean;' + return: + type: boolean + - name: data + uid: 'word!Word.Interfaces.FieldLoadOptions#data:member' + package: word! + fullName: data + summary: >- + Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general + exception when code attempts to set it. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'data?: boolean;' + return: + type: boolean + - name: kind + uid: 'word!Word.Interfaces.FieldLoadOptions#kind:member' + package: word! + fullName: kind + summary: Gets the field's kind. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'kind?: boolean;' + return: + type: boolean + - name: locked + uid: 'word!Word.Interfaces.FieldLoadOptions#locked:member' + package: word! + fullName: locked + summary: 'Specifies whether the field is locked. `true` if the field is locked, `false` otherwise.' + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'locked?: boolean;' + return: + type: boolean + - name: parentBody + uid: 'word!Word.Interfaces.FieldLoadOptions#parentBody:member' + package: word! + fullName: parentBody + summary: Gets the parent body of the field. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentBody?: Word.Interfaces.BodyLoadOptions;' + return: + type: '' + - name: parentContentControl + uid: 'word!Word.Interfaces.FieldLoadOptions#parentContentControl:member' + package: word! + fullName: parentContentControl + summary: >- + Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content + control. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControl?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentContentControlOrNullObject + uid: 'word!Word.Interfaces.FieldLoadOptions#parentContentControlOrNullObject:member' + package: word! + fullName: parentContentControlOrNullObject + summary: >- + Gets the content control that contains the field. If there isn't a parent content control, then this method will + return an object with its `isNullObject` property set to `true`. For further information, see + [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentTable + uid: 'word!Word.Interfaces.FieldLoadOptions#parentTable:member' + package: word! + fullName: parentTable + summary: Gets the table that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTable?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: parentTableCell + uid: 'word!Word.Interfaces.FieldLoadOptions#parentTableCell:member' + package: word! + fullName: parentTableCell + summary: Gets the table cell that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table cell. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableCell?: Word.Interfaces.TableCellLoadOptions;' + return: + type: '' + - name: parentTableCellOrNullObject + uid: 'word!Word.Interfaces.FieldLoadOptions#parentTableCellOrNullObject:member' + package: word! + fullName: parentTableCellOrNullObject + summary: >- + Gets the table cell that contains the field. If it isn't contained in a table cell, then this method will return + an object with its `isNullObject` property set to `true`. For further information, see [*OrNullObject + methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions;' + return: + type: '' + - name: parentTableOrNullObject + uid: 'word!Word.Interfaces.FieldLoadOptions#parentTableOrNullObject:member' + package: word! + fullName: parentTableOrNullObject + summary: >- + Gets the table that contains the field. If it isn't contained in a table, then this method will return an object + with its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableOrNullObject?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: result + uid: 'word!Word.Interfaces.FieldLoadOptions#result:member' + package: word! + fullName: result + summary: Gets the field's result data. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'result?: Word.Interfaces.RangeLoadOptions;' + return: + type: '' + - name: type + uid: 'word!Word.Interfaces.FieldLoadOptions#type:member' + package: word! + fullName: type + summary: Gets the field's type. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fieldupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fieldupdatedata.yml new file mode 100644 index 0000000000..3cae0fe065 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fieldupdatedata.yml @@ -0,0 +1,64 @@ +### YamlMime:TSType +name: Word.Interfaces.FieldUpdateData +uid: 'word!Word.Interfaces.FieldUpdateData:interface' +package: word! +fullName: Word.Interfaces.FieldUpdateData +summary: 'An interface for updating data on the `Field` object, for use in `field.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: code + uid: 'word!Word.Interfaces.FieldUpdateData#code:member' + package: word! + fullName: code + summary: Specifies the field's code instruction. + remarks: |- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + Note: The ability to set the code was introduced in WordApi 1.5. + isPreview: false + isDeprecated: false + syntax: + content: 'code?: string;' + return: + type: string + - name: data + uid: 'word!Word.Interfaces.FieldUpdateData#data:member' + package: word! + fullName: data + summary: >- + Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general + exception when code attempts to set it. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'data?: string;' + return: + type: string + - name: locked + uid: 'word!Word.Interfaces.FieldUpdateData#locked:member' + package: word! + fullName: locked + summary: 'Specifies whether the field is locked. `true` if the field is locked, `false` otherwise.' + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'locked?: boolean;' + return: + type: boolean + - name: result + uid: 'word!Word.Interfaces.FieldUpdateData#result:member' + package: word! + fullName: result + summary: Gets the field's result data. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'result?: Word.Interfaces.RangeUpdateData;' + return: + type: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fontdata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fontdata.yml new file mode 100644 index 0000000000..48543080ac --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fontdata.yml @@ -0,0 +1,167 @@ +### YamlMime:TSType +name: Word.Interfaces.FontData +uid: 'word!Word.Interfaces.FontData:interface' +package: word! +fullName: Word.Interfaces.FontData +summary: An interface describing the data returned by calling `font.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: bold + uid: 'word!Word.Interfaces.FontData#bold:member' + package: word! + fullName: bold + summary: >- + Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, + false. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'bold?: boolean;' + return: + type: boolean + - name: color + uid: 'word!Word.Interfaces.FontData#color:member' + package: word! + fullName: color + summary: 'Specifies the color for the specified font. You can provide the value in the ''\#RRGGBB'' format or the color name.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'color?: string;' + return: + type: string + - name: doubleStrikeThrough + uid: 'word!Word.Interfaces.FontData#doubleStrikeThrough:member' + package: word! + fullName: doubleStrikeThrough + summary: >- + Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as + double strikethrough text, otherwise, false. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'doubleStrikeThrough?: boolean;' + return: + type: boolean + - name: highlightColor + uid: 'word!Word.Interfaces.FontData#highlightColor:member' + package: word! + fullName: highlightColor + summary: >- + Specifies the highlight color. To set it, use a value either in the '\#RRGGBB' format or the color name. To remove + highlight color, set it to null. The returned highlight color can be in the '\#RRGGBB' format, an empty string for + mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in + Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", + "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for + Windows Desktop, any other color is converted to the closest color when applied to the font. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'highlightColor?: string;' + return: + type: string + - name: italic + uid: 'word!Word.Interfaces.FontData#italic:member' + package: word! + fullName: italic + summary: 'Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'italic?: boolean;' + return: + type: boolean + - name: name + uid: 'word!Word.Interfaces.FontData#name:member' + package: word! + fullName: name + summary: Specifies a value that represents the name of the font. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'name?: string;' + return: + type: string + - name: size + uid: 'word!Word.Interfaces.FontData#size:member' + package: word! + fullName: size + summary: Specifies a value that represents the font size in points. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'size?: number;' + return: + type: number + - name: strikeThrough + uid: 'word!Word.Interfaces.FontData#strikeThrough:member' + package: word! + fullName: strikeThrough + summary: >- + Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as + strikethrough text, otherwise, false. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'strikeThrough?: boolean;' + return: + type: boolean + - name: subscript + uid: 'word!Word.Interfaces.FontData#subscript:member' + package: word! + fullName: subscript + summary: >- + Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, + otherwise, false. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'subscript?: boolean;' + return: + type: boolean + - name: superscript + uid: 'word!Word.Interfaces.FontData#superscript:member' + package: word! + fullName: superscript + summary: >- + Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, + otherwise, false. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'superscript?: boolean;' + return: + type: boolean + - name: underline + uid: 'word!Word.Interfaces.FontData#underline:member' + package: word! + fullName: underline + summary: Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | + "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | + "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | + "WaveDouble"; + return: + type: >- + | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | + "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | + "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | + "WaveHeavy" | "WaveDouble" diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fontloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fontloadoptions.yml new file mode 100644 index 0000000000..be66d0cf0d --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fontloadoptions.yml @@ -0,0 +1,173 @@ +### YamlMime:TSType +name: Word.Interfaces.FontLoadOptions +uid: 'word!Word.Interfaces.FontLoadOptions:interface' +package: word! +fullName: Word.Interfaces.FontLoadOptions +summary: Represents a font. +remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.FontLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: bold + uid: 'word!Word.Interfaces.FontLoadOptions#bold:member' + package: word! + fullName: bold + summary: >- + Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, + false. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'bold?: boolean;' + return: + type: boolean + - name: color + uid: 'word!Word.Interfaces.FontLoadOptions#color:member' + package: word! + fullName: color + summary: 'Specifies the color for the specified font. You can provide the value in the ''\#RRGGBB'' format or the color name.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'color?: boolean;' + return: + type: boolean + - name: doubleStrikeThrough + uid: 'word!Word.Interfaces.FontLoadOptions#doubleStrikeThrough:member' + package: word! + fullName: doubleStrikeThrough + summary: >- + Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as + double strikethrough text, otherwise, false. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'doubleStrikeThrough?: boolean;' + return: + type: boolean + - name: highlightColor + uid: 'word!Word.Interfaces.FontLoadOptions#highlightColor:member' + package: word! + fullName: highlightColor + summary: >- + Specifies the highlight color. To set it, use a value either in the '\#RRGGBB' format or the color name. To remove + highlight color, set it to null. The returned highlight color can be in the '\#RRGGBB' format, an empty string for + mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in + Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", + "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for + Windows Desktop, any other color is converted to the closest color when applied to the font. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'highlightColor?: boolean;' + return: + type: boolean + - name: italic + uid: 'word!Word.Interfaces.FontLoadOptions#italic:member' + package: word! + fullName: italic + summary: 'Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'italic?: boolean;' + return: + type: boolean + - name: name + uid: 'word!Word.Interfaces.FontLoadOptions#name:member' + package: word! + fullName: name + summary: Specifies a value that represents the name of the font. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'name?: boolean;' + return: + type: boolean + - name: size + uid: 'word!Word.Interfaces.FontLoadOptions#size:member' + package: word! + fullName: size + summary: Specifies a value that represents the font size in points. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'size?: boolean;' + return: + type: boolean + - name: strikeThrough + uid: 'word!Word.Interfaces.FontLoadOptions#strikeThrough:member' + package: word! + fullName: strikeThrough + summary: >- + Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as + strikethrough text, otherwise, false. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'strikeThrough?: boolean;' + return: + type: boolean + - name: subscript + uid: 'word!Word.Interfaces.FontLoadOptions#subscript:member' + package: word! + fullName: subscript + summary: >- + Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, + otherwise, false. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'subscript?: boolean;' + return: + type: boolean + - name: superscript + uid: 'word!Word.Interfaces.FontLoadOptions#superscript:member' + package: word! + fullName: superscript + summary: >- + Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, + otherwise, false. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'superscript?: boolean;' + return: + type: boolean + - name: underline + uid: 'word!Word.Interfaces.FontLoadOptions#underline:member' + package: word! + fullName: underline + summary: Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'underline?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fontupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fontupdatedata.yml new file mode 100644 index 0000000000..c372778fc9 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.fontupdatedata.yml @@ -0,0 +1,167 @@ +### YamlMime:TSType +name: Word.Interfaces.FontUpdateData +uid: 'word!Word.Interfaces.FontUpdateData:interface' +package: word! +fullName: Word.Interfaces.FontUpdateData +summary: 'An interface for updating data on the `Font` object, for use in `font.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: bold + uid: 'word!Word.Interfaces.FontUpdateData#bold:member' + package: word! + fullName: bold + summary: >- + Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, + false. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'bold?: boolean;' + return: + type: boolean + - name: color + uid: 'word!Word.Interfaces.FontUpdateData#color:member' + package: word! + fullName: color + summary: 'Specifies the color for the specified font. You can provide the value in the ''\#RRGGBB'' format or the color name.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'color?: string;' + return: + type: string + - name: doubleStrikeThrough + uid: 'word!Word.Interfaces.FontUpdateData#doubleStrikeThrough:member' + package: word! + fullName: doubleStrikeThrough + summary: >- + Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as + double strikethrough text, otherwise, false. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'doubleStrikeThrough?: boolean;' + return: + type: boolean + - name: highlightColor + uid: 'word!Word.Interfaces.FontUpdateData#highlightColor:member' + package: word! + fullName: highlightColor + summary: >- + Specifies the highlight color. To set it, use a value either in the '\#RRGGBB' format or the color name. To remove + highlight color, set it to null. The returned highlight color can be in the '\#RRGGBB' format, an empty string for + mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in + Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", + "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for + Windows Desktop, any other color is converted to the closest color when applied to the font. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'highlightColor?: string;' + return: + type: string + - name: italic + uid: 'word!Word.Interfaces.FontUpdateData#italic:member' + package: word! + fullName: italic + summary: 'Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'italic?: boolean;' + return: + type: boolean + - name: name + uid: 'word!Word.Interfaces.FontUpdateData#name:member' + package: word! + fullName: name + summary: Specifies a value that represents the name of the font. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'name?: string;' + return: + type: string + - name: size + uid: 'word!Word.Interfaces.FontUpdateData#size:member' + package: word! + fullName: size + summary: Specifies a value that represents the font size in points. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'size?: number;' + return: + type: number + - name: strikeThrough + uid: 'word!Word.Interfaces.FontUpdateData#strikeThrough:member' + package: word! + fullName: strikeThrough + summary: >- + Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as + strikethrough text, otherwise, false. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'strikeThrough?: boolean;' + return: + type: boolean + - name: subscript + uid: 'word!Word.Interfaces.FontUpdateData#subscript:member' + package: word! + fullName: subscript + summary: >- + Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, + otherwise, false. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'subscript?: boolean;' + return: + type: boolean + - name: superscript + uid: 'word!Word.Interfaces.FontUpdateData#superscript:member' + package: word! + fullName: superscript + summary: >- + Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, + otherwise, false. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'superscript?: boolean;' + return: + type: boolean + - name: underline + uid: 'word!Word.Interfaces.FontUpdateData#underline:member' + package: word! + fullName: underline + summary: Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | + "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | + "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | + "WaveDouble"; + return: + type: >- + | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | + "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | + "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | + "WaveHeavy" | "WaveDouble" diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.inlinepicturecollectiondata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.inlinepicturecollectiondata.yml new file mode 100644 index 0000000000..4c253bac39 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.inlinepicturecollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.InlinePictureCollectionData +uid: 'word!Word.Interfaces.InlinePictureCollectionData:interface' +package: word! +fullName: Word.Interfaces.InlinePictureCollectionData +summary: An interface describing the data returned by calling `inlinePictureCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.InlinePictureCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.InlinePictureData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.inlinepicturecollectionloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.inlinepicturecollectionloadoptions.yml new file mode 100644 index 0000000000..9d29d2a26a --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.inlinepicturecollectionloadoptions.yml @@ -0,0 +1,208 @@ +### YamlMime:TSType +name: Word.Interfaces.InlinePictureCollectionLoadOptions +uid: 'word!Word.Interfaces.InlinePictureCollectionLoadOptions:interface' +package: word! +fullName: Word.Interfaces.InlinePictureCollectionLoadOptions +summary: 'Contains a collection of [Word.InlinePicture](xref:word!Word.InlinePicture:class) objects.' +remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.InlinePictureCollectionLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: altTextDescription + uid: 'word!Word.Interfaces.InlinePictureCollectionLoadOptions#altTextDescription:member' + package: word! + fullName: altTextDescription + summary: >- + For EACH ITEM in the collection: Specifies a string that represents the alternative text associated with the + inline image. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'altTextDescription?: boolean;' + return: + type: boolean + - name: altTextTitle + uid: 'word!Word.Interfaces.InlinePictureCollectionLoadOptions#altTextTitle:member' + package: word! + fullName: altTextTitle + summary: 'For EACH ITEM in the collection: Specifies a string that contains the title for the inline image.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'altTextTitle?: boolean;' + return: + type: boolean + - name: height + uid: 'word!Word.Interfaces.InlinePictureCollectionLoadOptions#height:member' + package: word! + fullName: height + summary: 'For EACH ITEM in the collection: Specifies a number that describes the height of the inline image.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'height?: boolean;' + return: + type: boolean + - name: hyperlink + uid: 'word!Word.Interfaces.InlinePictureCollectionLoadOptions#hyperlink:member' + package: word! + fullName: hyperlink + summary: >- + For EACH ITEM in the collection: Specifies a hyperlink on the image. Use a '\#' to separate the address part from + the optional location part. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'hyperlink?: boolean;' + return: + type: boolean + - name: lockAspectRatio + uid: 'word!Word.Interfaces.InlinePictureCollectionLoadOptions#lockAspectRatio:member' + package: word! + fullName: lockAspectRatio + summary: >- + For EACH ITEM in the collection: Specifies a value that indicates whether the inline image retains its original + proportions when you resize it. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lockAspectRatio?: boolean;' + return: + type: boolean + - name: paragraph + uid: 'word!Word.Interfaces.InlinePictureCollectionLoadOptions#paragraph:member' + package: word! + fullName: paragraph + summary: 'For EACH ITEM in the collection: Gets the parent paragraph that contains the inline image.' + remarks: '\[ [API set: WordApi 1.2](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'paragraph?: Word.Interfaces.ParagraphLoadOptions;' + return: + type: '' + - name: parentContentControl + uid: 'word!Word.Interfaces.InlinePictureCollectionLoadOptions#parentContentControl:member' + package: word! + fullName: parentContentControl + summary: >- + For EACH ITEM in the collection: Gets the content control that contains the inline image. Throws an `ItemNotFound` + error if there isn't a parent content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControl?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentContentControlOrNullObject + uid: 'word!Word.Interfaces.InlinePictureCollectionLoadOptions#parentContentControlOrNullObject:member' + package: word! + fullName: parentContentControlOrNullObject + summary: >- + For EACH ITEM in the collection: Gets the content control that contains the inline image. If there isn't a parent + content control, then this method will return an object with its `isNullObject` property set to `true`. + For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentTable + uid: 'word!Word.Interfaces.InlinePictureCollectionLoadOptions#parentTable:member' + package: word! + fullName: parentTable + summary: >- + For EACH ITEM in the collection: Gets the table that contains the inline image. Throws an `ItemNotFound` error if + it isn't contained in a table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTable?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: parentTableCell + uid: 'word!Word.Interfaces.InlinePictureCollectionLoadOptions#parentTableCell:member' + package: word! + fullName: parentTableCell + summary: >- + For EACH ITEM in the collection: Gets the table cell that contains the inline image. Throws an `ItemNotFound` + error if it isn't contained in a table cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableCell?: Word.Interfaces.TableCellLoadOptions;' + return: + type: '' + - name: parentTableCellOrNullObject + uid: 'word!Word.Interfaces.InlinePictureCollectionLoadOptions#parentTableCellOrNullObject:member' + package: word! + fullName: parentTableCellOrNullObject + summary: >- + For EACH ITEM in the collection: Gets the table cell that contains the inline image. If it isn't contained in a + table cell, then this method will return an object with its `isNullObject` property set to `true`. For + further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions;' + return: + type: '' + - name: parentTableOrNullObject + uid: 'word!Word.Interfaces.InlinePictureCollectionLoadOptions#parentTableOrNullObject:member' + package: word! + fullName: parentTableOrNullObject + summary: >- + For EACH ITEM in the collection: Gets the table that contains the inline image. If it isn't contained in a table, + then this method will return an object with its `isNullObject` property set to `true`. For further + information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableOrNullObject?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: width + uid: 'word!Word.Interfaces.InlinePictureCollectionLoadOptions#width:member' + package: word! + fullName: width + summary: 'For EACH ITEM in the collection: Specifies a number that describes the width of the inline image.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'width?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.inlinepicturecollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.inlinepicturecollectionupdatedata.yml new file mode 100644 index 0000000000..8853a679b5 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.inlinepicturecollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.InlinePictureCollectionUpdateData +uid: 'word!Word.Interfaces.InlinePictureCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.InlinePictureCollectionUpdateData +summary: >- + An interface for updating data on the `InlinePictureCollection` object, for use in `inlinePictureCollection.set({ ... + })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.InlinePictureCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.InlinePictureData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.inlinepicturedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.inlinepicturedata.yml new file mode 100644 index 0000000000..eb8aa42442 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.inlinepicturedata.yml @@ -0,0 +1,83 @@ +### YamlMime:TSType +name: Word.Interfaces.InlinePictureData +uid: 'word!Word.Interfaces.InlinePictureData:interface' +package: word! +fullName: Word.Interfaces.InlinePictureData +summary: An interface describing the data returned by calling `inlinePicture.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: altTextDescription + uid: 'word!Word.Interfaces.InlinePictureData#altTextDescription:member' + package: word! + fullName: altTextDescription + summary: Specifies a string that represents the alternative text associated with the inline image. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'altTextDescription?: string;' + return: + type: string + - name: altTextTitle + uid: 'word!Word.Interfaces.InlinePictureData#altTextTitle:member' + package: word! + fullName: altTextTitle + summary: Specifies a string that contains the title for the inline image. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'altTextTitle?: string;' + return: + type: string + - name: height + uid: 'word!Word.Interfaces.InlinePictureData#height:member' + package: word! + fullName: height + summary: Specifies a number that describes the height of the inline image. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'height?: number;' + return: + type: number + - name: hyperlink + uid: 'word!Word.Interfaces.InlinePictureData#hyperlink:member' + package: word! + fullName: hyperlink + summary: 'Specifies a hyperlink on the image. Use a ''\#'' to separate the address part from the optional location part.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'hyperlink?: string;' + return: + type: string + - name: lockAspectRatio + uid: 'word!Word.Interfaces.InlinePictureData#lockAspectRatio:member' + package: word! + fullName: lockAspectRatio + summary: Specifies a value that indicates whether the inline image retains its original proportions when you resize it. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lockAspectRatio?: boolean;' + return: + type: boolean + - name: width + uid: 'word!Word.Interfaces.InlinePictureData#width:member' + package: word! + fullName: width + summary: Specifies a number that describes the width of the inline image. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'width?: number;' + return: + type: number diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.inlinepictureloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.inlinepictureloadoptions.yml new file mode 100644 index 0000000000..b95d459367 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.inlinepictureloadoptions.yml @@ -0,0 +1,200 @@ +### YamlMime:TSType +name: Word.Interfaces.InlinePictureLoadOptions +uid: 'word!Word.Interfaces.InlinePictureLoadOptions:interface' +package: word! +fullName: Word.Interfaces.InlinePictureLoadOptions +summary: Represents an inline picture. +remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.InlinePictureLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: altTextDescription + uid: 'word!Word.Interfaces.InlinePictureLoadOptions#altTextDescription:member' + package: word! + fullName: altTextDescription + summary: Specifies a string that represents the alternative text associated with the inline image. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'altTextDescription?: boolean;' + return: + type: boolean + - name: altTextTitle + uid: 'word!Word.Interfaces.InlinePictureLoadOptions#altTextTitle:member' + package: word! + fullName: altTextTitle + summary: Specifies a string that contains the title for the inline image. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'altTextTitle?: boolean;' + return: + type: boolean + - name: height + uid: 'word!Word.Interfaces.InlinePictureLoadOptions#height:member' + package: word! + fullName: height + summary: Specifies a number that describes the height of the inline image. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'height?: boolean;' + return: + type: boolean + - name: hyperlink + uid: 'word!Word.Interfaces.InlinePictureLoadOptions#hyperlink:member' + package: word! + fullName: hyperlink + summary: 'Specifies a hyperlink on the image. Use a ''\#'' to separate the address part from the optional location part.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'hyperlink?: boolean;' + return: + type: boolean + - name: lockAspectRatio + uid: 'word!Word.Interfaces.InlinePictureLoadOptions#lockAspectRatio:member' + package: word! + fullName: lockAspectRatio + summary: Specifies a value that indicates whether the inline image retains its original proportions when you resize it. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lockAspectRatio?: boolean;' + return: + type: boolean + - name: paragraph + uid: 'word!Word.Interfaces.InlinePictureLoadOptions#paragraph:member' + package: word! + fullName: paragraph + summary: Gets the parent paragraph that contains the inline image. + remarks: '\[ [API set: WordApi 1.2](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'paragraph?: Word.Interfaces.ParagraphLoadOptions;' + return: + type: '' + - name: parentContentControl + uid: 'word!Word.Interfaces.InlinePictureLoadOptions#parentContentControl:member' + package: word! + fullName: parentContentControl + summary: >- + Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent + content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControl?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentContentControlOrNullObject + uid: 'word!Word.Interfaces.InlinePictureLoadOptions#parentContentControlOrNullObject:member' + package: word! + fullName: parentContentControlOrNullObject + summary: >- + Gets the content control that contains the inline image. If there isn't a parent content control, then this method + will return an object with its `isNullObject` property set to `true`. For further information, see + [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentTable + uid: 'word!Word.Interfaces.InlinePictureLoadOptions#parentTable:member' + package: word! + fullName: parentTable + summary: Gets the table that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTable?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: parentTableCell + uid: 'word!Word.Interfaces.InlinePictureLoadOptions#parentTableCell:member' + package: word! + fullName: parentTableCell + summary: >- + Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a + table cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableCell?: Word.Interfaces.TableCellLoadOptions;' + return: + type: '' + - name: parentTableCellOrNullObject + uid: 'word!Word.Interfaces.InlinePictureLoadOptions#parentTableCellOrNullObject:member' + package: word! + fullName: parentTableCellOrNullObject + summary: >- + Gets the table cell that contains the inline image. If it isn't contained in a table cell, then this method will + return an object with its `isNullObject` property set to `true`. For further information, see + [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions;' + return: + type: '' + - name: parentTableOrNullObject + uid: 'word!Word.Interfaces.InlinePictureLoadOptions#parentTableOrNullObject:member' + package: word! + fullName: parentTableOrNullObject + summary: >- + Gets the table that contains the inline image. If it isn't contained in a table, then this method will return an + object with its `isNullObject` property set to `true`. For further information, see [*OrNullObject + methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableOrNullObject?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: width + uid: 'word!Word.Interfaces.InlinePictureLoadOptions#width:member' + package: word! + fullName: width + summary: Specifies a number that describes the width of the inline image. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'width?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.inlinepictureupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.inlinepictureupdatedata.yml new file mode 100644 index 0000000000..2a8270e655 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.inlinepictureupdatedata.yml @@ -0,0 +1,83 @@ +### YamlMime:TSType +name: Word.Interfaces.InlinePictureUpdateData +uid: 'word!Word.Interfaces.InlinePictureUpdateData:interface' +package: word! +fullName: Word.Interfaces.InlinePictureUpdateData +summary: 'An interface for updating data on the `InlinePicture` object, for use in `inlinePicture.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: altTextDescription + uid: 'word!Word.Interfaces.InlinePictureUpdateData#altTextDescription:member' + package: word! + fullName: altTextDescription + summary: Specifies a string that represents the alternative text associated with the inline image. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'altTextDescription?: string;' + return: + type: string + - name: altTextTitle + uid: 'word!Word.Interfaces.InlinePictureUpdateData#altTextTitle:member' + package: word! + fullName: altTextTitle + summary: Specifies a string that contains the title for the inline image. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'altTextTitle?: string;' + return: + type: string + - name: height + uid: 'word!Word.Interfaces.InlinePictureUpdateData#height:member' + package: word! + fullName: height + summary: Specifies a number that describes the height of the inline image. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'height?: number;' + return: + type: number + - name: hyperlink + uid: 'word!Word.Interfaces.InlinePictureUpdateData#hyperlink:member' + package: word! + fullName: hyperlink + summary: 'Specifies a hyperlink on the image. Use a ''\#'' to separate the address part from the optional location part.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'hyperlink?: string;' + return: + type: string + - name: lockAspectRatio + uid: 'word!Word.Interfaces.InlinePictureUpdateData#lockAspectRatio:member' + package: word! + fullName: lockAspectRatio + summary: Specifies a value that indicates whether the inline image retains its original proportions when you resize it. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lockAspectRatio?: boolean;' + return: + type: boolean + - name: width + uid: 'word!Word.Interfaces.InlinePictureUpdateData#width:member' + package: word! + fullName: width + summary: Specifies a number that describes the width of the inline image. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'width?: number;' + return: + type: number diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listcollectiondata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listcollectiondata.yml new file mode 100644 index 0000000000..b42cc6eb65 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.ListCollectionData +uid: 'word!Word.Interfaces.ListCollectionData:interface' +package: word! +fullName: Word.Interfaces.ListCollectionData +summary: An interface describing the data returned by calling `listCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ListCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ListData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listcollectionloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listcollectionloadoptions.yml new file mode 100644 index 0000000000..0fb67d48eb --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listcollectionloadoptions.yml @@ -0,0 +1,65 @@ +### YamlMime:TSType +name: Word.Interfaces.ListCollectionLoadOptions +uid: 'word!Word.Interfaces.ListCollectionLoadOptions:interface' +package: word! +fullName: Word.Interfaces.ListCollectionLoadOptions +summary: 'Contains a collection of [Word.List](xref:word!Word.List:class) objects.' +remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.ListCollectionLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: id + uid: 'word!Word.Interfaces.ListCollectionLoadOptions#id:member' + package: word! + fullName: id + summary: 'For EACH ITEM in the collection: Gets the list''s id.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'id?: boolean;' + return: + type: boolean + - name: levelExistences + uid: 'word!Word.Interfaces.ListCollectionLoadOptions#levelExistences:member' + package: word! + fullName: levelExistences + summary: >- + For EACH ITEM in the collection: Checks whether each of the 9 levels exists in the list. A true value indicates + the level exists, which means there is at least one list item at that level. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'levelExistences?: boolean;' + return: + type: boolean + - name: levelTypes + uid: 'word!Word.Interfaces.ListCollectionLoadOptions#levelTypes:member' + package: word! + fullName: levelTypes + summary: >- + For EACH ITEM in the collection: Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or + 'Picture'. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'levelTypes?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listcollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listcollectionupdatedata.yml new file mode 100644 index 0000000000..2501a4d865 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listcollectionupdatedata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.ListCollectionUpdateData +uid: 'word!Word.Interfaces.ListCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.ListCollectionUpdateData +summary: 'An interface for updating data on the `ListCollection` object, for use in `listCollection.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ListCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ListData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listdata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listdata.yml new file mode 100644 index 0000000000..95646b8086 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listdata.yml @@ -0,0 +1,61 @@ +### YamlMime:TSType +name: Word.Interfaces.ListData +uid: 'word!Word.Interfaces.ListData:interface' +package: word! +fullName: Word.Interfaces.ListData +summary: An interface describing the data returned by calling `list.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: id + uid: 'word!Word.Interfaces.ListData#id:member' + package: word! + fullName: id + summary: Gets the list's id. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'id?: number;' + return: + type: number + - name: levelExistences + uid: 'word!Word.Interfaces.ListData#levelExistences:member' + package: word! + fullName: levelExistences + summary: >- + Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there + is at least one list item at that level. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'levelExistences?: boolean[];' + return: + type: 'boolean[]' + - name: levelTypes + uid: 'word!Word.Interfaces.ListData#levelTypes:member' + package: word! + fullName: levelTypes + summary: 'Gets all 9 level types in the list. Each type can be ''Bullet'', ''Number'', or ''Picture''.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'levelTypes?: Word.ListLevelType[];' + return: + type: '[]' + - name: paragraphs + uid: 'word!Word.Interfaces.ListData#paragraphs:member' + package: word! + fullName: paragraphs + summary: Gets paragraphs in the list. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'paragraphs?: Word.Interfaces.ParagraphData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listitemdata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listitemdata.yml new file mode 100644 index 0000000000..ddcd186071 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listitemdata.yml @@ -0,0 +1,47 @@ +### YamlMime:TSType +name: Word.Interfaces.ListItemData +uid: 'word!Word.Interfaces.ListItemData:interface' +package: word! +fullName: Word.Interfaces.ListItemData +summary: An interface describing the data returned by calling `listItem.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: level + uid: 'word!Word.Interfaces.ListItemData#level:member' + package: word! + fullName: level + summary: Specifies the level of the item in the list. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'level?: number;' + return: + type: number + - name: listString + uid: 'word!Word.Interfaces.ListItemData#listString:member' + package: word! + fullName: listString + summary: 'Gets the list item bullet, number, or picture as a string.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'listString?: string;' + return: + type: string + - name: siblingIndex + uid: 'word!Word.Interfaces.ListItemData#siblingIndex:member' + package: word! + fullName: siblingIndex + summary: Gets the list item order number in relation to its siblings. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'siblingIndex?: number;' + return: + type: number diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listitemloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listitemloadoptions.yml new file mode 100644 index 0000000000..65e6e11fe4 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listitemloadoptions.yml @@ -0,0 +1,61 @@ +### YamlMime:TSType +name: Word.Interfaces.ListItemLoadOptions +uid: 'word!Word.Interfaces.ListItemLoadOptions:interface' +package: word! +fullName: Word.Interfaces.ListItemLoadOptions +summary: Represents the paragraph list item format. +remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.ListItemLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: level + uid: 'word!Word.Interfaces.ListItemLoadOptions#level:member' + package: word! + fullName: level + summary: Specifies the level of the item in the list. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'level?: boolean;' + return: + type: boolean + - name: listString + uid: 'word!Word.Interfaces.ListItemLoadOptions#listString:member' + package: word! + fullName: listString + summary: 'Gets the list item bullet, number, or picture as a string.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'listString?: boolean;' + return: + type: boolean + - name: siblingIndex + uid: 'word!Word.Interfaces.ListItemLoadOptions#siblingIndex:member' + package: word! + fullName: siblingIndex + summary: Gets the list item order number in relation to its siblings. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'siblingIndex?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listitemupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listitemupdatedata.yml new file mode 100644 index 0000000000..5026c14a26 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listitemupdatedata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.ListItemUpdateData +uid: 'word!Word.Interfaces.ListItemUpdateData:interface' +package: word! +fullName: Word.Interfaces.ListItemUpdateData +summary: 'An interface for updating data on the `ListItem` object, for use in `listItem.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: level + uid: 'word!Word.Interfaces.ListItemUpdateData#level:member' + package: word! + fullName: level + summary: Specifies the level of the item in the list. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'level?: number;' + return: + type: number diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listlevelcollectiondata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listlevelcollectiondata.yml new file mode 100644 index 0000000000..3eec6a813a --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listlevelcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.ListLevelCollectionData +uid: 'word!Word.Interfaces.ListLevelCollectionData:interface' +package: word! +fullName: Word.Interfaces.ListLevelCollectionData +summary: An interface describing the data returned by calling `listLevelCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ListLevelCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ListLevelData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listlevelcollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listlevelcollectionupdatedata.yml new file mode 100644 index 0000000000..d1ca10d492 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listlevelcollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.ListLevelCollectionUpdateData +uid: 'word!Word.Interfaces.ListLevelCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.ListLevelCollectionUpdateData +summary: >- + An interface for updating data on the `ListLevelCollection` object, for use in `listLevelCollection.set({ ... })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ListLevelCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ListLevelData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listleveldata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listleveldata.yml new file mode 100644 index 0000000000..6ed0e0e3f8 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listleveldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ListLevelData +uid: 'word!Word.Interfaces.ListLevelData:interface' +package: word! +fullName: Word.Interfaces.ListLevelData +summary: An interface describing the data returned by calling `listLevel.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listlevelupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listlevelupdatedata.yml new file mode 100644 index 0000000000..77e40b1020 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listlevelupdatedata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ListLevelUpdateData +uid: 'word!Word.Interfaces.ListLevelUpdateData:interface' +package: word! +fullName: Word.Interfaces.ListLevelUpdateData +summary: 'An interface for updating data on the `ListLevel` object, for use in `listLevel.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listloadoptions.yml new file mode 100644 index 0000000000..9a983e534c --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listloadoptions.yml @@ -0,0 +1,63 @@ +### YamlMime:TSType +name: Word.Interfaces.ListLoadOptions +uid: 'word!Word.Interfaces.ListLoadOptions:interface' +package: word! +fullName: Word.Interfaces.ListLoadOptions +summary: 'Contains a collection of [Word.Paragraph](xref:word!Word.Paragraph:class) objects.' +remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.ListLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: id + uid: 'word!Word.Interfaces.ListLoadOptions#id:member' + package: word! + fullName: id + summary: Gets the list's id. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'id?: boolean;' + return: + type: boolean + - name: levelExistences + uid: 'word!Word.Interfaces.ListLoadOptions#levelExistences:member' + package: word! + fullName: levelExistences + summary: >- + Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there + is at least one list item at that level. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'levelExistences?: boolean;' + return: + type: boolean + - name: levelTypes + uid: 'word!Word.Interfaces.ListLoadOptions#levelTypes:member' + package: word! + fullName: levelTypes + summary: 'Gets all 9 level types in the list. Each type can be ''Bullet'', ''Number'', or ''Picture''.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'levelTypes?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listtemplatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listtemplatedata.yml new file mode 100644 index 0000000000..7b7cdbed1a --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listtemplatedata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ListTemplateData +uid: 'word!Word.Interfaces.ListTemplateData:interface' +package: word! +fullName: Word.Interfaces.ListTemplateData +summary: An interface describing the data returned by calling `listTemplate.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listtemplateupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listtemplateupdatedata.yml new file mode 100644 index 0000000000..ce2aac5914 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.listtemplateupdatedata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ListTemplateUpdateData +uid: 'word!Word.Interfaces.ListTemplateUpdateData:interface' +package: word! +fullName: Word.Interfaces.ListTemplateUpdateData +summary: 'An interface for updating data on the `ListTemplate` object, for use in `listTemplate.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.noteitemcollectiondata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.noteitemcollectiondata.yml new file mode 100644 index 0000000000..9639e0c596 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.noteitemcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.NoteItemCollectionData +uid: 'word!Word.Interfaces.NoteItemCollectionData:interface' +package: word! +fullName: Word.Interfaces.NoteItemCollectionData +summary: An interface describing the data returned by calling `noteItemCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.NoteItemCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.NoteItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.noteitemcollectionloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.noteitemcollectionloadoptions.yml new file mode 100644 index 0000000000..15c279fc9b --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.noteitemcollectionloadoptions.yml @@ -0,0 +1,63 @@ +### YamlMime:TSType +name: Word.Interfaces.NoteItemCollectionLoadOptions +uid: 'word!Word.Interfaces.NoteItemCollectionLoadOptions:interface' +package: word! +fullName: Word.Interfaces.NoteItemCollectionLoadOptions +summary: 'Contains a collection of [Word.NoteItem](xref:word!Word.NoteItem:class) objects.' +remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.NoteItemCollectionLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: body + uid: 'word!Word.Interfaces.NoteItemCollectionLoadOptions#body:member' + package: word! + fullName: body + summary: >- + For EACH ITEM in the collection: Represents the body object of the note item. It's the portion of the text within + the footnote or endnote. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'body?: Word.Interfaces.BodyLoadOptions;' + return: + type: '' + - name: reference + uid: 'word!Word.Interfaces.NoteItemCollectionLoadOptions#reference:member' + package: word! + fullName: reference + summary: 'For EACH ITEM in the collection: Represents a footnote or endnote reference in the main document.' + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'reference?: Word.Interfaces.RangeLoadOptions;' + return: + type: '' + - name: type + uid: 'word!Word.Interfaces.NoteItemCollectionLoadOptions#type:member' + package: word! + fullName: type + summary: 'For EACH ITEM in the collection: Represents the note item type: footnote or endnote.' + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.noteitemcollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.noteitemcollectionupdatedata.yml new file mode 100644 index 0000000000..a184a2dba9 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.noteitemcollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.NoteItemCollectionUpdateData +uid: 'word!Word.Interfaces.NoteItemCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.NoteItemCollectionUpdateData +summary: >- + An interface for updating data on the `NoteItemCollection` object, for use in `noteItemCollection.set({ ... })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.NoteItemCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.NoteItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.noteitemdata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.noteitemdata.yml new file mode 100644 index 0000000000..33eb9a73c4 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.noteitemdata.yml @@ -0,0 +1,47 @@ +### YamlMime:TSType +name: Word.Interfaces.NoteItemData +uid: 'word!Word.Interfaces.NoteItemData:interface' +package: word! +fullName: Word.Interfaces.NoteItemData +summary: An interface describing the data returned by calling `noteItem.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: body + uid: 'word!Word.Interfaces.NoteItemData#body:member' + package: word! + fullName: body + summary: Represents the body object of the note item. It's the portion of the text within the footnote or endnote. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'body?: Word.Interfaces.BodyData;' + return: + type: '' + - name: reference + uid: 'word!Word.Interfaces.NoteItemData#reference:member' + package: word! + fullName: reference + summary: Represents a footnote or endnote reference in the main document. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'reference?: Word.Interfaces.RangeData;' + return: + type: '' + - name: type + uid: 'word!Word.Interfaces.NoteItemData#type:member' + package: word! + fullName: type + summary: 'Represents the note item type: footnote or endnote.' + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type?: Word.NoteItemType | "Footnote" | "Endnote";' + return: + type: ' | "Footnote" | "Endnote"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.noteitemloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.noteitemloadoptions.yml new file mode 100644 index 0000000000..31a3e6633b --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.noteitemloadoptions.yml @@ -0,0 +1,61 @@ +### YamlMime:TSType +name: Word.Interfaces.NoteItemLoadOptions +uid: 'word!Word.Interfaces.NoteItemLoadOptions:interface' +package: word! +fullName: Word.Interfaces.NoteItemLoadOptions +summary: Represents a footnote or endnote. +remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.NoteItemLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: body + uid: 'word!Word.Interfaces.NoteItemLoadOptions#body:member' + package: word! + fullName: body + summary: Represents the body object of the note item. It's the portion of the text within the footnote or endnote. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'body?: Word.Interfaces.BodyLoadOptions;' + return: + type: '' + - name: reference + uid: 'word!Word.Interfaces.NoteItemLoadOptions#reference:member' + package: word! + fullName: reference + summary: Represents a footnote or endnote reference in the main document. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'reference?: Word.Interfaces.RangeLoadOptions;' + return: + type: '' + - name: type + uid: 'word!Word.Interfaces.NoteItemLoadOptions#type:member' + package: word! + fullName: type + summary: 'Represents the note item type: footnote or endnote.' + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.noteitemupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.noteitemupdatedata.yml new file mode 100644 index 0000000000..fd8171bd32 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.noteitemupdatedata.yml @@ -0,0 +1,35 @@ +### YamlMime:TSType +name: Word.Interfaces.NoteItemUpdateData +uid: 'word!Word.Interfaces.NoteItemUpdateData:interface' +package: word! +fullName: Word.Interfaces.NoteItemUpdateData +summary: 'An interface for updating data on the `NoteItem` object, for use in `noteItem.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: body + uid: 'word!Word.Interfaces.NoteItemUpdateData#body:member' + package: word! + fullName: body + summary: Represents the body object of the note item. It's the portion of the text within the footnote or endnote. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'body?: Word.Interfaces.BodyUpdateData;' + return: + type: '' + - name: reference + uid: 'word!Word.Interfaces.NoteItemUpdateData#reference:member' + package: word! + fullName: reference + summary: Represents a footnote or endnote reference in the main document. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'reference?: Word.Interfaces.RangeUpdateData;' + return: + type: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphcollectiondata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphcollectiondata.yml new file mode 100644 index 0000000000..fe175f74fa --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.ParagraphCollectionData +uid: 'word!Word.Interfaces.ParagraphCollectionData:interface' +package: word! +fullName: Word.Interfaces.ParagraphCollectionData +summary: An interface describing the data returned by calling `paragraphCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ParagraphCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ParagraphData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphcollectionloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphcollectionloadoptions.yml new file mode 100644 index 0000000000..bdc0d74c99 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphcollectionloadoptions.yml @@ -0,0 +1,426 @@ +### YamlMime:TSType +name: Word.Interfaces.ParagraphCollectionLoadOptions +uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions:interface' +package: word! +fullName: Word.Interfaces.ParagraphCollectionLoadOptions +summary: 'Contains a collection of [Word.Paragraph](xref:word!Word.Paragraph:class) objects.' +remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: alignment + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#alignment:member' + package: word! + fullName: alignment + summary: >- + For EACH ITEM in the collection: Specifies the alignment for a paragraph. The value can be 'left', 'centered', + 'right', or 'justified'. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'alignment?: boolean;' + return: + type: boolean + - name: firstLineIndent + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#firstLineIndent:member' + package: word! + fullName: firstLineIndent + summary: >- + For EACH ITEM in the collection: Specifies the value, in points, for a first line or hanging indent. Use a + positive value to set a first-line indent, and use a negative value to set a hanging indent. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'firstLineIndent?: boolean;' + return: + type: boolean + - name: font + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#font:member' + package: word! + fullName: font + summary: >- + For EACH ITEM in the collection: Gets the text format of the paragraph. Use this to get and set font name, size, + color, and other properties. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontLoadOptions;' + return: + type: '' + - name: isLastParagraph + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#isLastParagraph:member' + package: word! + fullName: isLastParagraph + summary: 'For EACH ITEM in the collection: Indicates the paragraph is the last one inside its parent body.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'isLastParagraph?: boolean;' + return: + type: boolean + - name: isListItem + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#isListItem:member' + package: word! + fullName: isListItem + summary: 'For EACH ITEM in the collection: Checks whether the paragraph is a list item.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'isListItem?: boolean;' + return: + type: boolean + - name: leftIndent + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#leftIndent:member' + package: word! + fullName: leftIndent + summary: 'For EACH ITEM in the collection: Specifies the left indent value, in points, for the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'leftIndent?: boolean;' + return: + type: boolean + - name: lineSpacing + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#lineSpacing:member' + package: word! + fullName: lineSpacing + summary: >- + For EACH ITEM in the collection: Specifies the line spacing, in points, for the specified paragraph. In the Word + UI, this value is divided by 12. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lineSpacing?: boolean;' + return: + type: boolean + - name: lineUnitAfter + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#lineUnitAfter:member' + package: word! + fullName: lineUnitAfter + summary: 'For EACH ITEM in the collection: Specifies the amount of spacing, in grid lines, after the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lineUnitAfter?: boolean;' + return: + type: boolean + - name: lineUnitBefore + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#lineUnitBefore:member' + package: word! + fullName: lineUnitBefore + summary: 'For EACH ITEM in the collection: Specifies the amount of spacing, in grid lines, before the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lineUnitBefore?: boolean;' + return: + type: boolean + - name: list + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#list:member' + package: word! + fullName: list + summary: >- + For EACH ITEM in the collection: Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if + the paragraph isn't in a list. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'list?: Word.Interfaces.ListLoadOptions;' + return: + type: '' + - name: listItem + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#listItem:member' + package: word! + fullName: listItem + summary: >- + For EACH ITEM in the collection: Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the + paragraph isn't part of a list. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'listItem?: Word.Interfaces.ListItemLoadOptions;' + return: + type: '' + - name: listItemOrNullObject + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#listItemOrNullObject:member' + package: word! + fullName: listItemOrNullObject + summary: >- + For EACH ITEM in the collection: Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then + this method will return an object with its `isNullObject` property set to `true`. For further information, + see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions;' + return: + type: '' + - name: listOrNullObject + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#listOrNullObject:member' + package: word! + fullName: listOrNullObject + summary: >- + For EACH ITEM in the collection: Gets the List to which this paragraph belongs. If the paragraph isn't in a list, + then this method will return an object with its `isNullObject` property set to `true`. For further + information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'listOrNullObject?: Word.Interfaces.ListLoadOptions;' + return: + type: '' + - name: outlineLevel + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#outlineLevel:member' + package: word! + fullName: outlineLevel + summary: 'For EACH ITEM in the collection: Specifies the outline level for the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'outlineLevel?: boolean;' + return: + type: boolean + - name: parentBody + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#parentBody:member' + package: word! + fullName: parentBody + summary: 'For EACH ITEM in the collection: Gets the parent body of the paragraph.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentBody?: Word.Interfaces.BodyLoadOptions;' + return: + type: '' + - name: parentContentControl + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#parentContentControl:member' + package: word! + fullName: parentContentControl + summary: >- + For EACH ITEM in the collection: Gets the content control that contains the paragraph. Throws an `ItemNotFound` + error if there isn't a parent content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControl?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentContentControlOrNullObject + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#parentContentControlOrNullObject:member' + package: word! + fullName: parentContentControlOrNullObject + summary: >- + For EACH ITEM in the collection: Gets the content control that contains the paragraph. If there isn't a parent + content control, then this method will return an object with its `isNullObject` property set to `true`. + For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentTable + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#parentTable:member' + package: word! + fullName: parentTable + summary: >- + For EACH ITEM in the collection: Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it + isn't contained in a table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTable?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: parentTableCell + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#parentTableCell:member' + package: word! + fullName: parentTableCell + summary: >- + For EACH ITEM in the collection: Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error + if it isn't contained in a table cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableCell?: Word.Interfaces.TableCellLoadOptions;' + return: + type: '' + - name: parentTableCellOrNullObject + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#parentTableCellOrNullObject:member' + package: word! + fullName: parentTableCellOrNullObject + summary: >- + For EACH ITEM in the collection: Gets the table cell that contains the paragraph. If it isn't contained in a table + cell, then this method will return an object with its `isNullObject` property set to `true`. For further + information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions;' + return: + type: '' + - name: parentTableOrNullObject + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#parentTableOrNullObject:member' + package: word! + fullName: parentTableOrNullObject + summary: >- + For EACH ITEM in the collection: Gets the table that contains the paragraph. If it isn't contained in a table, + then this method will return an object with its `isNullObject` property set to `true`. For further + information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableOrNullObject?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: rightIndent + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#rightIndent:member' + package: word! + fullName: rightIndent + summary: 'For EACH ITEM in the collection: Specifies the right indent value, in points, for the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'rightIndent?: boolean;' + return: + type: boolean + - name: spaceAfter + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#spaceAfter:member' + package: word! + fullName: spaceAfter + summary: 'For EACH ITEM in the collection: Specifies the spacing, in points, after the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'spaceAfter?: boolean;' + return: + type: boolean + - name: spaceBefore + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#spaceBefore:member' + package: word! + fullName: spaceBefore + summary: 'For EACH ITEM in the collection: Specifies the spacing, in points, before the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'spaceBefore?: boolean;' + return: + type: boolean + - name: style + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#style:member' + package: word! + fullName: style + summary: >- + For EACH ITEM in the collection: Specifies the style name for the paragraph. Use this property for custom styles + and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" + property. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'style?: boolean;' + return: + type: boolean + - name: styleBuiltIn + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#styleBuiltIn:member' + package: word! + fullName: styleBuiltIn + summary: >- + For EACH ITEM in the collection: Specifies the built-in style name for the paragraph. Use this property for + built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" + property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleBuiltIn?: boolean;' + return: + type: boolean + - name: tableNestingLevel + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#tableNestingLevel:member' + package: word! + fullName: tableNestingLevel + summary: >- + For EACH ITEM in the collection: Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a + table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'tableNestingLevel?: boolean;' + return: + type: boolean + - name: text + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#text:member' + package: word! + fullName: text + summary: 'For EACH ITEM in the collection: Gets the text of the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'text?: boolean;' + return: + type: boolean + - name: uniqueLocalId + uid: 'word!Word.Interfaces.ParagraphCollectionLoadOptions#uniqueLocalId:member' + package: word! + fullName: uniqueLocalId + summary: >- + For EACH ITEM in the collection: Gets a string that represents the paragraph identifier in the current session. ID + is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'uniqueLocalId?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphcollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphcollectionupdatedata.yml new file mode 100644 index 0000000000..677e313a55 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphcollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.ParagraphCollectionUpdateData +uid: 'word!Word.Interfaces.ParagraphCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.ParagraphCollectionUpdateData +summary: >- + An interface for updating data on the `ParagraphCollection` object, for use in `paragraphCollection.set({ ... })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ParagraphCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ParagraphData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphdata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphdata.yml new file mode 100644 index 0000000000..4fd5f1f902 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphdata.yml @@ -0,0 +1,350 @@ +### YamlMime:TSType +name: Word.Interfaces.ParagraphData +uid: 'word!Word.Interfaces.ParagraphData:interface' +package: word! +fullName: Word.Interfaces.ParagraphData +summary: An interface describing the data returned by calling `paragraph.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: alignment + uid: 'word!Word.Interfaces.ParagraphData#alignment:member' + package: word! + fullName: alignment + summary: 'Specifies the alignment for a paragraph. The value can be ''left'', ''centered'', ''right'', or ''justified''.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified";' + return: + type: ' | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"' + - name: fields + uid: 'word!Word.Interfaces.ParagraphData#fields:member' + package: word! + fullName: fields + summary: Gets the collection of fields in the paragraph. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'fields?: Word.Interfaces.FieldData[];' + return: + type: '[]' + - name: firstLineIndent + uid: 'word!Word.Interfaces.ParagraphData#firstLineIndent:member' + package: word! + fullName: firstLineIndent + summary: >- + Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line + indent, and use a negative value to set a hanging indent. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'firstLineIndent?: number;' + return: + type: number + - name: font + uid: 'word!Word.Interfaces.ParagraphData#font:member' + package: word! + fullName: font + summary: 'Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontData;' + return: + type: '' + - name: inlinePictures + uid: 'word!Word.Interfaces.ParagraphData#inlinePictures:member' + package: word! + fullName: inlinePictures + summary: Gets the collection of InlinePicture objects in the paragraph. The collection doesn't include floating images. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'inlinePictures?: Word.Interfaces.InlinePictureData[];' + return: + type: '[]' + - name: isLastParagraph + uid: 'word!Word.Interfaces.ParagraphData#isLastParagraph:member' + package: word! + fullName: isLastParagraph + summary: Indicates the paragraph is the last one inside its parent body. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'isLastParagraph?: boolean;' + return: + type: boolean + - name: isListItem + uid: 'word!Word.Interfaces.ParagraphData#isListItem:member' + package: word! + fullName: isListItem + summary: Checks whether the paragraph is a list item. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'isListItem?: boolean;' + return: + type: boolean + - name: leftIndent + uid: 'word!Word.Interfaces.ParagraphData#leftIndent:member' + package: word! + fullName: leftIndent + summary: 'Specifies the left indent value, in points, for the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'leftIndent?: number;' + return: + type: number + - name: lineSpacing + uid: 'word!Word.Interfaces.ParagraphData#lineSpacing:member' + package: word! + fullName: lineSpacing + summary: 'Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lineSpacing?: number;' + return: + type: number + - name: lineUnitAfter + uid: 'word!Word.Interfaces.ParagraphData#lineUnitAfter:member' + package: word! + fullName: lineUnitAfter + summary: 'Specifies the amount of spacing, in grid lines, after the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lineUnitAfter?: number;' + return: + type: number + - name: lineUnitBefore + uid: 'word!Word.Interfaces.ParagraphData#lineUnitBefore:member' + package: word! + fullName: lineUnitBefore + summary: 'Specifies the amount of spacing, in grid lines, before the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lineUnitBefore?: number;' + return: + type: number + - name: listItem + uid: 'word!Word.Interfaces.ParagraphData#listItem:member' + package: word! + fullName: listItem + summary: Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'listItem?: Word.Interfaces.ListItemData;' + return: + type: '' + - name: listItemOrNullObject + uid: 'word!Word.Interfaces.ParagraphData#listItemOrNullObject:member' + package: word! + fullName: listItemOrNullObject + summary: >- + Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object + with its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'listItemOrNullObject?: Word.Interfaces.ListItemData;' + return: + type: '' + - name: outlineLevel + uid: 'word!Word.Interfaces.ParagraphData#outlineLevel:member' + package: word! + fullName: outlineLevel + summary: Specifies the outline level for the paragraph. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'outlineLevel?: number;' + return: + type: number + - name: rightIndent + uid: 'word!Word.Interfaces.ParagraphData#rightIndent:member' + package: word! + fullName: rightIndent + summary: 'Specifies the right indent value, in points, for the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'rightIndent?: number;' + return: + type: number + - name: spaceAfter + uid: 'word!Word.Interfaces.ParagraphData#spaceAfter:member' + package: word! + fullName: spaceAfter + summary: 'Specifies the spacing, in points, after the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'spaceAfter?: number;' + return: + type: number + - name: spaceBefore + uid: 'word!Word.Interfaces.ParagraphData#spaceBefore:member' + package: word! + fullName: spaceBefore + summary: 'Specifies the spacing, in points, before the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'spaceBefore?: number;' + return: + type: number + - name: style + uid: 'word!Word.Interfaces.ParagraphData#style:member' + package: word! + fullName: style + summary: >- + Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use + the built-in styles that are portable between locales, see the "styleBuiltIn" property. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'style?: string;' + return: + type: string + - name: styleBuiltIn + uid: 'word!Word.Interfaces.ParagraphData#styleBuiltIn:member' + package: word! + fullName: styleBuiltIn + summary: >- + Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable + between locales. To use custom styles or localized style names, see the "style" property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | + "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | + "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | + "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | + "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | + "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | + "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" + | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" + | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" + | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | + "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" + | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | + "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | + "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | + "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | + "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" + | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | + "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | + "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | + "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | + "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | + "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | + "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | + "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + return: + type: >- + | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | + "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | + "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | + "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | + "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | + "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | + "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | + "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | + "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | + "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | + "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | + "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | + "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" + | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" + | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | + "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | + "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | + "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | + "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | + "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | + "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | + "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | + "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | + "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | + "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6" + - name: tableNestingLevel + uid: 'word!Word.Interfaces.ParagraphData#tableNestingLevel:member' + package: word! + fullName: tableNestingLevel + summary: Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'tableNestingLevel?: number;' + return: + type: number + - name: text + uid: 'word!Word.Interfaces.ParagraphData#text:member' + package: word! + fullName: text + summary: Gets the text of the paragraph. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'text?: string;' + return: + type: string + - name: uniqueLocalId + uid: 'word!Word.Interfaces.ParagraphData#uniqueLocalId:member' + package: word! + fullName: uniqueLocalId + summary: >- + Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID + format without curly braces and differs across sessions and coauthors. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'uniqueLocalId?: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphformatdata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphformatdata.yml new file mode 100644 index 0000000000..9a95f9f920 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphformatdata.yml @@ -0,0 +1,193 @@ +### YamlMime:TSType +name: Word.Interfaces.ParagraphFormatData +uid: 'word!Word.Interfaces.ParagraphFormatData:interface' +package: word! +fullName: Word.Interfaces.ParagraphFormatData +summary: An interface describing the data returned by calling `paragraphFormat.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: alignment + uid: 'word!Word.Interfaces.ParagraphFormatData#alignment:member' + package: word! + fullName: alignment + summary: Specifies the alignment for the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified";' + return: + type: ' | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"' + - name: firstLineIndent + uid: 'word!Word.Interfaces.ParagraphFormatData#firstLineIndent:member' + package: word! + fullName: firstLineIndent + summary: >- + Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line + indent, and use a negative value to set a hanging indent. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'firstLineIndent?: number;' + return: + type: number + - name: keepTogether + uid: 'word!Word.Interfaces.ParagraphFormatData#keepTogether:member' + package: word! + fullName: keepTogether + summary: >- + Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates + the document. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'keepTogether?: boolean;' + return: + type: boolean + - name: keepWithNext + uid: 'word!Word.Interfaces.ParagraphFormatData#keepWithNext:member' + package: word! + fullName: keepWithNext + summary: >- + Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft + Word repaginates the document. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'keepWithNext?: boolean;' + return: + type: boolean + - name: leftIndent + uid: 'word!Word.Interfaces.ParagraphFormatData#leftIndent:member' + package: word! + fullName: leftIndent + summary: Specifies the left indent. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'leftIndent?: number;' + return: + type: number + - name: lineSpacing + uid: 'word!Word.Interfaces.ParagraphFormatData#lineSpacing:member' + package: word! + fullName: lineSpacing + summary: Specifies the line spacing (in points) for the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lineSpacing?: number;' + return: + type: number + - name: lineUnitAfter + uid: 'word!Word.Interfaces.ParagraphFormatData#lineUnitAfter:member' + package: word! + fullName: lineUnitAfter + summary: Specifies the amount of spacing (in gridlines) after the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lineUnitAfter?: number;' + return: + type: number + - name: lineUnitBefore + uid: 'word!Word.Interfaces.ParagraphFormatData#lineUnitBefore:member' + package: word! + fullName: lineUnitBefore + summary: Specifies the amount of spacing (in gridlines) before the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lineUnitBefore?: number;' + return: + type: number + - name: mirrorIndents + uid: 'word!Word.Interfaces.ParagraphFormatData#mirrorIndents:member' + package: word! + fullName: mirrorIndents + summary: Specifies whether left and right indents are the same width. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'mirrorIndents?: boolean;' + return: + type: boolean + - name: outlineLevel + uid: 'word!Word.Interfaces.ParagraphFormatData#outlineLevel:member' + package: word! + fullName: outlineLevel + summary: Specifies the outline level for the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + outlineLevel?: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | + "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | + "OutlineLevelBodyText"; + return: + type: >- + | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | + "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | + "OutlineLevelBodyText" + - name: rightIndent + uid: 'word!Word.Interfaces.ParagraphFormatData#rightIndent:member' + package: word! + fullName: rightIndent + summary: Specifies the right indent (in points) for the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'rightIndent?: number;' + return: + type: number + - name: spaceAfter + uid: 'word!Word.Interfaces.ParagraphFormatData#spaceAfter:member' + package: word! + fullName: spaceAfter + summary: Specifies the amount of spacing (in points) after the specified paragraph or text column. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'spaceAfter?: number;' + return: + type: number + - name: spaceBefore + uid: 'word!Word.Interfaces.ParagraphFormatData#spaceBefore:member' + package: word! + fullName: spaceBefore + summary: Specifies the spacing (in points) before the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'spaceBefore?: number;' + return: + type: number + - name: widowControl + uid: 'word!Word.Interfaces.ParagraphFormatData#widowControl:member' + package: word! + fullName: widowControl + summary: >- + Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the + paragraph when Microsoft Word repaginates the document. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'widowControl?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphformatloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphformatloadoptions.yml new file mode 100644 index 0000000000..fc7301a882 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphformatloadoptions.yml @@ -0,0 +1,201 @@ +### YamlMime:TSType +name: Word.Interfaces.ParagraphFormatLoadOptions +uid: 'word!Word.Interfaces.ParagraphFormatLoadOptions:interface' +package: word! +fullName: Word.Interfaces.ParagraphFormatLoadOptions +summary: Represents a style of paragraph in a document. +remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.ParagraphFormatLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: alignment + uid: 'word!Word.Interfaces.ParagraphFormatLoadOptions#alignment:member' + package: word! + fullName: alignment + summary: Specifies the alignment for the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'alignment?: boolean;' + return: + type: boolean + - name: firstLineIndent + uid: 'word!Word.Interfaces.ParagraphFormatLoadOptions#firstLineIndent:member' + package: word! + fullName: firstLineIndent + summary: >- + Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line + indent, and use a negative value to set a hanging indent. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'firstLineIndent?: boolean;' + return: + type: boolean + - name: keepTogether + uid: 'word!Word.Interfaces.ParagraphFormatLoadOptions#keepTogether:member' + package: word! + fullName: keepTogether + summary: >- + Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates + the document. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'keepTogether?: boolean;' + return: + type: boolean + - name: keepWithNext + uid: 'word!Word.Interfaces.ParagraphFormatLoadOptions#keepWithNext:member' + package: word! + fullName: keepWithNext + summary: >- + Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft + Word repaginates the document. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'keepWithNext?: boolean;' + return: + type: boolean + - name: leftIndent + uid: 'word!Word.Interfaces.ParagraphFormatLoadOptions#leftIndent:member' + package: word! + fullName: leftIndent + summary: Specifies the left indent. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'leftIndent?: boolean;' + return: + type: boolean + - name: lineSpacing + uid: 'word!Word.Interfaces.ParagraphFormatLoadOptions#lineSpacing:member' + package: word! + fullName: lineSpacing + summary: Specifies the line spacing (in points) for the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lineSpacing?: boolean;' + return: + type: boolean + - name: lineUnitAfter + uid: 'word!Word.Interfaces.ParagraphFormatLoadOptions#lineUnitAfter:member' + package: word! + fullName: lineUnitAfter + summary: Specifies the amount of spacing (in gridlines) after the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lineUnitAfter?: boolean;' + return: + type: boolean + - name: lineUnitBefore + uid: 'word!Word.Interfaces.ParagraphFormatLoadOptions#lineUnitBefore:member' + package: word! + fullName: lineUnitBefore + summary: Specifies the amount of spacing (in gridlines) before the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lineUnitBefore?: boolean;' + return: + type: boolean + - name: mirrorIndents + uid: 'word!Word.Interfaces.ParagraphFormatLoadOptions#mirrorIndents:member' + package: word! + fullName: mirrorIndents + summary: Specifies whether left and right indents are the same width. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'mirrorIndents?: boolean;' + return: + type: boolean + - name: outlineLevel + uid: 'word!Word.Interfaces.ParagraphFormatLoadOptions#outlineLevel:member' + package: word! + fullName: outlineLevel + summary: Specifies the outline level for the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'outlineLevel?: boolean;' + return: + type: boolean + - name: rightIndent + uid: 'word!Word.Interfaces.ParagraphFormatLoadOptions#rightIndent:member' + package: word! + fullName: rightIndent + summary: Specifies the right indent (in points) for the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'rightIndent?: boolean;' + return: + type: boolean + - name: spaceAfter + uid: 'word!Word.Interfaces.ParagraphFormatLoadOptions#spaceAfter:member' + package: word! + fullName: spaceAfter + summary: Specifies the amount of spacing (in points) after the specified paragraph or text column. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'spaceAfter?: boolean;' + return: + type: boolean + - name: spaceBefore + uid: 'word!Word.Interfaces.ParagraphFormatLoadOptions#spaceBefore:member' + package: word! + fullName: spaceBefore + summary: Specifies the spacing (in points) before the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'spaceBefore?: boolean;' + return: + type: boolean + - name: widowControl + uid: 'word!Word.Interfaces.ParagraphFormatLoadOptions#widowControl:member' + package: word! + fullName: widowControl + summary: >- + Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the + paragraph when Microsoft Word repaginates the document. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'widowControl?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphformatupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphformatupdatedata.yml new file mode 100644 index 0000000000..7c6bc40f7d --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphformatupdatedata.yml @@ -0,0 +1,193 @@ +### YamlMime:TSType +name: Word.Interfaces.ParagraphFormatUpdateData +uid: 'word!Word.Interfaces.ParagraphFormatUpdateData:interface' +package: word! +fullName: Word.Interfaces.ParagraphFormatUpdateData +summary: 'An interface for updating data on the `ParagraphFormat` object, for use in `paragraphFormat.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: alignment + uid: 'word!Word.Interfaces.ParagraphFormatUpdateData#alignment:member' + package: word! + fullName: alignment + summary: Specifies the alignment for the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified";' + return: + type: ' | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"' + - name: firstLineIndent + uid: 'word!Word.Interfaces.ParagraphFormatUpdateData#firstLineIndent:member' + package: word! + fullName: firstLineIndent + summary: >- + Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line + indent, and use a negative value to set a hanging indent. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'firstLineIndent?: number;' + return: + type: number + - name: keepTogether + uid: 'word!Word.Interfaces.ParagraphFormatUpdateData#keepTogether:member' + package: word! + fullName: keepTogether + summary: >- + Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates + the document. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'keepTogether?: boolean;' + return: + type: boolean + - name: keepWithNext + uid: 'word!Word.Interfaces.ParagraphFormatUpdateData#keepWithNext:member' + package: word! + fullName: keepWithNext + summary: >- + Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft + Word repaginates the document. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'keepWithNext?: boolean;' + return: + type: boolean + - name: leftIndent + uid: 'word!Word.Interfaces.ParagraphFormatUpdateData#leftIndent:member' + package: word! + fullName: leftIndent + summary: Specifies the left indent. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'leftIndent?: number;' + return: + type: number + - name: lineSpacing + uid: 'word!Word.Interfaces.ParagraphFormatUpdateData#lineSpacing:member' + package: word! + fullName: lineSpacing + summary: Specifies the line spacing (in points) for the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lineSpacing?: number;' + return: + type: number + - name: lineUnitAfter + uid: 'word!Word.Interfaces.ParagraphFormatUpdateData#lineUnitAfter:member' + package: word! + fullName: lineUnitAfter + summary: Specifies the amount of spacing (in gridlines) after the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lineUnitAfter?: number;' + return: + type: number + - name: lineUnitBefore + uid: 'word!Word.Interfaces.ParagraphFormatUpdateData#lineUnitBefore:member' + package: word! + fullName: lineUnitBefore + summary: Specifies the amount of spacing (in gridlines) before the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lineUnitBefore?: number;' + return: + type: number + - name: mirrorIndents + uid: 'word!Word.Interfaces.ParagraphFormatUpdateData#mirrorIndents:member' + package: word! + fullName: mirrorIndents + summary: Specifies whether left and right indents are the same width. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'mirrorIndents?: boolean;' + return: + type: boolean + - name: outlineLevel + uid: 'word!Word.Interfaces.ParagraphFormatUpdateData#outlineLevel:member' + package: word! + fullName: outlineLevel + summary: Specifies the outline level for the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + outlineLevel?: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | + "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | + "OutlineLevelBodyText"; + return: + type: >- + | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | + "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | + "OutlineLevelBodyText" + - name: rightIndent + uid: 'word!Word.Interfaces.ParagraphFormatUpdateData#rightIndent:member' + package: word! + fullName: rightIndent + summary: Specifies the right indent (in points) for the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'rightIndent?: number;' + return: + type: number + - name: spaceAfter + uid: 'word!Word.Interfaces.ParagraphFormatUpdateData#spaceAfter:member' + package: word! + fullName: spaceAfter + summary: Specifies the amount of spacing (in points) after the specified paragraph or text column. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'spaceAfter?: number;' + return: + type: number + - name: spaceBefore + uid: 'word!Word.Interfaces.ParagraphFormatUpdateData#spaceBefore:member' + package: word! + fullName: spaceBefore + summary: Specifies the spacing (in points) before the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'spaceBefore?: number;' + return: + type: number + - name: widowControl + uid: 'word!Word.Interfaces.ParagraphFormatUpdateData#widowControl:member' + package: word! + fullName: widowControl + summary: >- + Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the + paragraph when Microsoft Word repaginates the document. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'widowControl?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphloadoptions.yml new file mode 100644 index 0000000000..c87719266b --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphloadoptions.yml @@ -0,0 +1,409 @@ +### YamlMime:TSType +name: Word.Interfaces.ParagraphLoadOptions +uid: 'word!Word.Interfaces.ParagraphLoadOptions:interface' +package: word! +fullName: Word.Interfaces.ParagraphLoadOptions +summary: 'Represents a single paragraph in a selection, range, content control, or document body.' +remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.ParagraphLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: alignment + uid: 'word!Word.Interfaces.ParagraphLoadOptions#alignment:member' + package: word! + fullName: alignment + summary: 'Specifies the alignment for a paragraph. The value can be ''left'', ''centered'', ''right'', or ''justified''.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'alignment?: boolean;' + return: + type: boolean + - name: firstLineIndent + uid: 'word!Word.Interfaces.ParagraphLoadOptions#firstLineIndent:member' + package: word! + fullName: firstLineIndent + summary: >- + Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line + indent, and use a negative value to set a hanging indent. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'firstLineIndent?: boolean;' + return: + type: boolean + - name: font + uid: 'word!Word.Interfaces.ParagraphLoadOptions#font:member' + package: word! + fullName: font + summary: 'Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontLoadOptions;' + return: + type: '' + - name: isLastParagraph + uid: 'word!Word.Interfaces.ParagraphLoadOptions#isLastParagraph:member' + package: word! + fullName: isLastParagraph + summary: Indicates the paragraph is the last one inside its parent body. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'isLastParagraph?: boolean;' + return: + type: boolean + - name: isListItem + uid: 'word!Word.Interfaces.ParagraphLoadOptions#isListItem:member' + package: word! + fullName: isListItem + summary: Checks whether the paragraph is a list item. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'isListItem?: boolean;' + return: + type: boolean + - name: leftIndent + uid: 'word!Word.Interfaces.ParagraphLoadOptions#leftIndent:member' + package: word! + fullName: leftIndent + summary: 'Specifies the left indent value, in points, for the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'leftIndent?: boolean;' + return: + type: boolean + - name: lineSpacing + uid: 'word!Word.Interfaces.ParagraphLoadOptions#lineSpacing:member' + package: word! + fullName: lineSpacing + summary: 'Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lineSpacing?: boolean;' + return: + type: boolean + - name: lineUnitAfter + uid: 'word!Word.Interfaces.ParagraphLoadOptions#lineUnitAfter:member' + package: word! + fullName: lineUnitAfter + summary: 'Specifies the amount of spacing, in grid lines, after the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lineUnitAfter?: boolean;' + return: + type: boolean + - name: lineUnitBefore + uid: 'word!Word.Interfaces.ParagraphLoadOptions#lineUnitBefore:member' + package: word! + fullName: lineUnitBefore + summary: 'Specifies the amount of spacing, in grid lines, before the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lineUnitBefore?: boolean;' + return: + type: boolean + - name: list + uid: 'word!Word.Interfaces.ParagraphLoadOptions#list:member' + package: word! + fullName: list + summary: Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph isn't in a list. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'list?: Word.Interfaces.ListLoadOptions;' + return: + type: '' + - name: listItem + uid: 'word!Word.Interfaces.ParagraphLoadOptions#listItem:member' + package: word! + fullName: listItem + summary: Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'listItem?: Word.Interfaces.ListItemLoadOptions;' + return: + type: '' + - name: listItemOrNullObject + uid: 'word!Word.Interfaces.ParagraphLoadOptions#listItemOrNullObject:member' + package: word! + fullName: listItemOrNullObject + summary: >- + Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object + with its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions;' + return: + type: '' + - name: listOrNullObject + uid: 'word!Word.Interfaces.ParagraphLoadOptions#listOrNullObject:member' + package: word! + fullName: listOrNullObject + summary: >- + Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an + object with its `isNullObject` property set to `true`. For further information, see [*OrNullObject + methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'listOrNullObject?: Word.Interfaces.ListLoadOptions;' + return: + type: '' + - name: outlineLevel + uid: 'word!Word.Interfaces.ParagraphLoadOptions#outlineLevel:member' + package: word! + fullName: outlineLevel + summary: Specifies the outline level for the paragraph. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'outlineLevel?: boolean;' + return: + type: boolean + - name: parentBody + uid: 'word!Word.Interfaces.ParagraphLoadOptions#parentBody:member' + package: word! + fullName: parentBody + summary: Gets the parent body of the paragraph. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentBody?: Word.Interfaces.BodyLoadOptions;' + return: + type: '' + - name: parentContentControl + uid: 'word!Word.Interfaces.ParagraphLoadOptions#parentContentControl:member' + package: word! + fullName: parentContentControl + summary: >- + Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent + content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControl?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentContentControlOrNullObject + uid: 'word!Word.Interfaces.ParagraphLoadOptions#parentContentControlOrNullObject:member' + package: word! + fullName: parentContentControlOrNullObject + summary: >- + Gets the content control that contains the paragraph. If there isn't a parent content control, then this method + will return an object with its `isNullObject` property set to `true`. For further information, see + [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentTable + uid: 'word!Word.Interfaces.ParagraphLoadOptions#parentTable:member' + package: word! + fullName: parentTable + summary: Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTable?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: parentTableCell + uid: 'word!Word.Interfaces.ParagraphLoadOptions#parentTableCell:member' + package: word! + fullName: parentTableCell + summary: >- + Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table + cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableCell?: Word.Interfaces.TableCellLoadOptions;' + return: + type: '' + - name: parentTableCellOrNullObject + uid: 'word!Word.Interfaces.ParagraphLoadOptions#parentTableCellOrNullObject:member' + package: word! + fullName: parentTableCellOrNullObject + summary: >- + Gets the table cell that contains the paragraph. If it isn't contained in a table cell, then this method will + return an object with its `isNullObject` property set to `true`. For further information, see + [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions;' + return: + type: '' + - name: parentTableOrNullObject + uid: 'word!Word.Interfaces.ParagraphLoadOptions#parentTableOrNullObject:member' + package: word! + fullName: parentTableOrNullObject + summary: >- + Gets the table that contains the paragraph. If it isn't contained in a table, then this method will return an + object with its `isNullObject` property set to `true`. For further information, see [*OrNullObject + methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableOrNullObject?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: rightIndent + uid: 'word!Word.Interfaces.ParagraphLoadOptions#rightIndent:member' + package: word! + fullName: rightIndent + summary: 'Specifies the right indent value, in points, for the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'rightIndent?: boolean;' + return: + type: boolean + - name: spaceAfter + uid: 'word!Word.Interfaces.ParagraphLoadOptions#spaceAfter:member' + package: word! + fullName: spaceAfter + summary: 'Specifies the spacing, in points, after the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'spaceAfter?: boolean;' + return: + type: boolean + - name: spaceBefore + uid: 'word!Word.Interfaces.ParagraphLoadOptions#spaceBefore:member' + package: word! + fullName: spaceBefore + summary: 'Specifies the spacing, in points, before the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'spaceBefore?: boolean;' + return: + type: boolean + - name: style + uid: 'word!Word.Interfaces.ParagraphLoadOptions#style:member' + package: word! + fullName: style + summary: >- + Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use + the built-in styles that are portable between locales, see the "styleBuiltIn" property. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'style?: boolean;' + return: + type: boolean + - name: styleBuiltIn + uid: 'word!Word.Interfaces.ParagraphLoadOptions#styleBuiltIn:member' + package: word! + fullName: styleBuiltIn + summary: >- + Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable + between locales. To use custom styles or localized style names, see the "style" property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleBuiltIn?: boolean;' + return: + type: boolean + - name: tableNestingLevel + uid: 'word!Word.Interfaces.ParagraphLoadOptions#tableNestingLevel:member' + package: word! + fullName: tableNestingLevel + summary: Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'tableNestingLevel?: boolean;' + return: + type: boolean + - name: text + uid: 'word!Word.Interfaces.ParagraphLoadOptions#text:member' + package: word! + fullName: text + summary: Gets the text of the paragraph. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'text?: boolean;' + return: + type: boolean + - name: uniqueLocalId + uid: 'word!Word.Interfaces.ParagraphLoadOptions#uniqueLocalId:member' + package: word! + fullName: uniqueLocalId + summary: >- + Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID + format without curly braces and differs across sessions and coauthors. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'uniqueLocalId?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphupdatedata.yml new file mode 100644 index 0000000000..0a3ea9de27 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.paragraphupdatedata.yml @@ -0,0 +1,264 @@ +### YamlMime:TSType +name: Word.Interfaces.ParagraphUpdateData +uid: 'word!Word.Interfaces.ParagraphUpdateData:interface' +package: word! +fullName: Word.Interfaces.ParagraphUpdateData +summary: 'An interface for updating data on the `Paragraph` object, for use in `paragraph.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: alignment + uid: 'word!Word.Interfaces.ParagraphUpdateData#alignment:member' + package: word! + fullName: alignment + summary: 'Specifies the alignment for a paragraph. The value can be ''left'', ''centered'', ''right'', or ''justified''.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified";' + return: + type: ' | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"' + - name: firstLineIndent + uid: 'word!Word.Interfaces.ParagraphUpdateData#firstLineIndent:member' + package: word! + fullName: firstLineIndent + summary: >- + Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line + indent, and use a negative value to set a hanging indent. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'firstLineIndent?: number;' + return: + type: number + - name: font + uid: 'word!Word.Interfaces.ParagraphUpdateData#font:member' + package: word! + fullName: font + summary: 'Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontUpdateData;' + return: + type: '' + - name: leftIndent + uid: 'word!Word.Interfaces.ParagraphUpdateData#leftIndent:member' + package: word! + fullName: leftIndent + summary: 'Specifies the left indent value, in points, for the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'leftIndent?: number;' + return: + type: number + - name: lineSpacing + uid: 'word!Word.Interfaces.ParagraphUpdateData#lineSpacing:member' + package: word! + fullName: lineSpacing + summary: 'Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lineSpacing?: number;' + return: + type: number + - name: lineUnitAfter + uid: 'word!Word.Interfaces.ParagraphUpdateData#lineUnitAfter:member' + package: word! + fullName: lineUnitAfter + summary: 'Specifies the amount of spacing, in grid lines, after the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lineUnitAfter?: number;' + return: + type: number + - name: lineUnitBefore + uid: 'word!Word.Interfaces.ParagraphUpdateData#lineUnitBefore:member' + package: word! + fullName: lineUnitBefore + summary: 'Specifies the amount of spacing, in grid lines, before the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lineUnitBefore?: number;' + return: + type: number + - name: listItem + uid: 'word!Word.Interfaces.ParagraphUpdateData#listItem:member' + package: word! + fullName: listItem + summary: Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'listItem?: Word.Interfaces.ListItemUpdateData;' + return: + type: '' + - name: listItemOrNullObject + uid: 'word!Word.Interfaces.ParagraphUpdateData#listItemOrNullObject:member' + package: word! + fullName: listItemOrNullObject + summary: >- + Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object + with its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'listItemOrNullObject?: Word.Interfaces.ListItemUpdateData;' + return: + type: '' + - name: outlineLevel + uid: 'word!Word.Interfaces.ParagraphUpdateData#outlineLevel:member' + package: word! + fullName: outlineLevel + summary: Specifies the outline level for the paragraph. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'outlineLevel?: number;' + return: + type: number + - name: rightIndent + uid: 'word!Word.Interfaces.ParagraphUpdateData#rightIndent:member' + package: word! + fullName: rightIndent + summary: 'Specifies the right indent value, in points, for the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'rightIndent?: number;' + return: + type: number + - name: spaceAfter + uid: 'word!Word.Interfaces.ParagraphUpdateData#spaceAfter:member' + package: word! + fullName: spaceAfter + summary: 'Specifies the spacing, in points, after the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'spaceAfter?: number;' + return: + type: number + - name: spaceBefore + uid: 'word!Word.Interfaces.ParagraphUpdateData#spaceBefore:member' + package: word! + fullName: spaceBefore + summary: 'Specifies the spacing, in points, before the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'spaceBefore?: number;' + return: + type: number + - name: style + uid: 'word!Word.Interfaces.ParagraphUpdateData#style:member' + package: word! + fullName: style + summary: >- + Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use + the built-in styles that are portable between locales, see the "styleBuiltIn" property. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'style?: string;' + return: + type: string + - name: styleBuiltIn + uid: 'word!Word.Interfaces.ParagraphUpdateData#styleBuiltIn:member' + package: word! + fullName: styleBuiltIn + summary: >- + Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable + between locales. To use custom styles or localized style names, see the "style" property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | + "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | + "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | + "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | + "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | + "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | + "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" + | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" + | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" + | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | + "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" + | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | + "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | + "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | + "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | + "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" + | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | + "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | + "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | + "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | + "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | + "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | + "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | + "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + return: + type: >- + | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | + "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | + "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | + "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | + "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | + "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | + "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | + "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | + "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | + "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | + "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | + "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | + "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" + | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" + | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | + "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | + "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | + "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | + "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | + "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | + "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | + "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | + "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | + "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | + "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6" diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.rangecollectiondata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.rangecollectiondata.yml new file mode 100644 index 0000000000..17a3e821b1 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.rangecollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.RangeCollectionData +uid: 'word!Word.Interfaces.RangeCollectionData:interface' +package: word! +fullName: Word.Interfaces.RangeCollectionData +summary: An interface describing the data returned by calling `rangeCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.RangeCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.RangeData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.rangecollectionloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.rangecollectionloadoptions.yml new file mode 100644 index 0000000000..51df5e79c2 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.rangecollectionloadoptions.yml @@ -0,0 +1,212 @@ +### YamlMime:TSType +name: Word.Interfaces.RangeCollectionLoadOptions +uid: 'word!Word.Interfaces.RangeCollectionLoadOptions:interface' +package: word! +fullName: Word.Interfaces.RangeCollectionLoadOptions +summary: 'Contains a collection of [Word.Range](xref:word!Word.Range:class) objects.' +remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.RangeCollectionLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: font + uid: 'word!Word.Interfaces.RangeCollectionLoadOptions#font:member' + package: word! + fullName: font + summary: >- + For EACH ITEM in the collection: Gets the text format of the range. Use this to get and set font name, size, + color, and other properties. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontLoadOptions;' + return: + type: '' + - name: hyperlink + uid: 'word!Word.Interfaces.RangeCollectionLoadOptions#hyperlink:member' + package: word! + fullName: hyperlink + summary: >- + For EACH ITEM in the collection: Gets the first hyperlink in the range, or sets a hyperlink on the range. All + hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '\#' to separate the address + part from the optional location part. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'hyperlink?: boolean;' + return: + type: boolean + - name: isEmpty + uid: 'word!Word.Interfaces.RangeCollectionLoadOptions#isEmpty:member' + package: word! + fullName: isEmpty + summary: 'For EACH ITEM in the collection: Checks whether the range length is zero.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'isEmpty?: boolean;' + return: + type: boolean + - name: parentBody + uid: 'word!Word.Interfaces.RangeCollectionLoadOptions#parentBody:member' + package: word! + fullName: parentBody + summary: 'For EACH ITEM in the collection: Gets the parent body of the range.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentBody?: Word.Interfaces.BodyLoadOptions;' + return: + type: '' + - name: parentContentControl + uid: 'word!Word.Interfaces.RangeCollectionLoadOptions#parentContentControl:member' + package: word! + fullName: parentContentControl + summary: >- + For EACH ITEM in the collection: Gets the currently supported content control that contains the range. Throws an + `ItemNotFound` error if there isn't a parent content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControl?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentContentControlOrNullObject + uid: 'word!Word.Interfaces.RangeCollectionLoadOptions#parentContentControlOrNullObject:member' + package: word! + fullName: parentContentControlOrNullObject + summary: >- + For EACH ITEM in the collection: Gets the currently supported content control that contains the range. If there + isn't a parent content control, then this method will return an object with its `isNullObject` property set to + `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentTable + uid: 'word!Word.Interfaces.RangeCollectionLoadOptions#parentTable:member' + package: word! + fullName: parentTable + summary: >- + For EACH ITEM in the collection: Gets the table that contains the range. Throws an `ItemNotFound` error if it + isn't contained in a table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTable?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: parentTableCell + uid: 'word!Word.Interfaces.RangeCollectionLoadOptions#parentTableCell:member' + package: word! + fullName: parentTableCell + summary: >- + For EACH ITEM in the collection: Gets the table cell that contains the range. Throws an `ItemNotFound` error if it + isn't contained in a table cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableCell?: Word.Interfaces.TableCellLoadOptions;' + return: + type: '' + - name: parentTableCellOrNullObject + uid: 'word!Word.Interfaces.RangeCollectionLoadOptions#parentTableCellOrNullObject:member' + package: word! + fullName: parentTableCellOrNullObject + summary: >- + For EACH ITEM in the collection: Gets the table cell that contains the range. If it isn't contained in a table + cell, then this method will return an object with its `isNullObject` property set to `true`. For further + information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions;' + return: + type: '' + - name: parentTableOrNullObject + uid: 'word!Word.Interfaces.RangeCollectionLoadOptions#parentTableOrNullObject:member' + package: word! + fullName: parentTableOrNullObject + summary: >- + For EACH ITEM in the collection: Gets the table that contains the range. If it isn't contained in a table, then + this method will return an object with its `isNullObject` property set to `true`. For further information, + see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableOrNullObject?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: style + uid: 'word!Word.Interfaces.RangeCollectionLoadOptions#style:member' + package: word! + fullName: style + summary: >- + For EACH ITEM in the collection: Specifies the style name for the range. Use this property for custom styles and + localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" + property. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'style?: boolean;' + return: + type: boolean + - name: styleBuiltIn + uid: 'word!Word.Interfaces.RangeCollectionLoadOptions#styleBuiltIn:member' + package: word! + fullName: styleBuiltIn + summary: >- + For EACH ITEM in the collection: Specifies the built-in style name for the range. Use this property for built-in + styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleBuiltIn?: boolean;' + return: + type: boolean + - name: text + uid: 'word!Word.Interfaces.RangeCollectionLoadOptions#text:member' + package: word! + fullName: text + summary: 'For EACH ITEM in the collection: Gets the text of the range.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'text?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.rangecollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.rangecollectionupdatedata.yml new file mode 100644 index 0000000000..918725df61 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.rangecollectionupdatedata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.RangeCollectionUpdateData +uid: 'word!Word.Interfaces.RangeCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.RangeCollectionUpdateData +summary: 'An interface for updating data on the `RangeCollection` object, for use in `rangeCollection.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.RangeCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.RangeData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.rangedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.rangedata.yml new file mode 100644 index 0000000000..4d624e959d --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.rangedata.yml @@ -0,0 +1,177 @@ +### YamlMime:TSType +name: Word.Interfaces.RangeData +uid: 'word!Word.Interfaces.RangeData:interface' +package: word! +fullName: Word.Interfaces.RangeData +summary: An interface describing the data returned by calling `range.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: fields + uid: 'word!Word.Interfaces.RangeData#fields:member' + package: word! + fullName: fields + summary: Gets the collection of field objects in the range. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'fields?: Word.Interfaces.FieldData[];' + return: + type: '[]' + - name: font + uid: 'word!Word.Interfaces.RangeData#font:member' + package: word! + fullName: font + summary: 'Gets the text format of the range. Use this to get and set font name, size, color, and other properties.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontData;' + return: + type: '' + - name: hyperlink + uid: 'word!Word.Interfaces.RangeData#hyperlink:member' + package: word! + fullName: hyperlink + summary: >- + Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted + when you set a new hyperlink on the range. Use a '\#' to separate the address part from the optional location + part. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'hyperlink?: string;' + return: + type: string + - name: inlinePictures + uid: 'word!Word.Interfaces.RangeData#inlinePictures:member' + package: word! + fullName: inlinePictures + summary: Gets the collection of inline picture objects in the range. + remarks: '\[ [API set: WordApi 1.2](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'inlinePictures?: Word.Interfaces.InlinePictureData[];' + return: + type: '[]' + - name: isEmpty + uid: 'word!Word.Interfaces.RangeData#isEmpty:member' + package: word! + fullName: isEmpty + summary: Checks whether the range length is zero. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'isEmpty?: boolean;' + return: + type: boolean + - name: style + uid: 'word!Word.Interfaces.RangeData#style:member' + package: word! + fullName: style + summary: >- + Specifies the style name for the range. Use this property for custom styles and localized style names. To use the + built-in styles that are portable between locales, see the "styleBuiltIn" property. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'style?: string;' + return: + type: string + - name: styleBuiltIn + uid: 'word!Word.Interfaces.RangeData#styleBuiltIn:member' + package: word! + fullName: styleBuiltIn + summary: >- + Specifies the built-in style name for the range. Use this property for built-in styles that are portable between + locales. To use custom styles or localized style names, see the "style" property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | + "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | + "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | + "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | + "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | + "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | + "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" + | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" + | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" + | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | + "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" + | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | + "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | + "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | + "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | + "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" + | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | + "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | + "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | + "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | + "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | + "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | + "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | + "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + return: + type: >- + | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | + "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | + "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | + "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | + "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | + "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | + "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | + "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | + "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | + "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | + "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | + "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | + "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" + | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" + | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | + "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | + "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | + "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | + "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | + "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | + "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | + "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | + "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | + "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | + "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6" + - name: text + uid: 'word!Word.Interfaces.RangeData#text:member' + package: word! + fullName: text + summary: Gets the text of the range. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'text?: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.rangeloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.rangeloadoptions.yml new file mode 100644 index 0000000000..5179201a77 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.rangeloadoptions.yml @@ -0,0 +1,204 @@ +### YamlMime:TSType +name: Word.Interfaces.RangeLoadOptions +uid: 'word!Word.Interfaces.RangeLoadOptions:interface' +package: word! +fullName: Word.Interfaces.RangeLoadOptions +summary: Represents a contiguous area in a document. +remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.RangeLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: font + uid: 'word!Word.Interfaces.RangeLoadOptions#font:member' + package: word! + fullName: font + summary: 'Gets the text format of the range. Use this to get and set font name, size, color, and other properties.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontLoadOptions;' + return: + type: '' + - name: hyperlink + uid: 'word!Word.Interfaces.RangeLoadOptions#hyperlink:member' + package: word! + fullName: hyperlink + summary: >- + Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted + when you set a new hyperlink on the range. Use a '\#' to separate the address part from the optional location + part. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'hyperlink?: boolean;' + return: + type: boolean + - name: isEmpty + uid: 'word!Word.Interfaces.RangeLoadOptions#isEmpty:member' + package: word! + fullName: isEmpty + summary: Checks whether the range length is zero. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'isEmpty?: boolean;' + return: + type: boolean + - name: parentBody + uid: 'word!Word.Interfaces.RangeLoadOptions#parentBody:member' + package: word! + fullName: parentBody + summary: Gets the parent body of the range. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentBody?: Word.Interfaces.BodyLoadOptions;' + return: + type: '' + - name: parentContentControl + uid: 'word!Word.Interfaces.RangeLoadOptions#parentContentControl:member' + package: word! + fullName: parentContentControl + summary: >- + Gets the currently supported content control that contains the range. Throws an `ItemNotFound` error if there + isn't a parent content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControl?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentContentControlOrNullObject + uid: 'word!Word.Interfaces.RangeLoadOptions#parentContentControlOrNullObject:member' + package: word! + fullName: parentContentControlOrNullObject + summary: >- + Gets the currently supported content control that contains the range. If there isn't a parent content control, + then this method will return an object with its `isNullObject` property set to `true`. For further + information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentTable + uid: 'word!Word.Interfaces.RangeLoadOptions#parentTable:member' + package: word! + fullName: parentTable + summary: Gets the table that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTable?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: parentTableCell + uid: 'word!Word.Interfaces.RangeLoadOptions#parentTableCell:member' + package: word! + fullName: parentTableCell + summary: Gets the table cell that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableCell?: Word.Interfaces.TableCellLoadOptions;' + return: + type: '' + - name: parentTableCellOrNullObject + uid: 'word!Word.Interfaces.RangeLoadOptions#parentTableCellOrNullObject:member' + package: word! + fullName: parentTableCellOrNullObject + summary: >- + Gets the table cell that contains the range. If it isn't contained in a table cell, then this method will return + an object with its `isNullObject` property set to `true`. For further information, see [*OrNullObject + methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions;' + return: + type: '' + - name: parentTableOrNullObject + uid: 'word!Word.Interfaces.RangeLoadOptions#parentTableOrNullObject:member' + package: word! + fullName: parentTableOrNullObject + summary: >- + Gets the table that contains the range. If it isn't contained in a table, then this method will return an object + with its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableOrNullObject?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: style + uid: 'word!Word.Interfaces.RangeLoadOptions#style:member' + package: word! + fullName: style + summary: >- + Specifies the style name for the range. Use this property for custom styles and localized style names. To use the + built-in styles that are portable between locales, see the "styleBuiltIn" property. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'style?: boolean;' + return: + type: boolean + - name: styleBuiltIn + uid: 'word!Word.Interfaces.RangeLoadOptions#styleBuiltIn:member' + package: word! + fullName: styleBuiltIn + summary: >- + Specifies the built-in style name for the range. Use this property for built-in styles that are portable between + locales. To use custom styles or localized style names, see the "style" property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleBuiltIn?: boolean;' + return: + type: boolean + - name: text + uid: 'word!Word.Interfaces.RangeLoadOptions#text:member' + package: word! + fullName: text + summary: Gets the text of the range. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'text?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.rangeupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.rangeupdatedata.yml new file mode 100644 index 0000000000..4c3d8183a4 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.rangeupdatedata.yml @@ -0,0 +1,129 @@ +### YamlMime:TSType +name: Word.Interfaces.RangeUpdateData +uid: 'word!Word.Interfaces.RangeUpdateData:interface' +package: word! +fullName: Word.Interfaces.RangeUpdateData +summary: 'An interface for updating data on the `Range` object, for use in `range.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: font + uid: 'word!Word.Interfaces.RangeUpdateData#font:member' + package: word! + fullName: font + summary: 'Gets the text format of the range. Use this to get and set font name, size, color, and other properties.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontUpdateData;' + return: + type: '' + - name: hyperlink + uid: 'word!Word.Interfaces.RangeUpdateData#hyperlink:member' + package: word! + fullName: hyperlink + summary: >- + Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted + when you set a new hyperlink on the range. Use a '\#' to separate the address part from the optional location + part. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'hyperlink?: string;' + return: + type: string + - name: style + uid: 'word!Word.Interfaces.RangeUpdateData#style:member' + package: word! + fullName: style + summary: >- + Specifies the style name for the range. Use this property for custom styles and localized style names. To use the + built-in styles that are portable between locales, see the "styleBuiltIn" property. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'style?: string;' + return: + type: string + - name: styleBuiltIn + uid: 'word!Word.Interfaces.RangeUpdateData#styleBuiltIn:member' + package: word! + fullName: styleBuiltIn + summary: >- + Specifies the built-in style name for the range. Use this property for built-in styles that are portable between + locales. To use custom styles or localized style names, see the "style" property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | + "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | + "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | + "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | + "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | + "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | + "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" + | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" + | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" + | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | + "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" + | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | + "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | + "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | + "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | + "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" + | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | + "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | + "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | + "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | + "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | + "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | + "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | + "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + return: + type: >- + | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | + "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | + "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | + "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | + "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | + "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | + "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | + "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | + "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | + "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | + "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | + "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | + "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" + | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" + | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | + "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | + "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | + "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | + "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | + "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | + "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | + "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | + "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | + "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | + "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6" diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.searchoptionsdata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.searchoptionsdata.yml new file mode 100644 index 0000000000..fb4bcdfa19 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.searchoptionsdata.yml @@ -0,0 +1,109 @@ +### YamlMime:TSType +name: Word.Interfaces.SearchOptionsData +uid: 'word!Word.Interfaces.SearchOptionsData:interface' +package: word! +fullName: Word.Interfaces.SearchOptionsData +summary: An interface describing the data returned by calling `searchOptions.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: ignorePunct + uid: 'word!Word.Interfaces.SearchOptionsData#ignorePunct:member' + package: word! + fullName: ignorePunct + summary: >- + Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the + Ignore punctuation check box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'ignorePunct?: boolean;' + return: + type: boolean + - name: ignoreSpace + uid: 'word!Word.Interfaces.SearchOptionsData#ignoreSpace:member' + package: word! + fullName: ignoreSpace + summary: >- + Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore + whitespace characters check box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'ignoreSpace?: boolean;' + return: + type: boolean + - name: matchCase + uid: 'word!Word.Interfaces.SearchOptionsData#matchCase:member' + package: word! + fullName: matchCase + summary: >- + Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check + box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'matchCase?: boolean;' + return: + type: boolean + - name: matchPrefix + uid: 'word!Word.Interfaces.SearchOptionsData#matchPrefix:member' + package: word! + fullName: matchPrefix + summary: >- + Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the + Match prefix check box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'matchPrefix?: boolean;' + return: + type: boolean + - name: matchSuffix + uid: 'word!Word.Interfaces.SearchOptionsData#matchSuffix:member' + package: word! + fullName: matchSuffix + summary: >- + Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match + suffix check box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'matchSuffix?: boolean;' + return: + type: boolean + - name: matchWholeWord + uid: 'word!Word.Interfaces.SearchOptionsData#matchWholeWord:member' + package: word! + fullName: matchWholeWord + summary: >- + Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger + word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'matchWholeWord?: boolean;' + return: + type: boolean + - name: matchWildcards + uid: 'word!Word.Interfaces.SearchOptionsData#matchWildcards:member' + package: word! + fullName: matchWildcards + summary: >- + Specifies a value that indicates whether the search will be performed using special search operators. Corresponds + to the Use wildcards check box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'matchWildcards?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.searchoptionsloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.searchoptionsloadoptions.yml new file mode 100644 index 0000000000..4bff54537e --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.searchoptionsloadoptions.yml @@ -0,0 +1,126 @@ +### YamlMime:TSType +name: Word.Interfaces.SearchOptionsLoadOptions +uid: 'word!Word.Interfaces.SearchOptionsLoadOptions:interface' +package: word! +fullName: Word.Interfaces.SearchOptionsLoadOptions +summary: >- + Specifies the options to be included in a search operation. To learn more about how to use search options in the Word + JavaScript APIs, read [Use search options to find text in your Word + add-in](https://learn.microsoft.com/office/dev/add-ins/word/search-option-guidance). +remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.SearchOptionsLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: ignorePunct + uid: 'word!Word.Interfaces.SearchOptionsLoadOptions#ignorePunct:member' + package: word! + fullName: ignorePunct + summary: >- + Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the + Ignore punctuation check box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'ignorePunct?: boolean;' + return: + type: boolean + - name: ignoreSpace + uid: 'word!Word.Interfaces.SearchOptionsLoadOptions#ignoreSpace:member' + package: word! + fullName: ignoreSpace + summary: >- + Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore + whitespace characters check box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'ignoreSpace?: boolean;' + return: + type: boolean + - name: matchCase + uid: 'word!Word.Interfaces.SearchOptionsLoadOptions#matchCase:member' + package: word! + fullName: matchCase + summary: >- + Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check + box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'matchCase?: boolean;' + return: + type: boolean + - name: matchPrefix + uid: 'word!Word.Interfaces.SearchOptionsLoadOptions#matchPrefix:member' + package: word! + fullName: matchPrefix + summary: >- + Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the + Match prefix check box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'matchPrefix?: boolean;' + return: + type: boolean + - name: matchSuffix + uid: 'word!Word.Interfaces.SearchOptionsLoadOptions#matchSuffix:member' + package: word! + fullName: matchSuffix + summary: >- + Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match + suffix check box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'matchSuffix?: boolean;' + return: + type: boolean + - name: matchWholeWord + uid: 'word!Word.Interfaces.SearchOptionsLoadOptions#matchWholeWord:member' + package: word! + fullName: matchWholeWord + summary: >- + Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger + word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'matchWholeWord?: boolean;' + return: + type: boolean + - name: matchWildcards + uid: 'word!Word.Interfaces.SearchOptionsLoadOptions#matchWildcards:member' + package: word! + fullName: matchWildcards + summary: >- + Specifies a value that indicates whether the search will be performed using special search operators. Corresponds + to the Use wildcards check box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'matchWildcards?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.searchoptionsupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.searchoptionsupdatedata.yml new file mode 100644 index 0000000000..452b3a2f0d --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.searchoptionsupdatedata.yml @@ -0,0 +1,109 @@ +### YamlMime:TSType +name: Word.Interfaces.SearchOptionsUpdateData +uid: 'word!Word.Interfaces.SearchOptionsUpdateData:interface' +package: word! +fullName: Word.Interfaces.SearchOptionsUpdateData +summary: 'An interface for updating data on the `SearchOptions` object, for use in `searchOptions.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: ignorePunct + uid: 'word!Word.Interfaces.SearchOptionsUpdateData#ignorePunct:member' + package: word! + fullName: ignorePunct + summary: >- + Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the + Ignore punctuation check box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'ignorePunct?: boolean;' + return: + type: boolean + - name: ignoreSpace + uid: 'word!Word.Interfaces.SearchOptionsUpdateData#ignoreSpace:member' + package: word! + fullName: ignoreSpace + summary: >- + Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore + whitespace characters check box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'ignoreSpace?: boolean;' + return: + type: boolean + - name: matchCase + uid: 'word!Word.Interfaces.SearchOptionsUpdateData#matchCase:member' + package: word! + fullName: matchCase + summary: >- + Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check + box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'matchCase?: boolean;' + return: + type: boolean + - name: matchPrefix + uid: 'word!Word.Interfaces.SearchOptionsUpdateData#matchPrefix:member' + package: word! + fullName: matchPrefix + summary: >- + Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the + Match prefix check box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'matchPrefix?: boolean;' + return: + type: boolean + - name: matchSuffix + uid: 'word!Word.Interfaces.SearchOptionsUpdateData#matchSuffix:member' + package: word! + fullName: matchSuffix + summary: >- + Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match + suffix check box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'matchSuffix?: boolean;' + return: + type: boolean + - name: matchWholeWord + uid: 'word!Word.Interfaces.SearchOptionsUpdateData#matchWholeWord:member' + package: word! + fullName: matchWholeWord + summary: >- + Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger + word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'matchWholeWord?: boolean;' + return: + type: boolean + - name: matchWildcards + uid: 'word!Word.Interfaces.SearchOptionsUpdateData#matchWildcards:member' + package: word! + fullName: matchWildcards + summary: >- + Specifies a value that indicates whether the search will be performed using special search operators. Corresponds + to the Use wildcards check box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'matchWildcards?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.sectioncollectiondata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.sectioncollectiondata.yml new file mode 100644 index 0000000000..cbdfd70102 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.sectioncollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.SectionCollectionData +uid: 'word!Word.Interfaces.SectionCollectionData:interface' +package: word! +fullName: Word.Interfaces.SectionCollectionData +summary: An interface describing the data returned by calling `sectionCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.SectionCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.SectionData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.sectioncollectionloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.sectioncollectionloadoptions.yml new file mode 100644 index 0000000000..3b47cb1296 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.sectioncollectionloadoptions.yml @@ -0,0 +1,39 @@ +### YamlMime:TSType +name: Word.Interfaces.SectionCollectionLoadOptions +uid: 'word!Word.Interfaces.SectionCollectionLoadOptions:interface' +package: word! +fullName: Word.Interfaces.SectionCollectionLoadOptions +summary: 'Contains the collection of the document''s [Word.Section](xref:word!Word.Section:class) objects.' +remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.SectionCollectionLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: body + uid: 'word!Word.Interfaces.SectionCollectionLoadOptions#body:member' + package: word! + fullName: body + summary: >- + For EACH ITEM in the collection: Gets the body object of the section. This doesn't include the header/footer and + other section metadata. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'body?: Word.Interfaces.BodyLoadOptions;' + return: + type: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.sectioncollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.sectioncollectionupdatedata.yml new file mode 100644 index 0000000000..5d4676798f --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.sectioncollectionupdatedata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.SectionCollectionUpdateData +uid: 'word!Word.Interfaces.SectionCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.SectionCollectionUpdateData +summary: 'An interface for updating data on the `SectionCollection` object, for use in `sectionCollection.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.SectionCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.SectionData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.sectiondata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.sectiondata.yml new file mode 100644 index 0000000000..e838bbda8c --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.sectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.SectionData +uid: 'word!Word.Interfaces.SectionData:interface' +package: word! +fullName: Word.Interfaces.SectionData +summary: An interface describing the data returned by calling `section.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: body + uid: 'word!Word.Interfaces.SectionData#body:member' + package: word! + fullName: body + summary: Gets the body object of the section. This doesn't include the header/footer and other section metadata. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'body?: Word.Interfaces.BodyData;' + return: + type: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.sectionloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.sectionloadoptions.yml new file mode 100644 index 0000000000..8f8543e2d3 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.sectionloadoptions.yml @@ -0,0 +1,37 @@ +### YamlMime:TSType +name: Word.Interfaces.SectionLoadOptions +uid: 'word!Word.Interfaces.SectionLoadOptions:interface' +package: word! +fullName: Word.Interfaces.SectionLoadOptions +summary: Represents a section in a Word document. +remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.SectionLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: body + uid: 'word!Word.Interfaces.SectionLoadOptions#body:member' + package: word! + fullName: body + summary: Gets the body object of the section. This doesn't include the header/footer and other section metadata. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'body?: Word.Interfaces.BodyLoadOptions;' + return: + type: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.sectionupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.sectionupdatedata.yml new file mode 100644 index 0000000000..71130def68 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.sectionupdatedata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.SectionUpdateData +uid: 'word!Word.Interfaces.SectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.SectionUpdateData +summary: 'An interface for updating data on the `Section` object, for use in `section.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: body + uid: 'word!Word.Interfaces.SectionUpdateData#body:member' + package: word! + fullName: body + summary: Gets the body object of the section. This doesn't include the header/footer and other section metadata. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'body?: Word.Interfaces.BodyUpdateData;' + return: + type: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.settingcollectiondata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.settingcollectiondata.yml new file mode 100644 index 0000000000..4931579b0a --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.settingcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.SettingCollectionData +uid: 'word!Word.Interfaces.SettingCollectionData:interface' +package: word! +fullName: Word.Interfaces.SettingCollectionData +summary: An interface describing the data returned by calling `settingCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.SettingCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.SettingData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.settingcollectionloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.settingcollectionloadoptions.yml new file mode 100644 index 0000000000..c78183568b --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.settingcollectionloadoptions.yml @@ -0,0 +1,49 @@ +### YamlMime:TSType +name: Word.Interfaces.SettingCollectionLoadOptions +uid: 'word!Word.Interfaces.SettingCollectionLoadOptions:interface' +package: word! +fullName: Word.Interfaces.SettingCollectionLoadOptions +summary: 'Contains the collection of [Word.Setting](xref:word!Word.Setting:class) objects.' +remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.SettingCollectionLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: key + uid: 'word!Word.Interfaces.SettingCollectionLoadOptions#key:member' + package: word! + fullName: key + summary: 'For EACH ITEM in the collection: Gets the key of the setting.' + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'key?: boolean;' + return: + type: boolean + - name: value + uid: 'word!Word.Interfaces.SettingCollectionLoadOptions#value:member' + package: word! + fullName: value + summary: 'For EACH ITEM in the collection: Specifies the value of the setting.' + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'value?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.settingcollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.settingcollectionupdatedata.yml new file mode 100644 index 0000000000..4979ef7f6a --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.settingcollectionupdatedata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.SettingCollectionUpdateData +uid: 'word!Word.Interfaces.SettingCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.SettingCollectionUpdateData +summary: 'An interface for updating data on the `SettingCollection` object, for use in `settingCollection.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.SettingCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.SettingData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.settingdata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.settingdata.yml new file mode 100644 index 0000000000..cbadc7e323 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.settingdata.yml @@ -0,0 +1,35 @@ +### YamlMime:TSType +name: Word.Interfaces.SettingData +uid: 'word!Word.Interfaces.SettingData:interface' +package: word! +fullName: Word.Interfaces.SettingData +summary: An interface describing the data returned by calling `setting.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: key + uid: 'word!Word.Interfaces.SettingData#key:member' + package: word! + fullName: key + summary: Gets the key of the setting. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'key?: string;' + return: + type: string + - name: value + uid: 'word!Word.Interfaces.SettingData#value:member' + package: word! + fullName: value + summary: Specifies the value of the setting. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'value?: any;' + return: + type: any diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.settingloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.settingloadoptions.yml new file mode 100644 index 0000000000..3217c4721b --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.settingloadoptions.yml @@ -0,0 +1,49 @@ +### YamlMime:TSType +name: Word.Interfaces.SettingLoadOptions +uid: 'word!Word.Interfaces.SettingLoadOptions:interface' +package: word! +fullName: Word.Interfaces.SettingLoadOptions +summary: Represents a setting of the add-in. +remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.SettingLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: key + uid: 'word!Word.Interfaces.SettingLoadOptions#key:member' + package: word! + fullName: key + summary: Gets the key of the setting. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'key?: boolean;' + return: + type: boolean + - name: value + uid: 'word!Word.Interfaces.SettingLoadOptions#value:member' + package: word! + fullName: value + summary: Specifies the value of the setting. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'value?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.settingupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.settingupdatedata.yml new file mode 100644 index 0000000000..a00877de03 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.settingupdatedata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.SettingUpdateData +uid: 'word!Word.Interfaces.SettingUpdateData:interface' +package: word! +fullName: Word.Interfaces.SettingUpdateData +summary: 'An interface for updating data on the `Setting` object, for use in `setting.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: value + uid: 'word!Word.Interfaces.SettingUpdateData#value:member' + package: word! + fullName: value + summary: Specifies the value of the setting. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'value?: any;' + return: + type: any diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.shadingdata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.shadingdata.yml new file mode 100644 index 0000000000..349c9759b3 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.shadingdata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.ShadingData +uid: 'word!Word.Interfaces.ShadingData:interface' +package: word! +fullName: Word.Interfaces.ShadingData +summary: An interface describing the data returned by calling `shading.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: backgroundPatternColor + uid: 'word!Word.Interfaces.ShadingData#backgroundPatternColor:member' + package: word! + fullName: backgroundPatternColor + summary: >- + Specifies the color for the background of the object. You can provide the value in the '\#RRGGBB' format or the + color name. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'backgroundPatternColor?: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.shadingloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.shadingloadoptions.yml new file mode 100644 index 0000000000..d3a9f3fa64 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.shadingloadoptions.yml @@ -0,0 +1,39 @@ +### YamlMime:TSType +name: Word.Interfaces.ShadingLoadOptions +uid: 'word!Word.Interfaces.ShadingLoadOptions:interface' +package: word! +fullName: Word.Interfaces.ShadingLoadOptions +summary: Represents the shading object. +remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.ShadingLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: backgroundPatternColor + uid: 'word!Word.Interfaces.ShadingLoadOptions#backgroundPatternColor:member' + package: word! + fullName: backgroundPatternColor + summary: >- + Specifies the color for the background of the object. You can provide the value in the '\#RRGGBB' format or the + color name. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'backgroundPatternColor?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.shadingupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.shadingupdatedata.yml new file mode 100644 index 0000000000..167a346525 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.shadingupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.ShadingUpdateData +uid: 'word!Word.Interfaces.ShadingUpdateData:interface' +package: word! +fullName: Word.Interfaces.ShadingUpdateData +summary: 'An interface for updating data on the `Shading` object, for use in `shading.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: backgroundPatternColor + uid: 'word!Word.Interfaces.ShadingUpdateData#backgroundPatternColor:member' + package: word! + fullName: backgroundPatternColor + summary: >- + Specifies the color for the background of the object. You can provide the value in the '\#RRGGBB' format or the + color name. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'backgroundPatternColor?: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.stylecollectiondata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.stylecollectiondata.yml new file mode 100644 index 0000000000..c76ba11111 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.stylecollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.StyleCollectionData +uid: 'word!Word.Interfaces.StyleCollectionData:interface' +package: word! +fullName: Word.Interfaces.StyleCollectionData +summary: An interface describing the data returned by calling `styleCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.StyleCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.StyleData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.stylecollectionloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.stylecollectionloadoptions.yml new file mode 100644 index 0000000000..9411cb0200 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.stylecollectionloadoptions.yml @@ -0,0 +1,231 @@ +### YamlMime:TSType +name: Word.Interfaces.StyleCollectionLoadOptions +uid: 'word!Word.Interfaces.StyleCollectionLoadOptions:interface' +package: word! +fullName: Word.Interfaces.StyleCollectionLoadOptions +summary: 'Contains a collection of [Word.Style](xref:word!Word.Style:class) objects.' +remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.StyleCollectionLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: baseStyle + uid: 'word!Word.Interfaces.StyleCollectionLoadOptions#baseStyle:member' + package: word! + fullName: baseStyle + summary: >- + For EACH ITEM in the collection: Specifies the name of an existing style to use as the base formatting of another + style. + remarks: |- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + Note: The ability to set `baseStyle` was introduced in WordApi 1.6. + isPreview: false + isDeprecated: false + syntax: + content: 'baseStyle?: boolean;' + return: + type: boolean + - name: builtIn + uid: 'word!Word.Interfaces.StyleCollectionLoadOptions#builtIn:member' + package: word! + fullName: builtIn + summary: 'For EACH ITEM in the collection: Gets whether the specified style is a built-in style.' + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'builtIn?: boolean;' + return: + type: boolean + - name: font + uid: 'word!Word.Interfaces.StyleCollectionLoadOptions#font:member' + package: word! + fullName: font + summary: >- + For EACH ITEM in the collection: Gets a font object that represents the character formatting of the specified + style. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontLoadOptions;' + return: + type: '' + - name: inUse + uid: 'word!Word.Interfaces.StyleCollectionLoadOptions#inUse:member' + package: word! + fullName: inUse + summary: >- + For EACH ITEM in the collection: Gets whether the specified style is a built-in style that has been modified or + applied in the document or a new style that has been created in the document. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'inUse?: boolean;' + return: + type: boolean + - name: linked + uid: 'word!Word.Interfaces.StyleCollectionLoadOptions#linked:member' + package: word! + fullName: linked + summary: >- + For EACH ITEM in the collection: Gets whether a style is a linked style that can be used for both paragraph and + character formatting. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'linked?: boolean;' + return: + type: boolean + - name: nameLocal + uid: 'word!Word.Interfaces.StyleCollectionLoadOptions#nameLocal:member' + package: word! + fullName: nameLocal + summary: 'For EACH ITEM in the collection: Gets the name of a style in the language of the user.' + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'nameLocal?: boolean;' + return: + type: boolean + - name: nextParagraphStyle + uid: 'word!Word.Interfaces.StyleCollectionLoadOptions#nextParagraphStyle:member' + package: word! + fullName: nextParagraphStyle + summary: >- + For EACH ITEM in the collection: Specifies the name of the style to be applied automatically to a new paragraph + that is inserted after a paragraph formatted with the specified style. + remarks: |- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. + isPreview: false + isDeprecated: false + syntax: + content: 'nextParagraphStyle?: boolean;' + return: + type: boolean + - name: paragraphFormat + uid: 'word!Word.Interfaces.StyleCollectionLoadOptions#paragraphFormat:member' + package: word! + fullName: paragraphFormat + summary: >- + For EACH ITEM in the collection: Gets a ParagraphFormat object that represents the paragraph settings for the + specified style. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'paragraphFormat?: Word.Interfaces.ParagraphFormatLoadOptions;' + return: + type: '' + - name: priority + uid: 'word!Word.Interfaces.StyleCollectionLoadOptions#priority:member' + package: word! + fullName: priority + summary: 'For EACH ITEM in the collection: Specifies the priority.' + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'priority?: boolean;' + return: + type: boolean + - name: quickStyle + uid: 'word!Word.Interfaces.StyleCollectionLoadOptions#quickStyle:member' + package: word! + fullName: quickStyle + summary: 'For EACH ITEM in the collection: Specifies whether the style corresponds to an available quick style.' + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'quickStyle?: boolean;' + return: + type: boolean + - name: shading + uid: 'word!Word.Interfaces.StyleCollectionLoadOptions#shading:member' + package: word! + fullName: shading + summary: >- + For EACH ITEM in the collection: Gets a Shading object that represents the shading for the specified style. Not + applicable to List style. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'shading?: Word.Interfaces.ShadingLoadOptions;' + return: + type: '' + - name: tableStyle + uid: 'word!Word.Interfaces.StyleCollectionLoadOptions#tableStyle:member' + package: word! + fullName: tableStyle + summary: >- + For EACH ITEM in the collection: Gets a TableStyle object representing Style properties that can be applied to a + table. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'tableStyle?: Word.Interfaces.TableStyleLoadOptions;' + return: + type: '' + - name: type + uid: 'word!Word.Interfaces.StyleCollectionLoadOptions#type:member' + package: word! + fullName: type + summary: 'For EACH ITEM in the collection: Gets the style type.' + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type?: boolean;' + return: + type: boolean + - name: unhideWhenUsed + uid: 'word!Word.Interfaces.StyleCollectionLoadOptions#unhideWhenUsed:member' + package: word! + fullName: unhideWhenUsed + summary: >- + For EACH ITEM in the collection: Specifies whether the specified style is made visible as a recommended style in + the Styles and in the Styles task pane in Microsoft Word after it's used in the document. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'unhideWhenUsed?: boolean;' + return: + type: boolean + - name: visibility + uid: 'word!Word.Interfaces.StyleCollectionLoadOptions#visibility:member' + package: word! + fullName: visibility + summary: >- + For EACH ITEM in the collection: Specifies whether the specified style is visible as a recommended style in the + Styles gallery and in the Styles task pane. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'visibility?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.stylecollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.stylecollectionupdatedata.yml new file mode 100644 index 0000000000..42d7fac948 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.stylecollectionupdatedata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.StyleCollectionUpdateData +uid: 'word!Word.Interfaces.StyleCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.StyleCollectionUpdateData +summary: 'An interface for updating data on the `StyleCollection` object, for use in `styleCollection.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.StyleCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.StyleData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.styledata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.styledata.yml new file mode 100644 index 0000000000..3422e99844 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.styledata.yml @@ -0,0 +1,205 @@ +### YamlMime:TSType +name: Word.Interfaces.StyleData +uid: 'word!Word.Interfaces.StyleData:interface' +package: word! +fullName: Word.Interfaces.StyleData +summary: An interface describing the data returned by calling `style.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: baseStyle + uid: 'word!Word.Interfaces.StyleData#baseStyle:member' + package: word! + fullName: baseStyle + summary: Specifies the name of an existing style to use as the base formatting of another style. + remarks: |- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + Note: The ability to set `baseStyle` was introduced in WordApi 1.6. + isPreview: false + isDeprecated: false + syntax: + content: 'baseStyle?: string;' + return: + type: string + - name: builtIn + uid: 'word!Word.Interfaces.StyleData#builtIn:member' + package: word! + fullName: builtIn + summary: Gets whether the specified style is a built-in style. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'builtIn?: boolean;' + return: + type: boolean + - name: font + uid: 'word!Word.Interfaces.StyleData#font:member' + package: word! + fullName: font + summary: Gets a font object that represents the character formatting of the specified style. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontData;' + return: + type: '' + - name: inUse + uid: 'word!Word.Interfaces.StyleData#inUse:member' + package: word! + fullName: inUse + summary: >- + Gets whether the specified style is a built-in style that has been modified or applied in the document or a new + style that has been created in the document. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'inUse?: boolean;' + return: + type: boolean + - name: linked + uid: 'word!Word.Interfaces.StyleData#linked:member' + package: word! + fullName: linked + summary: Gets whether a style is a linked style that can be used for both paragraph and character formatting. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'linked?: boolean;' + return: + type: boolean + - name: nameLocal + uid: 'word!Word.Interfaces.StyleData#nameLocal:member' + package: word! + fullName: nameLocal + summary: Gets the name of a style in the language of the user. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'nameLocal?: string;' + return: + type: string + - name: nextParagraphStyle + uid: 'word!Word.Interfaces.StyleData#nextParagraphStyle:member' + package: word! + fullName: nextParagraphStyle + summary: >- + Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph + formatted with the specified style. + remarks: |- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. + isPreview: false + isDeprecated: false + syntax: + content: 'nextParagraphStyle?: string;' + return: + type: string + - name: paragraphFormat + uid: 'word!Word.Interfaces.StyleData#paragraphFormat:member' + package: word! + fullName: paragraphFormat + summary: Gets a ParagraphFormat object that represents the paragraph settings for the specified style. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'paragraphFormat?: Word.Interfaces.ParagraphFormatData;' + return: + type: '' + - name: priority + uid: 'word!Word.Interfaces.StyleData#priority:member' + package: word! + fullName: priority + summary: Specifies the priority. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'priority?: number;' + return: + type: number + - name: quickStyle + uid: 'word!Word.Interfaces.StyleData#quickStyle:member' + package: word! + fullName: quickStyle + summary: Specifies whether the style corresponds to an available quick style. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'quickStyle?: boolean;' + return: + type: boolean + - name: shading + uid: 'word!Word.Interfaces.StyleData#shading:member' + package: word! + fullName: shading + summary: Gets a Shading object that represents the shading for the specified style. Not applicable to List style. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'shading?: Word.Interfaces.ShadingData;' + return: + type: '' + - name: tableStyle + uid: 'word!Word.Interfaces.StyleData#tableStyle:member' + package: word! + fullName: tableStyle + summary: Gets a TableStyle object representing Style properties that can be applied to a table. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'tableStyle?: Word.Interfaces.TableStyleData;' + return: + type: '' + - name: type + uid: 'word!Word.Interfaces.StyleData#type:member' + package: word! + fullName: type + summary: Gets the style type. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type?: Word.StyleType | "Character" | "List" | "Paragraph" | "Table";' + return: + type: ' | "Character" | "List" | "Paragraph" | "Table"' + - name: unhideWhenUsed + uid: 'word!Word.Interfaces.StyleData#unhideWhenUsed:member' + package: word! + fullName: unhideWhenUsed + summary: >- + Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task + pane in Microsoft Word after it's used in the document. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'unhideWhenUsed?: boolean;' + return: + type: boolean + - name: visibility + uid: 'word!Word.Interfaces.StyleData#visibility:member' + package: word! + fullName: visibility + summary: >- + Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles + task pane. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'visibility?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.styleloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.styleloadoptions.yml new file mode 100644 index 0000000000..0c9aab53f3 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.styleloadoptions.yml @@ -0,0 +1,219 @@ +### YamlMime:TSType +name: Word.Interfaces.StyleLoadOptions +uid: 'word!Word.Interfaces.StyleLoadOptions:interface' +package: word! +fullName: Word.Interfaces.StyleLoadOptions +summary: Represents a style in a Word document. +remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.StyleLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: baseStyle + uid: 'word!Word.Interfaces.StyleLoadOptions#baseStyle:member' + package: word! + fullName: baseStyle + summary: Specifies the name of an existing style to use as the base formatting of another style. + remarks: |- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + Note: The ability to set `baseStyle` was introduced in WordApi 1.6. + isPreview: false + isDeprecated: false + syntax: + content: 'baseStyle?: boolean;' + return: + type: boolean + - name: builtIn + uid: 'word!Word.Interfaces.StyleLoadOptions#builtIn:member' + package: word! + fullName: builtIn + summary: Gets whether the specified style is a built-in style. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'builtIn?: boolean;' + return: + type: boolean + - name: font + uid: 'word!Word.Interfaces.StyleLoadOptions#font:member' + package: word! + fullName: font + summary: Gets a font object that represents the character formatting of the specified style. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontLoadOptions;' + return: + type: '' + - name: inUse + uid: 'word!Word.Interfaces.StyleLoadOptions#inUse:member' + package: word! + fullName: inUse + summary: >- + Gets whether the specified style is a built-in style that has been modified or applied in the document or a new + style that has been created in the document. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'inUse?: boolean;' + return: + type: boolean + - name: linked + uid: 'word!Word.Interfaces.StyleLoadOptions#linked:member' + package: word! + fullName: linked + summary: Gets whether a style is a linked style that can be used for both paragraph and character formatting. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'linked?: boolean;' + return: + type: boolean + - name: nameLocal + uid: 'word!Word.Interfaces.StyleLoadOptions#nameLocal:member' + package: word! + fullName: nameLocal + summary: Gets the name of a style in the language of the user. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'nameLocal?: boolean;' + return: + type: boolean + - name: nextParagraphStyle + uid: 'word!Word.Interfaces.StyleLoadOptions#nextParagraphStyle:member' + package: word! + fullName: nextParagraphStyle + summary: >- + Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph + formatted with the specified style. + remarks: |- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. + isPreview: false + isDeprecated: false + syntax: + content: 'nextParagraphStyle?: boolean;' + return: + type: boolean + - name: paragraphFormat + uid: 'word!Word.Interfaces.StyleLoadOptions#paragraphFormat:member' + package: word! + fullName: paragraphFormat + summary: Gets a ParagraphFormat object that represents the paragraph settings for the specified style. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'paragraphFormat?: Word.Interfaces.ParagraphFormatLoadOptions;' + return: + type: '' + - name: priority + uid: 'word!Word.Interfaces.StyleLoadOptions#priority:member' + package: word! + fullName: priority + summary: Specifies the priority. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'priority?: boolean;' + return: + type: boolean + - name: quickStyle + uid: 'word!Word.Interfaces.StyleLoadOptions#quickStyle:member' + package: word! + fullName: quickStyle + summary: Specifies whether the style corresponds to an available quick style. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'quickStyle?: boolean;' + return: + type: boolean + - name: shading + uid: 'word!Word.Interfaces.StyleLoadOptions#shading:member' + package: word! + fullName: shading + summary: Gets a Shading object that represents the shading for the specified style. Not applicable to List style. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'shading?: Word.Interfaces.ShadingLoadOptions;' + return: + type: '' + - name: tableStyle + uid: 'word!Word.Interfaces.StyleLoadOptions#tableStyle:member' + package: word! + fullName: tableStyle + summary: Gets a TableStyle object representing Style properties that can be applied to a table. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'tableStyle?: Word.Interfaces.TableStyleLoadOptions;' + return: + type: '' + - name: type + uid: 'word!Word.Interfaces.StyleLoadOptions#type:member' + package: word! + fullName: type + summary: Gets the style type. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type?: boolean;' + return: + type: boolean + - name: unhideWhenUsed + uid: 'word!Word.Interfaces.StyleLoadOptions#unhideWhenUsed:member' + package: word! + fullName: unhideWhenUsed + summary: >- + Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task + pane in Microsoft Word after it's used in the document. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'unhideWhenUsed?: boolean;' + return: + type: boolean + - name: visibility + uid: 'word!Word.Interfaces.StyleLoadOptions#visibility:member' + package: word! + fullName: visibility + summary: >- + Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles + task pane. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'visibility?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.styleupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.styleupdatedata.yml new file mode 100644 index 0000000000..b763ccdf19 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.styleupdatedata.yml @@ -0,0 +1,143 @@ +### YamlMime:TSType +name: Word.Interfaces.StyleUpdateData +uid: 'word!Word.Interfaces.StyleUpdateData:interface' +package: word! +fullName: Word.Interfaces.StyleUpdateData +summary: 'An interface for updating data on the `Style` object, for use in `style.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: baseStyle + uid: 'word!Word.Interfaces.StyleUpdateData#baseStyle:member' + package: word! + fullName: baseStyle + summary: Specifies the name of an existing style to use as the base formatting of another style. + remarks: |- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + Note: The ability to set `baseStyle` was introduced in WordApi 1.6. + isPreview: false + isDeprecated: false + syntax: + content: 'baseStyle?: string;' + return: + type: string + - name: font + uid: 'word!Word.Interfaces.StyleUpdateData#font:member' + package: word! + fullName: font + summary: Gets a font object that represents the character formatting of the specified style. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontUpdateData;' + return: + type: '' + - name: nextParagraphStyle + uid: 'word!Word.Interfaces.StyleUpdateData#nextParagraphStyle:member' + package: word! + fullName: nextParagraphStyle + summary: >- + Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph + formatted with the specified style. + remarks: |- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. + isPreview: false + isDeprecated: false + syntax: + content: 'nextParagraphStyle?: string;' + return: + type: string + - name: paragraphFormat + uid: 'word!Word.Interfaces.StyleUpdateData#paragraphFormat:member' + package: word! + fullName: paragraphFormat + summary: Gets a ParagraphFormat object that represents the paragraph settings for the specified style. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'paragraphFormat?: Word.Interfaces.ParagraphFormatUpdateData;' + return: + type: '' + - name: priority + uid: 'word!Word.Interfaces.StyleUpdateData#priority:member' + package: word! + fullName: priority + summary: Specifies the priority. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'priority?: number;' + return: + type: number + - name: quickStyle + uid: 'word!Word.Interfaces.StyleUpdateData#quickStyle:member' + package: word! + fullName: quickStyle + summary: Specifies whether the style corresponds to an available quick style. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'quickStyle?: boolean;' + return: + type: boolean + - name: shading + uid: 'word!Word.Interfaces.StyleUpdateData#shading:member' + package: word! + fullName: shading + summary: Gets a Shading object that represents the shading for the specified style. Not applicable to List style. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'shading?: Word.Interfaces.ShadingUpdateData;' + return: + type: '' + - name: tableStyle + uid: 'word!Word.Interfaces.StyleUpdateData#tableStyle:member' + package: word! + fullName: tableStyle + summary: Gets a TableStyle object representing Style properties that can be applied to a table. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'tableStyle?: Word.Interfaces.TableStyleUpdateData;' + return: + type: '' + - name: unhideWhenUsed + uid: 'word!Word.Interfaces.StyleUpdateData#unhideWhenUsed:member' + package: word! + fullName: unhideWhenUsed + summary: >- + Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task + pane in Microsoft Word after it's used in the document. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'unhideWhenUsed?: boolean;' + return: + type: boolean + - name: visibility + uid: 'word!Word.Interfaces.StyleUpdateData#visibility:member' + package: word! + fullName: visibility + summary: >- + Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles + task pane. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'visibility?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tableborderdata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tableborderdata.yml new file mode 100644 index 0000000000..33eac17d50 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tableborderdata.yml @@ -0,0 +1,56 @@ +### YamlMime:TSType +name: Word.Interfaces.TableBorderData +uid: 'word!Word.Interfaces.TableBorderData:interface' +package: word! +fullName: Word.Interfaces.TableBorderData +summary: An interface describing the data returned by calling `tableBorder.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: color + uid: 'word!Word.Interfaces.TableBorderData#color:member' + package: word! + fullName: color + summary: Specifies the table border color. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'color?: string;' + return: + type: string + - name: type + uid: 'word!Word.Interfaces.TableBorderData#type:member' + package: word! + fullName: type + summary: Specifies the type of the table border. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | + "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | + "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | + "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; + return: + type: >- + | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | + "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | + "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | + "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | + "ThreeDEngrave" + - name: width + uid: 'word!Word.Interfaces.TableBorderData#width:member' + package: word! + fullName: width + summary: 'Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'width?: number;' + return: + type: number diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tableborderloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tableborderloadoptions.yml new file mode 100644 index 0000000000..160cfd8fce --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tableborderloadoptions.yml @@ -0,0 +1,61 @@ +### YamlMime:TSType +name: Word.Interfaces.TableBorderLoadOptions +uid: 'word!Word.Interfaces.TableBorderLoadOptions:interface' +package: word! +fullName: Word.Interfaces.TableBorderLoadOptions +summary: Specifies the border style. +remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.TableBorderLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: color + uid: 'word!Word.Interfaces.TableBorderLoadOptions#color:member' + package: word! + fullName: color + summary: Specifies the table border color. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'color?: boolean;' + return: + type: boolean + - name: type + uid: 'word!Word.Interfaces.TableBorderLoadOptions#type:member' + package: word! + fullName: type + summary: Specifies the type of the table border. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type?: boolean;' + return: + type: boolean + - name: width + uid: 'word!Word.Interfaces.TableBorderLoadOptions#width:member' + package: word! + fullName: width + summary: 'Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'width?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tableborderupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tableborderupdatedata.yml new file mode 100644 index 0000000000..0c5aba82fd --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tableborderupdatedata.yml @@ -0,0 +1,56 @@ +### YamlMime:TSType +name: Word.Interfaces.TableBorderUpdateData +uid: 'word!Word.Interfaces.TableBorderUpdateData:interface' +package: word! +fullName: Word.Interfaces.TableBorderUpdateData +summary: 'An interface for updating data on the `TableBorder` object, for use in `tableBorder.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: color + uid: 'word!Word.Interfaces.TableBorderUpdateData#color:member' + package: word! + fullName: color + summary: Specifies the table border color. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'color?: string;' + return: + type: string + - name: type + uid: 'word!Word.Interfaces.TableBorderUpdateData#type:member' + package: word! + fullName: type + summary: Specifies the type of the table border. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | + "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | + "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | + "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; + return: + type: >- + | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | + "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | + "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | + "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | + "ThreeDEngrave" + - name: width + uid: 'word!Word.Interfaces.TableBorderUpdateData#width:member' + package: word! + fullName: width + summary: 'Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'width?: number;' + return: + type: number diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecellcollectiondata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecellcollectiondata.yml new file mode 100644 index 0000000000..2f11d874fa --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecellcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.TableCellCollectionData +uid: 'word!Word.Interfaces.TableCellCollectionData:interface' +package: word! +fullName: Word.Interfaces.TableCellCollectionData +summary: An interface describing the data returned by calling `tableCellCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.TableCellCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.TableCellData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecellcollectionloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecellcollectionloadoptions.yml new file mode 100644 index 0000000000..88392e983d --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecellcollectionloadoptions.yml @@ -0,0 +1,165 @@ +### YamlMime:TSType +name: Word.Interfaces.TableCellCollectionLoadOptions +uid: 'word!Word.Interfaces.TableCellCollectionLoadOptions:interface' +package: word! +fullName: Word.Interfaces.TableCellCollectionLoadOptions +summary: Contains the collection of the document's TableCell objects. +remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.TableCellCollectionLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: body + uid: 'word!Word.Interfaces.TableCellCollectionLoadOptions#body:member' + package: word! + fullName: body + summary: 'For EACH ITEM in the collection: Gets the body object of the cell.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'body?: Word.Interfaces.BodyLoadOptions;' + return: + type: '' + - name: cellIndex + uid: 'word!Word.Interfaces.TableCellCollectionLoadOptions#cellIndex:member' + package: word! + fullName: cellIndex + summary: 'For EACH ITEM in the collection: Gets the index of the cell in its row.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'cellIndex?: boolean;' + return: + type: boolean + - name: columnWidth + uid: 'word!Word.Interfaces.TableCellCollectionLoadOptions#columnWidth:member' + package: word! + fullName: columnWidth + summary: >- + For EACH ITEM in the collection: Specifies the width of the cell's column in points. This is applicable to uniform + tables. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'columnWidth?: boolean;' + return: + type: boolean + - name: horizontalAlignment + uid: 'word!Word.Interfaces.TableCellCollectionLoadOptions#horizontalAlignment:member' + package: word! + fullName: horizontalAlignment + summary: >- + For EACH ITEM in the collection: Specifies the horizontal alignment of the cell. The value can be 'Left', + 'Centered', 'Right', or 'Justified'. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'horizontalAlignment?: boolean;' + return: + type: boolean + - name: parentRow + uid: 'word!Word.Interfaces.TableCellCollectionLoadOptions#parentRow:member' + package: word! + fullName: parentRow + summary: 'For EACH ITEM in the collection: Gets the parent row of the cell.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentRow?: Word.Interfaces.TableRowLoadOptions;' + return: + type: '' + - name: parentTable + uid: 'word!Word.Interfaces.TableCellCollectionLoadOptions#parentTable:member' + package: word! + fullName: parentTable + summary: 'For EACH ITEM in the collection: Gets the parent table of the cell.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTable?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: rowIndex + uid: 'word!Word.Interfaces.TableCellCollectionLoadOptions#rowIndex:member' + package: word! + fullName: rowIndex + summary: 'For EACH ITEM in the collection: Gets the index of the cell''s row in the table.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'rowIndex?: boolean;' + return: + type: boolean + - name: shadingColor + uid: 'word!Word.Interfaces.TableCellCollectionLoadOptions#shadingColor:member' + package: word! + fullName: shadingColor + summary: >- + For EACH ITEM in the collection: Specifies the shading color of the cell. Color is specified in "\#RRGGBB" format + or by using the color name. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'shadingColor?: boolean;' + return: + type: boolean + - name: value + uid: 'word!Word.Interfaces.TableCellCollectionLoadOptions#value:member' + package: word! + fullName: value + summary: 'For EACH ITEM in the collection: Specifies the text of the cell.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'value?: boolean;' + return: + type: boolean + - name: verticalAlignment + uid: 'word!Word.Interfaces.TableCellCollectionLoadOptions#verticalAlignment:member' + package: word! + fullName: verticalAlignment + summary: >- + For EACH ITEM in the collection: Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', + or 'Bottom'. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'verticalAlignment?: boolean;' + return: + type: boolean + - name: width + uid: 'word!Word.Interfaces.TableCellCollectionLoadOptions#width:member' + package: word! + fullName: width + summary: 'For EACH ITEM in the collection: Gets the width of the cell in points.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'width?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecellcollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecellcollectionupdatedata.yml new file mode 100644 index 0000000000..6f23bb0205 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecellcollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.TableCellCollectionUpdateData +uid: 'word!Word.Interfaces.TableCellCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.TableCellCollectionUpdateData +summary: >- + An interface for updating data on the `TableCellCollection` object, for use in `tableCellCollection.set({ ... })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.TableCellCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.TableCellData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecelldata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecelldata.yml new file mode 100644 index 0000000000..e71c797df1 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecelldata.yml @@ -0,0 +1,119 @@ +### YamlMime:TSType +name: Word.Interfaces.TableCellData +uid: 'word!Word.Interfaces.TableCellData:interface' +package: word! +fullName: Word.Interfaces.TableCellData +summary: An interface describing the data returned by calling `tableCell.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: body + uid: 'word!Word.Interfaces.TableCellData#body:member' + package: word! + fullName: body + summary: Gets the body object of the cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'body?: Word.Interfaces.BodyData;' + return: + type: '' + - name: cellIndex + uid: 'word!Word.Interfaces.TableCellData#cellIndex:member' + package: word! + fullName: cellIndex + summary: Gets the index of the cell in its row. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'cellIndex?: number;' + return: + type: number + - name: columnWidth + uid: 'word!Word.Interfaces.TableCellData#columnWidth:member' + package: word! + fullName: columnWidth + summary: Specifies the width of the cell's column in points. This is applicable to uniform tables. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'columnWidth?: number;' + return: + type: number + - name: horizontalAlignment + uid: 'word!Word.Interfaces.TableCellData#horizontalAlignment:member' + package: word! + fullName: horizontalAlignment + summary: 'Specifies the horizontal alignment of the cell. The value can be ''Left'', ''Centered'', ''Right'', or ''Justified''.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified";' + return: + type: ' | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"' + - name: rowIndex + uid: 'word!Word.Interfaces.TableCellData#rowIndex:member' + package: word! + fullName: rowIndex + summary: Gets the index of the cell's row in the table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'rowIndex?: number;' + return: + type: number + - name: shadingColor + uid: 'word!Word.Interfaces.TableCellData#shadingColor:member' + package: word! + fullName: shadingColor + summary: 'Specifies the shading color of the cell. Color is specified in "\#RRGGBB" format or by using the color name.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'shadingColor?: string;' + return: + type: string + - name: value + uid: 'word!Word.Interfaces.TableCellData#value:member' + package: word! + fullName: value + summary: Specifies the text of the cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'value?: string;' + return: + type: string + - name: verticalAlignment + uid: 'word!Word.Interfaces.TableCellData#verticalAlignment:member' + package: word! + fullName: verticalAlignment + summary: 'Specifies the vertical alignment of the cell. The value can be ''Top'', ''Center'', or ''Bottom''.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom";' + return: + type: ' | "Mixed" | "Top" | "Center" | "Bottom"' + - name: width + uid: 'word!Word.Interfaces.TableCellData#width:member' + package: word! + fullName: width + summary: Gets the width of the cell in points. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'width?: number;' + return: + type: number diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecellloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecellloadoptions.yml new file mode 100644 index 0000000000..ad7d618c99 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecellloadoptions.yml @@ -0,0 +1,157 @@ +### YamlMime:TSType +name: Word.Interfaces.TableCellLoadOptions +uid: 'word!Word.Interfaces.TableCellLoadOptions:interface' +package: word! +fullName: Word.Interfaces.TableCellLoadOptions +summary: Represents a table cell in a Word document. +remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.TableCellLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: body + uid: 'word!Word.Interfaces.TableCellLoadOptions#body:member' + package: word! + fullName: body + summary: Gets the body object of the cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'body?: Word.Interfaces.BodyLoadOptions;' + return: + type: '' + - name: cellIndex + uid: 'word!Word.Interfaces.TableCellLoadOptions#cellIndex:member' + package: word! + fullName: cellIndex + summary: Gets the index of the cell in its row. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'cellIndex?: boolean;' + return: + type: boolean + - name: columnWidth + uid: 'word!Word.Interfaces.TableCellLoadOptions#columnWidth:member' + package: word! + fullName: columnWidth + summary: Specifies the width of the cell's column in points. This is applicable to uniform tables. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'columnWidth?: boolean;' + return: + type: boolean + - name: horizontalAlignment + uid: 'word!Word.Interfaces.TableCellLoadOptions#horizontalAlignment:member' + package: word! + fullName: horizontalAlignment + summary: 'Specifies the horizontal alignment of the cell. The value can be ''Left'', ''Centered'', ''Right'', or ''Justified''.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'horizontalAlignment?: boolean;' + return: + type: boolean + - name: parentRow + uid: 'word!Word.Interfaces.TableCellLoadOptions#parentRow:member' + package: word! + fullName: parentRow + summary: Gets the parent row of the cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentRow?: Word.Interfaces.TableRowLoadOptions;' + return: + type: '' + - name: parentTable + uid: 'word!Word.Interfaces.TableCellLoadOptions#parentTable:member' + package: word! + fullName: parentTable + summary: Gets the parent table of the cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTable?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: rowIndex + uid: 'word!Word.Interfaces.TableCellLoadOptions#rowIndex:member' + package: word! + fullName: rowIndex + summary: Gets the index of the cell's row in the table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'rowIndex?: boolean;' + return: + type: boolean + - name: shadingColor + uid: 'word!Word.Interfaces.TableCellLoadOptions#shadingColor:member' + package: word! + fullName: shadingColor + summary: 'Specifies the shading color of the cell. Color is specified in "\#RRGGBB" format or by using the color name.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'shadingColor?: boolean;' + return: + type: boolean + - name: value + uid: 'word!Word.Interfaces.TableCellLoadOptions#value:member' + package: word! + fullName: value + summary: Specifies the text of the cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'value?: boolean;' + return: + type: boolean + - name: verticalAlignment + uid: 'word!Word.Interfaces.TableCellLoadOptions#verticalAlignment:member' + package: word! + fullName: verticalAlignment + summary: 'Specifies the vertical alignment of the cell. The value can be ''Top'', ''Center'', or ''Bottom''.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'verticalAlignment?: boolean;' + return: + type: boolean + - name: width + uid: 'word!Word.Interfaces.TableCellLoadOptions#width:member' + package: word! + fullName: width + summary: Gets the width of the cell in points. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'width?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecellupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecellupdatedata.yml new file mode 100644 index 0000000000..e55771ee32 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecellupdatedata.yml @@ -0,0 +1,83 @@ +### YamlMime:TSType +name: Word.Interfaces.TableCellUpdateData +uid: 'word!Word.Interfaces.TableCellUpdateData:interface' +package: word! +fullName: Word.Interfaces.TableCellUpdateData +summary: 'An interface for updating data on the `TableCell` object, for use in `tableCell.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: body + uid: 'word!Word.Interfaces.TableCellUpdateData#body:member' + package: word! + fullName: body + summary: Gets the body object of the cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'body?: Word.Interfaces.BodyUpdateData;' + return: + type: '' + - name: columnWidth + uid: 'word!Word.Interfaces.TableCellUpdateData#columnWidth:member' + package: word! + fullName: columnWidth + summary: Specifies the width of the cell's column in points. This is applicable to uniform tables. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'columnWidth?: number;' + return: + type: number + - name: horizontalAlignment + uid: 'word!Word.Interfaces.TableCellUpdateData#horizontalAlignment:member' + package: word! + fullName: horizontalAlignment + summary: 'Specifies the horizontal alignment of the cell. The value can be ''Left'', ''Centered'', ''Right'', or ''Justified''.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified";' + return: + type: ' | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"' + - name: shadingColor + uid: 'word!Word.Interfaces.TableCellUpdateData#shadingColor:member' + package: word! + fullName: shadingColor + summary: 'Specifies the shading color of the cell. Color is specified in "\#RRGGBB" format or by using the color name.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'shadingColor?: string;' + return: + type: string + - name: value + uid: 'word!Word.Interfaces.TableCellUpdateData#value:member' + package: word! + fullName: value + summary: Specifies the text of the cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'value?: string;' + return: + type: string + - name: verticalAlignment + uid: 'word!Word.Interfaces.TableCellUpdateData#verticalAlignment:member' + package: word! + fullName: verticalAlignment + summary: 'Specifies the vertical alignment of the cell. The value can be ''Top'', ''Center'', or ''Bottom''.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom";' + return: + type: ' | "Mixed" | "Top" | "Center" | "Bottom"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecollectiondata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecollectiondata.yml new file mode 100644 index 0000000000..2eb45d2c0f --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.TableCollectionData +uid: 'word!Word.Interfaces.TableCollectionData:interface' +package: word! +fullName: Word.Interfaces.TableCollectionData +summary: An interface describing the data returned by calling `tableCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.TableCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.TableData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecollectionloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecollectionloadoptions.yml new file mode 100644 index 0000000000..89d21aef7b --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecollectionloadoptions.yml @@ -0,0 +1,361 @@ +### YamlMime:TSType +name: Word.Interfaces.TableCollectionLoadOptions +uid: 'word!Word.Interfaces.TableCollectionLoadOptions:interface' +package: word! +fullName: Word.Interfaces.TableCollectionLoadOptions +summary: Contains the collection of the document's Table objects. +remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: alignment + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#alignment:member' + package: word! + fullName: alignment + summary: >- + For EACH ITEM in the collection: Specifies the alignment of the table against the page column. The value can be + 'Left', 'Centered', or 'Right'. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'alignment?: boolean;' + return: + type: boolean + - name: font + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#font:member' + package: word! + fullName: font + summary: >- + For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other + properties. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontLoadOptions;' + return: + type: '' + - name: headerRowCount + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#headerRowCount:member' + package: word! + fullName: headerRowCount + summary: 'For EACH ITEM in the collection: Specifies the number of header rows.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'headerRowCount?: boolean;' + return: + type: boolean + - name: horizontalAlignment + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#horizontalAlignment:member' + package: word! + fullName: horizontalAlignment + summary: >- + For EACH ITEM in the collection: Specifies the horizontal alignment of every cell in the table. The value can be + 'Left', 'Centered', 'Right', or 'Justified'. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'horizontalAlignment?: boolean;' + return: + type: boolean + - name: isUniform + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#isUniform:member' + package: word! + fullName: isUniform + summary: 'For EACH ITEM in the collection: Indicates whether all of the table rows are uniform.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'isUniform?: boolean;' + return: + type: boolean + - name: nestingLevel + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#nestingLevel:member' + package: word! + fullName: nestingLevel + summary: 'For EACH ITEM in the collection: Gets the nesting level of the table. Top-level tables have level 1.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'nestingLevel?: boolean;' + return: + type: boolean + - name: parentBody + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#parentBody:member' + package: word! + fullName: parentBody + summary: 'For EACH ITEM in the collection: Gets the parent body of the table.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentBody?: Word.Interfaces.BodyLoadOptions;' + return: + type: '' + - name: parentContentControl + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#parentContentControl:member' + package: word! + fullName: parentContentControl + summary: >- + For EACH ITEM in the collection: Gets the content control that contains the table. Throws an `ItemNotFound` error + if there isn't a parent content control. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControl?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentContentControlOrNullObject + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#parentContentControlOrNullObject:member' + package: word! + fullName: parentContentControlOrNullObject + summary: >- + For EACH ITEM in the collection: Gets the content control that contains the table. If there isn't a parent content + control, then this method will return an object with its `isNullObject` property set to `true`. For + further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentTable + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#parentTable:member' + package: word! + fullName: parentTable + summary: >- + For EACH ITEM in the collection: Gets the table that contains this table. Throws an `ItemNotFound` error if it + isn't contained in a table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTable?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: parentTableCell + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#parentTableCell:member' + package: word! + fullName: parentTableCell + summary: >- + For EACH ITEM in the collection: Gets the table cell that contains this table. Throws an `ItemNotFound` error if + it isn't contained in a table cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableCell?: Word.Interfaces.TableCellLoadOptions;' + return: + type: '' + - name: parentTableCellOrNullObject + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#parentTableCellOrNullObject:member' + package: word! + fullName: parentTableCellOrNullObject + summary: >- + For EACH ITEM in the collection: Gets the table cell that contains this table. If it isn't contained in a table + cell, then this method will return an object with its `isNullObject` property set to `true`. For further + information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions;' + return: + type: '' + - name: parentTableOrNullObject + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#parentTableOrNullObject:member' + package: word! + fullName: parentTableOrNullObject + summary: >- + For EACH ITEM in the collection: Gets the table that contains this table. If it isn't contained in a table, then + this method will return an object with its `isNullObject` property set to `true`. For further information, + see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableOrNullObject?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: rowCount + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#rowCount:member' + package: word! + fullName: rowCount + summary: 'For EACH ITEM in the collection: Gets the number of rows in the table.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'rowCount?: boolean;' + return: + type: boolean + - name: shadingColor + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#shadingColor:member' + package: word! + fullName: shadingColor + summary: >- + For EACH ITEM in the collection: Specifies the shading color. Color is specified in "\#RRGGBB" format or by using + the color name. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'shadingColor?: boolean;' + return: + type: boolean + - name: style + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#style:member' + package: word! + fullName: style + summary: >- + For EACH ITEM in the collection: Specifies the style name for the table. Use this property for custom styles and + localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" + property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'style?: boolean;' + return: + type: boolean + - name: styleBandedColumns + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#styleBandedColumns:member' + package: word! + fullName: styleBandedColumns + summary: 'For EACH ITEM in the collection: Specifies whether the table has banded columns.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleBandedColumns?: boolean;' + return: + type: boolean + - name: styleBandedRows + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#styleBandedRows:member' + package: word! + fullName: styleBandedRows + summary: 'For EACH ITEM in the collection: Specifies whether the table has banded rows.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleBandedRows?: boolean;' + return: + type: boolean + - name: styleBuiltIn + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#styleBuiltIn:member' + package: word! + fullName: styleBuiltIn + summary: >- + For EACH ITEM in the collection: Specifies the built-in style name for the table. Use this property for built-in + styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleBuiltIn?: boolean;' + return: + type: boolean + - name: styleFirstColumn + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#styleFirstColumn:member' + package: word! + fullName: styleFirstColumn + summary: 'For EACH ITEM in the collection: Specifies whether the table has a first column with a special style.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleFirstColumn?: boolean;' + return: + type: boolean + - name: styleLastColumn + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#styleLastColumn:member' + package: word! + fullName: styleLastColumn + summary: 'For EACH ITEM in the collection: Specifies whether the table has a last column with a special style.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleLastColumn?: boolean;' + return: + type: boolean + - name: styleTotalRow + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#styleTotalRow:member' + package: word! + fullName: styleTotalRow + summary: 'For EACH ITEM in the collection: Specifies whether the table has a total (last) row with a special style.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleTotalRow?: boolean;' + return: + type: boolean + - name: values + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#values:member' + package: word! + fullName: values + summary: 'For EACH ITEM in the collection: Specifies the text values in the table, as a 2D JavaScript array.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'values?: boolean;' + return: + type: boolean + - name: verticalAlignment + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#verticalAlignment:member' + package: word! + fullName: verticalAlignment + summary: >- + For EACH ITEM in the collection: Specifies the vertical alignment of every cell in the table. The value can be + 'Top', 'Center', or 'Bottom'. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'verticalAlignment?: boolean;' + return: + type: boolean + - name: width + uid: 'word!Word.Interfaces.TableCollectionLoadOptions#width:member' + package: word! + fullName: width + summary: 'For EACH ITEM in the collection: Specifies the width of the table in points.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'width?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecollectionupdatedata.yml new file mode 100644 index 0000000000..6179241aac --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablecollectionupdatedata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.TableCollectionUpdateData +uid: 'word!Word.Interfaces.TableCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.TableCollectionUpdateData +summary: 'An interface for updating data on the `TableCollection` object, for use in `tableCollection.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.TableCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.TableData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tabledata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tabledata.yml new file mode 100644 index 0000000000..69f4319b7c --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tabledata.yml @@ -0,0 +1,332 @@ +### YamlMime:TSType +name: Word.Interfaces.TableData +uid: 'word!Word.Interfaces.TableData:interface' +package: word! +fullName: Word.Interfaces.TableData +summary: An interface describing the data returned by calling `table.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: alignment + uid: 'word!Word.Interfaces.TableData#alignment:member' + package: word! + fullName: alignment + summary: 'Specifies the alignment of the table against the page column. The value can be ''Left'', ''Centered'', or ''Right''.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified";' + return: + type: ' | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"' + - name: fields + uid: 'word!Word.Interfaces.TableData#fields:member' + package: word! + fullName: fields + summary: Gets the collection of field objects in the table. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'fields?: Word.Interfaces.FieldData[];' + return: + type: '[]' + - name: font + uid: 'word!Word.Interfaces.TableData#font:member' + package: word! + fullName: font + summary: 'Gets the font. Use this to get and set font name, size, color, and other properties.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontData;' + return: + type: '' + - name: headerRowCount + uid: 'word!Word.Interfaces.TableData#headerRowCount:member' + package: word! + fullName: headerRowCount + summary: Specifies the number of header rows. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'headerRowCount?: number;' + return: + type: number + - name: horizontalAlignment + uid: 'word!Word.Interfaces.TableData#horizontalAlignment:member' + package: word! + fullName: horizontalAlignment + summary: >- + Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or + 'Justified'. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified";' + return: + type: ' | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"' + - name: isUniform + uid: 'word!Word.Interfaces.TableData#isUniform:member' + package: word! + fullName: isUniform + summary: Indicates whether all of the table rows are uniform. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'isUniform?: boolean;' + return: + type: boolean + - name: nestingLevel + uid: 'word!Word.Interfaces.TableData#nestingLevel:member' + package: word! + fullName: nestingLevel + summary: Gets the nesting level of the table. Top-level tables have level 1. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'nestingLevel?: number;' + return: + type: number + - name: rowCount + uid: 'word!Word.Interfaces.TableData#rowCount:member' + package: word! + fullName: rowCount + summary: Gets the number of rows in the table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'rowCount?: number;' + return: + type: number + - name: rows + uid: 'word!Word.Interfaces.TableData#rows:member' + package: word! + fullName: rows + summary: Gets all of the table rows. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'rows?: Word.Interfaces.TableRowData[];' + return: + type: '[]' + - name: shadingColor + uid: 'word!Word.Interfaces.TableData#shadingColor:member' + package: word! + fullName: shadingColor + summary: 'Specifies the shading color. Color is specified in "\#RRGGBB" format or by using the color name.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'shadingColor?: string;' + return: + type: string + - name: style + uid: 'word!Word.Interfaces.TableData#style:member' + package: word! + fullName: style + summary: >- + Specifies the style name for the table. Use this property for custom styles and localized style names. To use the + built-in styles that are portable between locales, see the "styleBuiltIn" property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'style?: string;' + return: + type: string + - name: styleBandedColumns + uid: 'word!Word.Interfaces.TableData#styleBandedColumns:member' + package: word! + fullName: styleBandedColumns + summary: Specifies whether the table has banded columns. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleBandedColumns?: boolean;' + return: + type: boolean + - name: styleBandedRows + uid: 'word!Word.Interfaces.TableData#styleBandedRows:member' + package: word! + fullName: styleBandedRows + summary: Specifies whether the table has banded rows. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleBandedRows?: boolean;' + return: + type: boolean + - name: styleBuiltIn + uid: 'word!Word.Interfaces.TableData#styleBuiltIn:member' + package: word! + fullName: styleBuiltIn + summary: >- + Specifies the built-in style name for the table. Use this property for built-in styles that are portable between + locales. To use custom styles or localized style names, see the "style" property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | + "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | + "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | + "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | + "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | + "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | + "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" + | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" + | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" + | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | + "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" + | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | + "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | + "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | + "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | + "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" + | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | + "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | + "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | + "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | + "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | + "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | + "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | + "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + return: + type: >- + | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | + "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | + "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | + "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | + "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | + "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | + "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | + "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | + "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | + "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | + "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | + "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | + "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" + | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" + | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | + "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | + "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | + "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | + "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | + "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | + "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | + "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | + "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | + "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | + "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6" + - name: styleFirstColumn + uid: 'word!Word.Interfaces.TableData#styleFirstColumn:member' + package: word! + fullName: styleFirstColumn + summary: Specifies whether the table has a first column with a special style. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleFirstColumn?: boolean;' + return: + type: boolean + - name: styleLastColumn + uid: 'word!Word.Interfaces.TableData#styleLastColumn:member' + package: word! + fullName: styleLastColumn + summary: Specifies whether the table has a last column with a special style. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleLastColumn?: boolean;' + return: + type: boolean + - name: styleTotalRow + uid: 'word!Word.Interfaces.TableData#styleTotalRow:member' + package: word! + fullName: styleTotalRow + summary: Specifies whether the table has a total (last) row with a special style. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleTotalRow?: boolean;' + return: + type: boolean + - name: tables + uid: 'word!Word.Interfaces.TableData#tables:member' + package: word! + fullName: tables + summary: Gets the child tables nested one level deeper. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'tables?: Word.Interfaces.TableData[];' + return: + type: '[]' + - name: values + uid: 'word!Word.Interfaces.TableData#values:member' + package: word! + fullName: values + summary: 'Specifies the text values in the table, as a 2D JavaScript array.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'values?: string[][];' + return: + type: 'string[][]' + - name: verticalAlignment + uid: 'word!Word.Interfaces.TableData#verticalAlignment:member' + package: word! + fullName: verticalAlignment + summary: 'Specifies the vertical alignment of every cell in the table. The value can be ''Top'', ''Center'', or ''Bottom''.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom";' + return: + type: ' | "Mixed" | "Top" | "Center" | "Bottom"' + - name: width + uid: 'word!Word.Interfaces.TableData#width:member' + package: word! + fullName: width + summary: Specifies the width of the table in points. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'width?: number;' + return: + type: number diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tableloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tableloadoptions.yml new file mode 100644 index 0000000000..683076c8f1 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tableloadoptions.yml @@ -0,0 +1,349 @@ +### YamlMime:TSType +name: Word.Interfaces.TableLoadOptions +uid: 'word!Word.Interfaces.TableLoadOptions:interface' +package: word! +fullName: Word.Interfaces.TableLoadOptions +summary: Represents a table in a Word document. +remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.TableLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: alignment + uid: 'word!Word.Interfaces.TableLoadOptions#alignment:member' + package: word! + fullName: alignment + summary: 'Specifies the alignment of the table against the page column. The value can be ''Left'', ''Centered'', or ''Right''.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'alignment?: boolean;' + return: + type: boolean + - name: font + uid: 'word!Word.Interfaces.TableLoadOptions#font:member' + package: word! + fullName: font + summary: 'Gets the font. Use this to get and set font name, size, color, and other properties.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontLoadOptions;' + return: + type: '' + - name: headerRowCount + uid: 'word!Word.Interfaces.TableLoadOptions#headerRowCount:member' + package: word! + fullName: headerRowCount + summary: Specifies the number of header rows. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'headerRowCount?: boolean;' + return: + type: boolean + - name: horizontalAlignment + uid: 'word!Word.Interfaces.TableLoadOptions#horizontalAlignment:member' + package: word! + fullName: horizontalAlignment + summary: >- + Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or + 'Justified'. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'horizontalAlignment?: boolean;' + return: + type: boolean + - name: isUniform + uid: 'word!Word.Interfaces.TableLoadOptions#isUniform:member' + package: word! + fullName: isUniform + summary: Indicates whether all of the table rows are uniform. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'isUniform?: boolean;' + return: + type: boolean + - name: nestingLevel + uid: 'word!Word.Interfaces.TableLoadOptions#nestingLevel:member' + package: word! + fullName: nestingLevel + summary: Gets the nesting level of the table. Top-level tables have level 1. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'nestingLevel?: boolean;' + return: + type: boolean + - name: parentBody + uid: 'word!Word.Interfaces.TableLoadOptions#parentBody:member' + package: word! + fullName: parentBody + summary: Gets the parent body of the table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentBody?: Word.Interfaces.BodyLoadOptions;' + return: + type: '' + - name: parentContentControl + uid: 'word!Word.Interfaces.TableLoadOptions#parentContentControl:member' + package: word! + fullName: parentContentControl + summary: >- + Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content + control. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControl?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentContentControlOrNullObject + uid: 'word!Word.Interfaces.TableLoadOptions#parentContentControlOrNullObject:member' + package: word! + fullName: parentContentControlOrNullObject + summary: >- + Gets the content control that contains the table. If there isn't a parent content control, then this method will + return an object with its `isNullObject` property set to `true`. For further information, see + [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions;' + return: + type: '' + - name: parentTable + uid: 'word!Word.Interfaces.TableLoadOptions#parentTable:member' + package: word! + fullName: parentTable + summary: Gets the table that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTable?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: parentTableCell + uid: 'word!Word.Interfaces.TableLoadOptions#parentTableCell:member' + package: word! + fullName: parentTableCell + summary: >- + Gets the table cell that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table + cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableCell?: Word.Interfaces.TableCellLoadOptions;' + return: + type: '' + - name: parentTableCellOrNullObject + uid: 'word!Word.Interfaces.TableLoadOptions#parentTableCellOrNullObject:member' + package: word! + fullName: parentTableCellOrNullObject + summary: >- + Gets the table cell that contains this table. If it isn't contained in a table cell, then this method will return + an object with its `isNullObject` property set to `true`. For further information, see [*OrNullObject + methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions;' + return: + type: '' + - name: parentTableOrNullObject + uid: 'word!Word.Interfaces.TableLoadOptions#parentTableOrNullObject:member' + package: word! + fullName: parentTableOrNullObject + summary: >- + Gets the table that contains this table. If it isn't contained in a table, then this method will return an object + with its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTableOrNullObject?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: rowCount + uid: 'word!Word.Interfaces.TableLoadOptions#rowCount:member' + package: word! + fullName: rowCount + summary: Gets the number of rows in the table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'rowCount?: boolean;' + return: + type: boolean + - name: shadingColor + uid: 'word!Word.Interfaces.TableLoadOptions#shadingColor:member' + package: word! + fullName: shadingColor + summary: 'Specifies the shading color. Color is specified in "\#RRGGBB" format or by using the color name.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'shadingColor?: boolean;' + return: + type: boolean + - name: style + uid: 'word!Word.Interfaces.TableLoadOptions#style:member' + package: word! + fullName: style + summary: >- + Specifies the style name for the table. Use this property for custom styles and localized style names. To use the + built-in styles that are portable between locales, see the "styleBuiltIn" property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'style?: boolean;' + return: + type: boolean + - name: styleBandedColumns + uid: 'word!Word.Interfaces.TableLoadOptions#styleBandedColumns:member' + package: word! + fullName: styleBandedColumns + summary: Specifies whether the table has banded columns. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleBandedColumns?: boolean;' + return: + type: boolean + - name: styleBandedRows + uid: 'word!Word.Interfaces.TableLoadOptions#styleBandedRows:member' + package: word! + fullName: styleBandedRows + summary: Specifies whether the table has banded rows. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleBandedRows?: boolean;' + return: + type: boolean + - name: styleBuiltIn + uid: 'word!Word.Interfaces.TableLoadOptions#styleBuiltIn:member' + package: word! + fullName: styleBuiltIn + summary: >- + Specifies the built-in style name for the table. Use this property for built-in styles that are portable between + locales. To use custom styles or localized style names, see the "style" property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleBuiltIn?: boolean;' + return: + type: boolean + - name: styleFirstColumn + uid: 'word!Word.Interfaces.TableLoadOptions#styleFirstColumn:member' + package: word! + fullName: styleFirstColumn + summary: Specifies whether the table has a first column with a special style. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleFirstColumn?: boolean;' + return: + type: boolean + - name: styleLastColumn + uid: 'word!Word.Interfaces.TableLoadOptions#styleLastColumn:member' + package: word! + fullName: styleLastColumn + summary: Specifies whether the table has a last column with a special style. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleLastColumn?: boolean;' + return: + type: boolean + - name: styleTotalRow + uid: 'word!Word.Interfaces.TableLoadOptions#styleTotalRow:member' + package: word! + fullName: styleTotalRow + summary: Specifies whether the table has a total (last) row with a special style. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleTotalRow?: boolean;' + return: + type: boolean + - name: values + uid: 'word!Word.Interfaces.TableLoadOptions#values:member' + package: word! + fullName: values + summary: 'Specifies the text values in the table, as a 2D JavaScript array.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'values?: boolean;' + return: + type: boolean + - name: verticalAlignment + uid: 'word!Word.Interfaces.TableLoadOptions#verticalAlignment:member' + package: word! + fullName: verticalAlignment + summary: 'Specifies the vertical alignment of every cell in the table. The value can be ''Top'', ''Center'', or ''Bottom''.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'verticalAlignment?: boolean;' + return: + type: boolean + - name: width + uid: 'word!Word.Interfaces.TableLoadOptions#width:member' + package: word! + fullName: width + summary: Specifies the width of the table in points. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'width?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablerowcollectiondata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablerowcollectiondata.yml new file mode 100644 index 0000000000..c496b0161d --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablerowcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.TableRowCollectionData +uid: 'word!Word.Interfaces.TableRowCollectionData:interface' +package: word! +fullName: Word.Interfaces.TableRowCollectionData +summary: An interface describing the data returned by calling `tableRowCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.TableRowCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.TableRowData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablerowcollectionloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablerowcollectionloadoptions.yml new file mode 100644 index 0000000000..40ce88b2b1 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablerowcollectionloadoptions.yml @@ -0,0 +1,155 @@ +### YamlMime:TSType +name: Word.Interfaces.TableRowCollectionLoadOptions +uid: 'word!Word.Interfaces.TableRowCollectionLoadOptions:interface' +package: word! +fullName: Word.Interfaces.TableRowCollectionLoadOptions +summary: Contains the collection of the document's TableRow objects. +remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.TableRowCollectionLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: cellCount + uid: 'word!Word.Interfaces.TableRowCollectionLoadOptions#cellCount:member' + package: word! + fullName: cellCount + summary: 'For EACH ITEM in the collection: Gets the number of cells in the row.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'cellCount?: boolean;' + return: + type: boolean + - name: font + uid: 'word!Word.Interfaces.TableRowCollectionLoadOptions#font:member' + package: word! + fullName: font + summary: >- + For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other + properties. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontLoadOptions;' + return: + type: '' + - name: horizontalAlignment + uid: 'word!Word.Interfaces.TableRowCollectionLoadOptions#horizontalAlignment:member' + package: word! + fullName: horizontalAlignment + summary: >- + For EACH ITEM in the collection: Specifies the horizontal alignment of every cell in the row. The value can be + 'Left', 'Centered', 'Right', or 'Justified'. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'horizontalAlignment?: boolean;' + return: + type: boolean + - name: isHeader + uid: 'word!Word.Interfaces.TableRowCollectionLoadOptions#isHeader:member' + package: word! + fullName: isHeader + summary: >- + For EACH ITEM in the collection: Checks whether the row is a header row. To set the number of header rows, use + `headerRowCount` on the Table object. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'isHeader?: boolean;' + return: + type: boolean + - name: parentTable + uid: 'word!Word.Interfaces.TableRowCollectionLoadOptions#parentTable:member' + package: word! + fullName: parentTable + summary: 'For EACH ITEM in the collection: Gets parent table.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTable?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: preferredHeight + uid: 'word!Word.Interfaces.TableRowCollectionLoadOptions#preferredHeight:member' + package: word! + fullName: preferredHeight + summary: 'For EACH ITEM in the collection: Specifies the preferred height of the row in points.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'preferredHeight?: boolean;' + return: + type: boolean + - name: rowIndex + uid: 'word!Word.Interfaces.TableRowCollectionLoadOptions#rowIndex:member' + package: word! + fullName: rowIndex + summary: 'For EACH ITEM in the collection: Gets the index of the row in its parent table.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'rowIndex?: boolean;' + return: + type: boolean + - name: shadingColor + uid: 'word!Word.Interfaces.TableRowCollectionLoadOptions#shadingColor:member' + package: word! + fullName: shadingColor + summary: >- + For EACH ITEM in the collection: Specifies the shading color. Color is specified in "\#RRGGBB" format or by using + the color name. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'shadingColor?: boolean;' + return: + type: boolean + - name: values + uid: 'word!Word.Interfaces.TableRowCollectionLoadOptions#values:member' + package: word! + fullName: values + summary: 'For EACH ITEM in the collection: Specifies the text values in the row, as a 2D JavaScript array.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'values?: boolean;' + return: + type: boolean + - name: verticalAlignment + uid: 'word!Word.Interfaces.TableRowCollectionLoadOptions#verticalAlignment:member' + package: word! + fullName: verticalAlignment + summary: >- + For EACH ITEM in the collection: Specifies the vertical alignment of the cells in the row. The value can be 'Top', + 'Center', or 'Bottom'. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'verticalAlignment?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablerowcollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablerowcollectionupdatedata.yml new file mode 100644 index 0000000000..1fd8f75f65 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablerowcollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.TableRowCollectionUpdateData +uid: 'word!Word.Interfaces.TableRowCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.TableRowCollectionUpdateData +summary: >- + An interface for updating data on the `TableRowCollection` object, for use in `tableRowCollection.set({ ... })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.TableRowCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.TableRowData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablerowdata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablerowdata.yml new file mode 100644 index 0000000000..d3c2fc825b --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablerowdata.yml @@ -0,0 +1,147 @@ +### YamlMime:TSType +name: Word.Interfaces.TableRowData +uid: 'word!Word.Interfaces.TableRowData:interface' +package: word! +fullName: Word.Interfaces.TableRowData +summary: An interface describing the data returned by calling `tableRow.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: cellCount + uid: 'word!Word.Interfaces.TableRowData#cellCount:member' + package: word! + fullName: cellCount + summary: Gets the number of cells in the row. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'cellCount?: number;' + return: + type: number + - name: cells + uid: 'word!Word.Interfaces.TableRowData#cells:member' + package: word! + fullName: cells + summary: Gets cells. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'cells?: Word.Interfaces.TableCellData[];' + return: + type: '[]' + - name: fields + uid: 'word!Word.Interfaces.TableRowData#fields:member' + package: word! + fullName: fields + summary: Gets the collection of field objects in the table row. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'fields?: Word.Interfaces.FieldData[];' + return: + type: '[]' + - name: font + uid: 'word!Word.Interfaces.TableRowData#font:member' + package: word! + fullName: font + summary: 'Gets the font. Use this to get and set font name, size, color, and other properties.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontData;' + return: + type: '' + - name: horizontalAlignment + uid: 'word!Word.Interfaces.TableRowData#horizontalAlignment:member' + package: word! + fullName: horizontalAlignment + summary: >- + Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or + 'Justified'. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified";' + return: + type: ' | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"' + - name: isHeader + uid: 'word!Word.Interfaces.TableRowData#isHeader:member' + package: word! + fullName: isHeader + summary: >- + Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table + object. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'isHeader?: boolean;' + return: + type: boolean + - name: preferredHeight + uid: 'word!Word.Interfaces.TableRowData#preferredHeight:member' + package: word! + fullName: preferredHeight + summary: Specifies the preferred height of the row in points. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'preferredHeight?: number;' + return: + type: number + - name: rowIndex + uid: 'word!Word.Interfaces.TableRowData#rowIndex:member' + package: word! + fullName: rowIndex + summary: Gets the index of the row in its parent table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'rowIndex?: number;' + return: + type: number + - name: shadingColor + uid: 'word!Word.Interfaces.TableRowData#shadingColor:member' + package: word! + fullName: shadingColor + summary: 'Specifies the shading color. Color is specified in "\#RRGGBB" format or by using the color name.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'shadingColor?: string;' + return: + type: string + - name: values + uid: 'word!Word.Interfaces.TableRowData#values:member' + package: word! + fullName: values + summary: 'Specifies the text values in the row, as a 2D JavaScript array.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'values?: string[][];' + return: + type: 'string[][]' + - name: verticalAlignment + uid: 'word!Word.Interfaces.TableRowData#verticalAlignment:member' + package: word! + fullName: verticalAlignment + summary: 'Specifies the vertical alignment of the cells in the row. The value can be ''Top'', ''Center'', or ''Bottom''.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom";' + return: + type: ' | "Mixed" | "Top" | "Center" | "Bottom"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablerowloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablerowloadoptions.yml new file mode 100644 index 0000000000..e1bf71ea7a --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablerowloadoptions.yml @@ -0,0 +1,149 @@ +### YamlMime:TSType +name: Word.Interfaces.TableRowLoadOptions +uid: 'word!Word.Interfaces.TableRowLoadOptions:interface' +package: word! +fullName: Word.Interfaces.TableRowLoadOptions +summary: Represents a row in a Word document. +remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.TableRowLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: cellCount + uid: 'word!Word.Interfaces.TableRowLoadOptions#cellCount:member' + package: word! + fullName: cellCount + summary: Gets the number of cells in the row. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'cellCount?: boolean;' + return: + type: boolean + - name: font + uid: 'word!Word.Interfaces.TableRowLoadOptions#font:member' + package: word! + fullName: font + summary: 'Gets the font. Use this to get and set font name, size, color, and other properties.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontLoadOptions;' + return: + type: '' + - name: horizontalAlignment + uid: 'word!Word.Interfaces.TableRowLoadOptions#horizontalAlignment:member' + package: word! + fullName: horizontalAlignment + summary: >- + Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or + 'Justified'. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'horizontalAlignment?: boolean;' + return: + type: boolean + - name: isHeader + uid: 'word!Word.Interfaces.TableRowLoadOptions#isHeader:member' + package: word! + fullName: isHeader + summary: >- + Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table + object. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'isHeader?: boolean;' + return: + type: boolean + - name: parentTable + uid: 'word!Word.Interfaces.TableRowLoadOptions#parentTable:member' + package: word! + fullName: parentTable + summary: Gets parent table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'parentTable?: Word.Interfaces.TableLoadOptions;' + return: + type: '' + - name: preferredHeight + uid: 'word!Word.Interfaces.TableRowLoadOptions#preferredHeight:member' + package: word! + fullName: preferredHeight + summary: Specifies the preferred height of the row in points. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'preferredHeight?: boolean;' + return: + type: boolean + - name: rowIndex + uid: 'word!Word.Interfaces.TableRowLoadOptions#rowIndex:member' + package: word! + fullName: rowIndex + summary: Gets the index of the row in its parent table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'rowIndex?: boolean;' + return: + type: boolean + - name: shadingColor + uid: 'word!Word.Interfaces.TableRowLoadOptions#shadingColor:member' + package: word! + fullName: shadingColor + summary: 'Specifies the shading color. Color is specified in "\#RRGGBB" format or by using the color name.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'shadingColor?: boolean;' + return: + type: boolean + - name: values + uid: 'word!Word.Interfaces.TableRowLoadOptions#values:member' + package: word! + fullName: values + summary: 'Specifies the text values in the row, as a 2D JavaScript array.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'values?: boolean;' + return: + type: boolean + - name: verticalAlignment + uid: 'word!Word.Interfaces.TableRowLoadOptions#verticalAlignment:member' + package: word! + fullName: verticalAlignment + summary: 'Specifies the vertical alignment of the cells in the row. The value can be ''Top'', ''Center'', or ''Bottom''.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'verticalAlignment?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablerowupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablerowupdatedata.yml new file mode 100644 index 0000000000..66dff6ce3b --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablerowupdatedata.yml @@ -0,0 +1,85 @@ +### YamlMime:TSType +name: Word.Interfaces.TableRowUpdateData +uid: 'word!Word.Interfaces.TableRowUpdateData:interface' +package: word! +fullName: Word.Interfaces.TableRowUpdateData +summary: 'An interface for updating data on the `TableRow` object, for use in `tableRow.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: font + uid: 'word!Word.Interfaces.TableRowUpdateData#font:member' + package: word! + fullName: font + summary: 'Gets the font. Use this to get and set font name, size, color, and other properties.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontUpdateData;' + return: + type: '' + - name: horizontalAlignment + uid: 'word!Word.Interfaces.TableRowUpdateData#horizontalAlignment:member' + package: word! + fullName: horizontalAlignment + summary: >- + Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or + 'Justified'. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified";' + return: + type: ' | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"' + - name: preferredHeight + uid: 'word!Word.Interfaces.TableRowUpdateData#preferredHeight:member' + package: word! + fullName: preferredHeight + summary: Specifies the preferred height of the row in points. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'preferredHeight?: number;' + return: + type: number + - name: shadingColor + uid: 'word!Word.Interfaces.TableRowUpdateData#shadingColor:member' + package: word! + fullName: shadingColor + summary: 'Specifies the shading color. Color is specified in "\#RRGGBB" format or by using the color name.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'shadingColor?: string;' + return: + type: string + - name: values + uid: 'word!Word.Interfaces.TableRowUpdateData#values:member' + package: word! + fullName: values + summary: 'Specifies the text values in the row, as a 2D JavaScript array.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'values?: string[][];' + return: + type: 'string[][]' + - name: verticalAlignment + uid: 'word!Word.Interfaces.TableRowUpdateData#verticalAlignment:member' + package: word! + fullName: verticalAlignment + summary: 'Specifies the vertical alignment of the cells in the row. The value can be ''Top'', ''Center'', or ''Bottom''.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom";' + return: + type: ' | "Mixed" | "Top" | "Center" | "Bottom"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablestyledata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablestyledata.yml new file mode 100644 index 0000000000..ff39bce762 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablestyledata.yml @@ -0,0 +1,71 @@ +### YamlMime:TSType +name: Word.Interfaces.TableStyleData +uid: 'word!Word.Interfaces.TableStyleData:interface' +package: word! +fullName: Word.Interfaces.TableStyleData +summary: An interface describing the data returned by calling `tableStyle.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: bottomCellMargin + uid: 'word!Word.Interfaces.TableStyleData#bottomCellMargin:member' + package: word! + fullName: bottomCellMargin + summary: Specifies the amount of space to add between the contents and the bottom borders of the cells. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'bottomCellMargin?: number;' + return: + type: number + - name: cellSpacing + uid: 'word!Word.Interfaces.TableStyleData#cellSpacing:member' + package: word! + fullName: cellSpacing + summary: Specifies the spacing (in points) between the cells in a table style. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'cellSpacing?: number;' + return: + type: number + - name: leftCellMargin + uid: 'word!Word.Interfaces.TableStyleData#leftCellMargin:member' + package: word! + fullName: leftCellMargin + summary: Specifies the amount of space to add between the contents and the left borders of the cells. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'leftCellMargin?: number;' + return: + type: number + - name: rightCellMargin + uid: 'word!Word.Interfaces.TableStyleData#rightCellMargin:member' + package: word! + fullName: rightCellMargin + summary: Specifies the amount of space to add between the contents and the right borders of the cells. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'rightCellMargin?: number;' + return: + type: number + - name: topCellMargin + uid: 'word!Word.Interfaces.TableStyleData#topCellMargin:member' + package: word! + fullName: topCellMargin + summary: Specifies the amount of space to add between the contents and the top borders of the cells. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'topCellMargin?: number;' + return: + type: number diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablestyleloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablestyleloadoptions.yml new file mode 100644 index 0000000000..3d955764e8 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablestyleloadoptions.yml @@ -0,0 +1,85 @@ +### YamlMime:TSType +name: Word.Interfaces.TableStyleLoadOptions +uid: 'word!Word.Interfaces.TableStyleLoadOptions:interface' +package: word! +fullName: Word.Interfaces.TableStyleLoadOptions +summary: Represents the TableStyle object. +remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.TableStyleLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: bottomCellMargin + uid: 'word!Word.Interfaces.TableStyleLoadOptions#bottomCellMargin:member' + package: word! + fullName: bottomCellMargin + summary: Specifies the amount of space to add between the contents and the bottom borders of the cells. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'bottomCellMargin?: boolean;' + return: + type: boolean + - name: cellSpacing + uid: 'word!Word.Interfaces.TableStyleLoadOptions#cellSpacing:member' + package: word! + fullName: cellSpacing + summary: Specifies the spacing (in points) between the cells in a table style. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'cellSpacing?: boolean;' + return: + type: boolean + - name: leftCellMargin + uid: 'word!Word.Interfaces.TableStyleLoadOptions#leftCellMargin:member' + package: word! + fullName: leftCellMargin + summary: Specifies the amount of space to add between the contents and the left borders of the cells. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'leftCellMargin?: boolean;' + return: + type: boolean + - name: rightCellMargin + uid: 'word!Word.Interfaces.TableStyleLoadOptions#rightCellMargin:member' + package: word! + fullName: rightCellMargin + summary: Specifies the amount of space to add between the contents and the right borders of the cells. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'rightCellMargin?: boolean;' + return: + type: boolean + - name: topCellMargin + uid: 'word!Word.Interfaces.TableStyleLoadOptions#topCellMargin:member' + package: word! + fullName: topCellMargin + summary: Specifies the amount of space to add between the contents and the top borders of the cells. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'topCellMargin?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablestyleupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablestyleupdatedata.yml new file mode 100644 index 0000000000..c7e888345e --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tablestyleupdatedata.yml @@ -0,0 +1,71 @@ +### YamlMime:TSType +name: Word.Interfaces.TableStyleUpdateData +uid: 'word!Word.Interfaces.TableStyleUpdateData:interface' +package: word! +fullName: Word.Interfaces.TableStyleUpdateData +summary: 'An interface for updating data on the `TableStyle` object, for use in `tableStyle.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: bottomCellMargin + uid: 'word!Word.Interfaces.TableStyleUpdateData#bottomCellMargin:member' + package: word! + fullName: bottomCellMargin + summary: Specifies the amount of space to add between the contents and the bottom borders of the cells. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'bottomCellMargin?: number;' + return: + type: number + - name: cellSpacing + uid: 'word!Word.Interfaces.TableStyleUpdateData#cellSpacing:member' + package: word! + fullName: cellSpacing + summary: Specifies the spacing (in points) between the cells in a table style. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'cellSpacing?: number;' + return: + type: number + - name: leftCellMargin + uid: 'word!Word.Interfaces.TableStyleUpdateData#leftCellMargin:member' + package: word! + fullName: leftCellMargin + summary: Specifies the amount of space to add between the contents and the left borders of the cells. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'leftCellMargin?: number;' + return: + type: number + - name: rightCellMargin + uid: 'word!Word.Interfaces.TableStyleUpdateData#rightCellMargin:member' + package: word! + fullName: rightCellMargin + summary: Specifies the amount of space to add between the contents and the right borders of the cells. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'rightCellMargin?: number;' + return: + type: number + - name: topCellMargin + uid: 'word!Word.Interfaces.TableStyleUpdateData#topCellMargin:member' + package: word! + fullName: topCellMargin + summary: Specifies the amount of space to add between the contents and the top borders of the cells. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'topCellMargin?: number;' + return: + type: number diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tableupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tableupdatedata.yml new file mode 100644 index 0000000000..a9bb901680 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.tableupdatedata.yml @@ -0,0 +1,260 @@ +### YamlMime:TSType +name: Word.Interfaces.TableUpdateData +uid: 'word!Word.Interfaces.TableUpdateData:interface' +package: word! +fullName: Word.Interfaces.TableUpdateData +summary: 'An interface for updating data on the `Table` object, for use in `table.set({ ... })`.' +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: alignment + uid: 'word!Word.Interfaces.TableUpdateData#alignment:member' + package: word! + fullName: alignment + summary: 'Specifies the alignment of the table against the page column. The value can be ''Left'', ''Centered'', or ''Right''.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified";' + return: + type: ' | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"' + - name: font + uid: 'word!Word.Interfaces.TableUpdateData#font:member' + package: word! + fullName: font + summary: 'Gets the font. Use this to get and set font name, size, color, and other properties.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'font?: Word.Interfaces.FontUpdateData;' + return: + type: '' + - name: headerRowCount + uid: 'word!Word.Interfaces.TableUpdateData#headerRowCount:member' + package: word! + fullName: headerRowCount + summary: Specifies the number of header rows. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'headerRowCount?: number;' + return: + type: number + - name: horizontalAlignment + uid: 'word!Word.Interfaces.TableUpdateData#horizontalAlignment:member' + package: word! + fullName: horizontalAlignment + summary: >- + Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or + 'Justified'. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified";' + return: + type: ' | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"' + - name: shadingColor + uid: 'word!Word.Interfaces.TableUpdateData#shadingColor:member' + package: word! + fullName: shadingColor + summary: 'Specifies the shading color. Color is specified in "\#RRGGBB" format or by using the color name.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'shadingColor?: string;' + return: + type: string + - name: style + uid: 'word!Word.Interfaces.TableUpdateData#style:member' + package: word! + fullName: style + summary: >- + Specifies the style name for the table. Use this property for custom styles and localized style names. To use the + built-in styles that are portable between locales, see the "styleBuiltIn" property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'style?: string;' + return: + type: string + - name: styleBandedColumns + uid: 'word!Word.Interfaces.TableUpdateData#styleBandedColumns:member' + package: word! + fullName: styleBandedColumns + summary: Specifies whether the table has banded columns. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleBandedColumns?: boolean;' + return: + type: boolean + - name: styleBandedRows + uid: 'word!Word.Interfaces.TableUpdateData#styleBandedRows:member' + package: word! + fullName: styleBandedRows + summary: Specifies whether the table has banded rows. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleBandedRows?: boolean;' + return: + type: boolean + - name: styleBuiltIn + uid: 'word!Word.Interfaces.TableUpdateData#styleBuiltIn:member' + package: word! + fullName: styleBuiltIn + summary: >- + Specifies the built-in style name for the table. Use this property for built-in styles that are portable between + locales. To use custom styles or localized style names, see the "style" property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | + "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | + "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | + "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | + "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | + "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | + "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" + | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" + | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" + | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | + "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" + | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | + "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | + "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | + "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | + "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" + | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | + "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | + "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | + "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | + "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | + "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | + "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | + "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + return: + type: >- + | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | + "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | + "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | + "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | + "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | + "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | + "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | + "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | + "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | + "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | + "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | + "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | + "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" + | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" + | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | + "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | + "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | + "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | + "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | + "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | + "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | + "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | + "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | + "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | + "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6" + - name: styleFirstColumn + uid: 'word!Word.Interfaces.TableUpdateData#styleFirstColumn:member' + package: word! + fullName: styleFirstColumn + summary: Specifies whether the table has a first column with a special style. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleFirstColumn?: boolean;' + return: + type: boolean + - name: styleLastColumn + uid: 'word!Word.Interfaces.TableUpdateData#styleLastColumn:member' + package: word! + fullName: styleLastColumn + summary: Specifies whether the table has a last column with a special style. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleLastColumn?: boolean;' + return: + type: boolean + - name: styleTotalRow + uid: 'word!Word.Interfaces.TableUpdateData#styleTotalRow:member' + package: word! + fullName: styleTotalRow + summary: Specifies whether the table has a total (last) row with a special style. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleTotalRow?: boolean;' + return: + type: boolean + - name: values + uid: 'word!Word.Interfaces.TableUpdateData#values:member' + package: word! + fullName: values + summary: 'Specifies the text values in the table, as a 2D JavaScript array.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'values?: string[][];' + return: + type: 'string[][]' + - name: verticalAlignment + uid: 'word!Word.Interfaces.TableUpdateData#verticalAlignment:member' + package: word! + fullName: verticalAlignment + summary: 'Specifies the vertical alignment of every cell in the table. The value can be ''Top'', ''Center'', or ''Bottom''.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom";' + return: + type: ' | "Mixed" | "Top" | "Center" | "Bottom"' + - name: width + uid: 'word!Word.Interfaces.TableUpdateData#width:member' + package: word! + fullName: width + summary: Specifies the width of the table in points. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'width?: number;' + return: + type: number diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.trackedchangecollectiondata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.trackedchangecollectiondata.yml new file mode 100644 index 0000000000..8ccdef3dc8 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.trackedchangecollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.TrackedChangeCollectionData +uid: 'word!Word.Interfaces.TrackedChangeCollectionData:interface' +package: word! +fullName: Word.Interfaces.TrackedChangeCollectionData +summary: An interface describing the data returned by calling `trackedChangeCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.TrackedChangeCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.TrackedChangeData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.trackedchangecollectionloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.trackedchangecollectionloadoptions.yml new file mode 100644 index 0000000000..7f3fbf97c2 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.trackedchangecollectionloadoptions.yml @@ -0,0 +1,73 @@ +### YamlMime:TSType +name: Word.Interfaces.TrackedChangeCollectionLoadOptions +uid: 'word!Word.Interfaces.TrackedChangeCollectionLoadOptions:interface' +package: word! +fullName: Word.Interfaces.TrackedChangeCollectionLoadOptions +summary: 'Contains a collection of [Word.TrackedChange](xref:word!Word.TrackedChange:class) objects.' +remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.TrackedChangeCollectionLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: author + uid: 'word!Word.Interfaces.TrackedChangeCollectionLoadOptions#author:member' + package: word! + fullName: author + summary: 'For EACH ITEM in the collection: Gets the author of the tracked change.' + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'author?: boolean;' + return: + type: boolean + - name: date + uid: 'word!Word.Interfaces.TrackedChangeCollectionLoadOptions#date:member' + package: word! + fullName: date + summary: 'For EACH ITEM in the collection: Gets the date of the tracked change.' + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'date?: boolean;' + return: + type: boolean + - name: text + uid: 'word!Word.Interfaces.TrackedChangeCollectionLoadOptions#text:member' + package: word! + fullName: text + summary: 'For EACH ITEM in the collection: Gets the text of the tracked change.' + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'text?: boolean;' + return: + type: boolean + - name: type + uid: 'word!Word.Interfaces.TrackedChangeCollectionLoadOptions#type:member' + package: word! + fullName: type + summary: 'For EACH ITEM in the collection: Gets the type of the tracked change.' + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.trackedchangecollectionupdatedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.trackedchangecollectionupdatedata.yml new file mode 100644 index 0000000000..8d664e0d1e --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.trackedchangecollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.TrackedChangeCollectionUpdateData +uid: 'word!Word.Interfaces.TrackedChangeCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.TrackedChangeCollectionUpdateData +summary: >- + An interface for updating data on the `TrackedChangeCollection` object, for use in `trackedChangeCollection.set({ ... + })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.TrackedChangeCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.TrackedChangeData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.trackedchangedata.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.trackedchangedata.yml new file mode 100644 index 0000000000..dc4c170c46 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.trackedchangedata.yml @@ -0,0 +1,59 @@ +### YamlMime:TSType +name: Word.Interfaces.TrackedChangeData +uid: 'word!Word.Interfaces.TrackedChangeData:interface' +package: word! +fullName: Word.Interfaces.TrackedChangeData +summary: An interface describing the data returned by calling `trackedChange.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: author + uid: 'word!Word.Interfaces.TrackedChangeData#author:member' + package: word! + fullName: author + summary: Gets the author of the tracked change. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'author?: string;' + return: + type: string + - name: date + uid: 'word!Word.Interfaces.TrackedChangeData#date:member' + package: word! + fullName: date + summary: Gets the date of the tracked change. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'date?: Date;' + return: + type: Date + - name: text + uid: 'word!Word.Interfaces.TrackedChangeData#text:member' + package: word! + fullName: text + summary: Gets the text of the tracked change. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'text?: string;' + return: + type: string + - name: type + uid: 'word!Word.Interfaces.TrackedChangeData#type:member' + package: word! + fullName: type + summary: Gets the type of the tracked change. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type?: Word.TrackedChangeType | "None" | "Added" | "Deleted" | "Formatted";' + return: + type: ' | "None" | "Added" | "Deleted" | "Formatted"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.interfaces.trackedchangeloadoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.trackedchangeloadoptions.yml new file mode 100644 index 0000000000..fd55875e7a --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.interfaces.trackedchangeloadoptions.yml @@ -0,0 +1,73 @@ +### YamlMime:TSType +name: Word.Interfaces.TrackedChangeLoadOptions +uid: 'word!Word.Interfaces.TrackedChangeLoadOptions:interface' +package: word! +fullName: Word.Interfaces.TrackedChangeLoadOptions +summary: Represents a tracked change in a Word document. +remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.TrackedChangeLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: author + uid: 'word!Word.Interfaces.TrackedChangeLoadOptions#author:member' + package: word! + fullName: author + summary: Gets the author of the tracked change. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'author?: boolean;' + return: + type: boolean + - name: date + uid: 'word!Word.Interfaces.TrackedChangeLoadOptions#date:member' + package: word! + fullName: date + summary: Gets the date of the tracked change. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'date?: boolean;' + return: + type: boolean + - name: text + uid: 'word!Word.Interfaces.TrackedChangeLoadOptions#text:member' + package: word! + fullName: text + summary: Gets the text of the tracked change. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'text?: boolean;' + return: + type: boolean + - name: type + uid: 'word!Word.Interfaces.TrackedChangeLoadOptions#type:member' + package: word! + fullName: type + summary: Gets the type of the tracked change. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_1_9/word/word.list.yml b/docs/docs-ref-autogen/word_1_9/word/word.list.yml new file mode 100644 index 0000000000..79175c0e95 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.list.yml @@ -0,0 +1,717 @@ +### YamlMime:TSType +name: Word.List +uid: 'word!Word.List:class' +package: word! +fullName: Word.List +summary: 'Contains a collection of [Word.Paragraph](xref:word!Word.Paragraph:class) objects.' +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/20-lists/insert-list.yaml + + + // This example starts a new list with the second paragraph. + + await Word.run(async (context) => { + const paragraphs: Word.ParagraphCollection = context.document.body.paragraphs; + paragraphs.load("$none"); + + await context.sync(); + + // Start new list using the second paragraph. + const list: Word.List = paragraphs.items[1].startNewList(); + list.load("$none"); + + await context.sync(); + + // To add new items to the list, use Start or End on the insertLocation parameter. + list.insertParagraph("New list item at the start of the list", "Start"); + const paragraph: Word.Paragraph = list.insertParagraph("New list item at the end of the list (set to list level 5)", "End"); + + // Set up list level for the list item. + paragraph.listItem.level = 4; + + // To add paragraphs outside the list, use Before or After. + list.insertParagraph("New paragraph goes after (not part of the list)", "After"); + + await context.sync(); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.List#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: id + uid: 'word!Word.List#id:member' + package: word! + fullName: id + summary: Gets the list's id. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly id: number;' + return: + type: number + - name: levelExistences + uid: 'word!Word.List#levelExistences:member' + package: word! + fullName: levelExistences + summary: >- + Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there + is at least one list item at that level. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/20-lists/organize-list.yaml + + + // Gets information about the first list in the document. + + await Word.run(async (context) => { + const lists: Word.ListCollection = context.document.body.lists; + lists.load("items"); + + await context.sync(); + + if (lists.items.length === 0) { + console.warn("There are no lists in this document."); + return; + } + + // Get the first list. + const list: Word.List = lists.getFirst(); + list.load("levelTypes,levelExistences"); + + await context.sync(); + + const levelTypes = list.levelTypes; + console.log("Level types of the first list:"); + for (let i = 0; i < levelTypes.length; i++) { + console.log(`- Level ${i + 1} (index ${i}): ${levelTypes[i]}`); + } + + const levelExistences = list.levelExistences; + console.log("Level existences of the first list:"); + for (let i = 0; i < levelExistences.length; i++) { + console.log(`- Level ${i + 1} (index ${i}): ${levelExistences[i]}`); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly levelExistences: boolean[];' + return: + type: 'boolean[]' + - name: levelTypes + uid: 'word!Word.List#levelTypes:member' + package: word! + fullName: levelTypes + summary: 'Gets all 9 level types in the list. Each type can be ''Bullet'', ''Number'', or ''Picture''.' + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/20-lists/organize-list.yaml + + + // Gets information about the first list in the document. + + await Word.run(async (context) => { + const lists: Word.ListCollection = context.document.body.lists; + lists.load("items"); + + await context.sync(); + + if (lists.items.length === 0) { + console.warn("There are no lists in this document."); + return; + } + + // Get the first list. + const list: Word.List = lists.getFirst(); + list.load("levelTypes,levelExistences"); + + await context.sync(); + + const levelTypes = list.levelTypes; + console.log("Level types of the first list:"); + for (let i = 0; i < levelTypes.length; i++) { + console.log(`- Level ${i + 1} (index ${i}): ${levelTypes[i]}`); + } + + const levelExistences = list.levelExistences; + console.log("Level existences of the first list:"); + for (let i = 0; i < levelExistences.length; i++) { + console.log(`- Level ${i + 1} (index ${i}): ${levelExistences[i]}`); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly levelTypes: Word.ListLevelType[];' + return: + type: '[]' + - name: paragraphs + uid: 'word!Word.List#paragraphs:member' + package: word! + fullName: paragraphs + summary: Gets paragraphs in the list. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly paragraphs: Word.ParagraphCollection;' + return: + type: '' +methods: + - name: getLevelParagraphs(level) + uid: 'word!Word.List#getLevelParagraphs:member(1)' + package: word! + fullName: getLevelParagraphs(level) + summary: Gets the paragraphs that occur at the specified level in the list. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getLevelParagraphs(level: number): Word.ParagraphCollection;' + parameters: + - id: level + description: Required. The level in the list. + type: number + return: + type: '' + description: '' + - name: getLevelString(level) + uid: 'word!Word.List#getLevelString:member(1)' + package: word! + fullName: getLevelString(level) + summary: 'Gets the bullet, number, or picture at the specified level as a string.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getLevelString(level: number): OfficeExtension.ClientResult;' + parameters: + - id: level + description: Required. The level in the list. + type: number + return: + type: '<string>' + description: '' + - name: 'insertParagraph(paragraphText, insertLocation)' + uid: 'word!Word.List#insertParagraph:member(1)' + package: word! + fullName: 'insertParagraph(paragraphText, insertLocation)' + summary: Inserts a paragraph at the specified location. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/20-lists/insert-list.yaml + + + // This example starts a new list with the second paragraph. + + await Word.run(async (context) => { + const paragraphs: Word.ParagraphCollection = context.document.body.paragraphs; + paragraphs.load("$none"); + + await context.sync(); + + // Start new list using the second paragraph. + const list: Word.List = paragraphs.items[1].startNewList(); + list.load("$none"); + + await context.sync(); + + // To add new items to the list, use Start or End on the insertLocation parameter. + list.insertParagraph("New list item at the start of the list", "Start"); + const paragraph: Word.Paragraph = list.insertParagraph("New list item at the end of the list (set to list level 5)", "End"); + + // Set up list level for the list item. + paragraph.listItem.level = 4; + + // To add paragraphs outside the list, use Before or After. + list.insertParagraph("New paragraph goes after (not part of the list)", "After"); + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | + Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): Word.Paragraph; + parameters: + - id: paragraphText + description: Required. The paragraph text to be inserted. + type: string + - id: insertLocation + description: 'Required. The value must be ''Start'', ''End'', ''Before'', or ''After''.' + type: >- + | | + | + | "Start" | "End" | "Before" | "After" + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.List#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.ListLoadOptions): Word.List;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.List#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.List;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.List#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.List; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: 'setLevelAlignment(level, alignment)' + uid: 'word!Word.List#setLevelAlignment:member(1)' + package: word! + fullName: 'setLevelAlignment(level, alignment)' + summary: 'Sets the alignment of the bullet, number, or picture at the specified level in the list.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'setLevelAlignment(level: number, alignment: Word.Alignment): void;' + parameters: + - id: level + description: Required. The level in the list. + type: number + - id: alignment + description: 'Required. The level alignment that must be ''Left'', ''Centered'', or ''Right''.' + type: '' + return: + type: void + description: '' + - name: 'setLevelAlignment(level, alignmentString)' + uid: 'word!Word.List#setLevelAlignment:member(2)' + package: word! + fullName: 'setLevelAlignment(level, alignmentString)' + summary: 'Sets the alignment of the bullet, number, or picture at the specified level in the list.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + setLevelAlignment(level: number, alignmentString: "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | + "Justified"): void; + parameters: + - id: level + description: Required. The level in the list. + type: number + - id: alignmentString + description: 'Required. The level alignment that must be ''Left'', ''Centered'', or ''Right''.' + type: '"Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"' + return: + type: void + description: '' + - name: 'setLevelBullet(level, listBullet, charCode, fontName)' + uid: 'word!Word.List#setLevelBullet:member(1)' + package: word! + fullName: 'setLevelBullet(level, listBullet, charCode, fontName)' + summary: 'Sets the bullet format at the specified level in the list. If the bullet is ''Custom'', the charCode is required.' + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/20-lists/organize-list.yaml + + + // Inserts a list starting with the first paragraph then set numbering and bullet types of the list items. + + await Word.run(async (context) => { + const paragraphs: Word.ParagraphCollection = context.document.body.paragraphs; + paragraphs.load("$none"); + + await context.sync(); + + // Use the first paragraph to start a new list. + const list: Word.List = paragraphs.items[0].startNewList(); + list.load("$none"); + + await context.sync(); + + // To add new items to the list, use Start or End on the insertLocation parameter. + list.insertParagraph("New list item at the start of the list", "Start"); + const paragraph: Word.Paragraph = list.insertParagraph("New list item at the end of the list (set to list level 5)", "End"); + + // Set numbering for list level 1. + list.setLevelNumbering(0, Word.ListNumbering.arabic); + + // Set bullet type for list level 5. + list.setLevelBullet(4, Word.ListBullet.arrow); + + // Set list level for the last item in this list. + paragraph.listItem.level = 4; + + list.load("levelTypes"); + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'setLevelBullet(level: number, listBullet: Word.ListBullet, charCode?: number, fontName?: string): void;' + parameters: + - id: level + description: Required. The level in the list. + type: number + - id: listBullet + description: Required. The bullet. + type: '' + - id: charCode + description: Optional. The bullet character's code value. Used only if the bullet is 'Custom'. + type: number + - id: fontName + description: Optional. The bullet's font name. Used only if the bullet is 'Custom'. + type: string + return: + type: void + description: '' + - name: 'setLevelBullet(level, listBulletString, charCode, fontName)' + uid: 'word!Word.List#setLevelBullet:member(2)' + package: word! + fullName: 'setLevelBullet(level, listBulletString, charCode, fontName)' + summary: 'Sets the bullet format at the specified level in the list. If the bullet is ''Custom'', the charCode is required.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + setLevelBullet(level: number, listBulletString: "Custom" | "Solid" | "Hollow" | "Square" | "Diamonds" | "Arrow" + | "Checkmark", charCode?: number, fontName?: string): void; + parameters: + - id: level + description: Required. The level in the list. + type: number + - id: listBulletString + description: Required. The bullet. + type: '"Custom" | "Solid" | "Hollow" | "Square" | "Diamonds" | "Arrow" | "Checkmark"' + - id: charCode + description: Optional. The bullet character's code value. Used only if the bullet is 'Custom'. + type: number + - id: fontName + description: Optional. The bullet's font name. Used only if the bullet is 'Custom'. + type: string + return: + type: void + description: '' + - name: 'setLevelIndents(level, textIndent, bulletNumberPictureIndent)' + uid: 'word!Word.List#setLevelIndents:member(1)' + package: word! + fullName: 'setLevelIndents(level, textIndent, bulletNumberPictureIndent)' + summary: Sets the two indents of the specified level in the list. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'setLevelIndents(level: number, textIndent: number, bulletNumberPictureIndent: number): void;' + parameters: + - id: level + description: Required. The level in the list. + type: number + - id: textIndent + description: Required. The text indent in points. It is the same as paragraph left indent. + type: number + - id: bulletNumberPictureIndent + description: >- + Required. The relative indent, in points, of the bullet, number, or picture. It is the same as paragraph + first line indent. + type: number + return: + type: void + description: '' + - name: 'setLevelNumbering(level, listNumbering, formatString)' + uid: 'word!Word.List#setLevelNumbering:member(1)' + package: word! + fullName: 'setLevelNumbering(level, listNumbering, formatString)' + summary: Sets the numbering format at the specified level in the list. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/20-lists/organize-list.yaml + + + // Inserts a list starting with the first paragraph then set numbering and bullet types of the list items. + + await Word.run(async (context) => { + const paragraphs: Word.ParagraphCollection = context.document.body.paragraphs; + paragraphs.load("$none"); + + await context.sync(); + + // Use the first paragraph to start a new list. + const list: Word.List = paragraphs.items[0].startNewList(); + list.load("$none"); + + await context.sync(); + + // To add new items to the list, use Start or End on the insertLocation parameter. + list.insertParagraph("New list item at the start of the list", "Start"); + const paragraph: Word.Paragraph = list.insertParagraph("New list item at the end of the list (set to list level 5)", "End"); + + // Set numbering for list level 1. + list.setLevelNumbering(0, Word.ListNumbering.arabic); + + // Set bullet type for list level 5. + list.setLevelBullet(4, Word.ListBullet.arrow); + + // Set list level for the last item in this list. + paragraph.listItem.level = 4; + + list.load("levelTypes"); + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + setLevelNumbering(level: number, listNumbering: Word.ListNumbering, formatString?: Array): + void; + parameters: + - id: level + description: Required. The level in the list. + type: number + - id: listNumbering + description: Required. The ordinal format. + type: '' + - id: formatString + description: >- + Optional. The numbering string format defined as an array of strings and/or integers. Each integer is a + level of number type that is higher than or equal to this level. For example, an array of \["(", level - 1, + ".", level, ")"\] can define the format of "(2.c)", where 2 is the parent's item number and c is this + level's item number. + type: Array<string | number> + return: + type: void + description: '' + - name: 'setLevelNumbering(level, listNumberingString, formatString)' + uid: 'word!Word.List#setLevelNumbering:member(2)' + package: word! + fullName: 'setLevelNumbering(level, listNumberingString, formatString)' + summary: Sets the numbering format at the specified level in the list. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + setLevelNumbering(level: number, listNumberingString: "None" | "Arabic" | "UpperRoman" | "LowerRoman" | + "UpperLetter" | "LowerLetter", formatString?: Array): void; + parameters: + - id: level + description: Required. The level in the list. + type: number + - id: listNumberingString + description: Required. The ordinal format. + type: '"None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter"' + - id: formatString + description: >- + Optional. The numbering string format defined as an array of strings and/or integers. Each integer is a + level of number type that is higher than or equal to this level. For example, an array of \["(", level - 1, + ".", level, ")"\] can define the format of "(2.c)", where 2 is the parent's item number and c is this + level's item number. + type: Array<string | number> + return: + type: void + description: '' + - name: 'setLevelStartingNumber(level, startingNumber)' + uid: 'word!Word.List#setLevelStartingNumber:member(1)' + package: word! + fullName: 'setLevelStartingNumber(level, startingNumber)' + summary: Sets the starting number at the specified level in the list. Default value is 1. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'setLevelStartingNumber(level: number, startingNumber: number): void;' + parameters: + - id: level + description: Required. The level in the list. + type: number + - id: startingNumber + description: Required. The number to start with. + type: number + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.List#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.List` object is an API object, the `toJSON` method returns a plain + JavaScript object (typed as `Word.Interfaces.ListData`) that contains shallow copies of any loaded child + properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.ListData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.List#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.List;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.List#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.List;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.listbullet.yml b/docs/docs-ref-autogen/word_1_9/word/word.listbullet.yml new file mode 100644 index 0000000000..856655cb44 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.listbullet.yml @@ -0,0 +1,90 @@ +### YamlMime:TSEnum +name: Word.ListBullet +uid: 'word!Word.ListBullet:enum' +package: word! +fullName: Word.ListBullet +summary: '' +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/20-lists/organize-list.yaml + + + // Inserts a list starting with the first paragraph then set numbering and bullet types of the list items. + + await Word.run(async (context) => { + const paragraphs: Word.ParagraphCollection = context.document.body.paragraphs; + paragraphs.load("$none"); + + await context.sync(); + + // Use the first paragraph to start a new list. + const list: Word.List = paragraphs.items[0].startNewList(); + list.load("$none"); + + await context.sync(); + + // To add new items to the list, use Start or End on the insertLocation parameter. + list.insertParagraph("New list item at the start of the list", "Start"); + const paragraph: Word.Paragraph = list.insertParagraph("New list item at the end of the list (set to list level 5)", "End"); + + // Set numbering for list level 1. + list.setLevelNumbering(0, Word.ListNumbering.arabic); + + // Set bullet type for list level 5. + list.setLevelBullet(4, Word.ListBullet.arrow); + + // Set list level for the last item in this list. + paragraph.listItem.level = 4; + + list.load("levelTypes"); + + await context.sync(); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: arrow + uid: 'word!Word.ListBullet.arrow:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Arrow"' + - name: checkmark + uid: 'word!Word.ListBullet.checkmark:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Checkmark"' + - name: custom + uid: 'word!Word.ListBullet.custom:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Custom"' + - name: diamonds + uid: 'word!Word.ListBullet.diamonds:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Diamonds"' + - name: hollow + uid: 'word!Word.ListBullet.hollow:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Hollow"' + - name: solid + uid: 'word!Word.ListBullet.solid:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Solid"' + - name: square + uid: 'word!Word.ListBullet.square:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Square"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.listcollection.yml b/docs/docs-ref-autogen/word_1_9/word/word.listcollection.yml new file mode 100644 index 0000000000..031d399046 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.listcollection.yml @@ -0,0 +1,290 @@ +### YamlMime:TSType +name: Word.ListCollection +uid: 'word!Word.ListCollection:class' +package: word! +fullName: Word.ListCollection +summary: 'Contains a collection of [Word.List](xref:word!Word.List:class) objects.' +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/20-lists/organize-list.yaml + + + // Gets information about the first list in the document. + + await Word.run(async (context) => { + const lists: Word.ListCollection = context.document.body.lists; + lists.load("items"); + + await context.sync(); + + if (lists.items.length === 0) { + console.warn("There are no lists in this document."); + return; + } + + // Get the first list. + const list: Word.List = lists.getFirst(); + list.load("levelTypes,levelExistences"); + + await context.sync(); + + const levelTypes = list.levelTypes; + console.log("Level types of the first list:"); + for (let i = 0; i < levelTypes.length; i++) { + console.log(`- Level ${i + 1} (index ${i}): ${levelTypes[i]}`); + } + + const levelExistences = list.levelExistences; + console.log("Level existences of the first list:"); + for (let i = 0; i < levelExistences.length; i++) { + console.log(`- Level ${i + 1} (index ${i}): ${levelExistences[i]}`); + } + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.ListCollection#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: items + uid: 'word!Word.ListCollection#items:member' + package: word! + fullName: items + summary: Gets the loaded child items in this collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly items: Word.List[];' + return: + type: '[]' +methods: + - name: getById(id) + uid: 'word!Word.ListCollection#getById:member(1)' + package: word! + fullName: getById(id) + summary: >- + Gets a list by its identifier. Throws an `ItemNotFound` error if there isn't a list with the identifier in this + collection. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getById(id: number): Word.List;' + parameters: + - id: id + description: Required. A list identifier. + type: number + return: + type: '' + description: '' + - name: getByIdOrNullObject(id) + uid: 'word!Word.ListCollection#getByIdOrNullObject:member(1)' + package: word! + fullName: getByIdOrNullObject(id) + summary: >- + Gets a list by its identifier. If there isn't a list with the identifier in this collection, then this method will + return an object with its `isNullObject` property set to `true`. For further information, see + [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getByIdOrNullObject(id: number): Word.List;' + parameters: + - id: id + description: Required. A list identifier. + type: number + return: + type: '' + description: '' + - name: getFirst() + uid: 'word!Word.ListCollection#getFirst:member(1)' + package: word! + fullName: getFirst() + summary: Gets the first list in this collection. Throws an `ItemNotFound` error if this collection is empty. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFirst(): Word.List;' + return: + type: '' + description: '' + - name: getFirstOrNullObject() + uid: 'word!Word.ListCollection#getFirstOrNullObject:member(1)' + package: word! + fullName: getFirstOrNullObject() + summary: >- + Gets the first list in this collection. If this collection is empty, then this method will return an object with + its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFirstOrNullObject(): Word.List;' + return: + type: '' + description: '' + - name: getItem(id) + uid: 'word!Word.ListCollection#getItem:member(1)' + package: word! + fullName: getItem(id) + summary: Gets a list object by its ID. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getItem(id: number): Word.List;' + parameters: + - id: id + description: The list's ID. + type: number + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.ListCollection#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: >- + load(options?: Word.Interfaces.ListCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): + Word.ListCollection; + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: >- + & + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.ListCollection#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.ListCollection;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.ListCollection#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ListCollection;' + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: '' + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.ListCollection#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.ListCollection` object is an API object, the `toJSON` method returns a + plain JavaScript object (typed as `Word.Interfaces.ListCollectionData`) that contains an "items" array + with shallow copies of any loaded properties from the collection's items. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.ListCollectionData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.ListCollection#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.ListCollection;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.ListCollection#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.ListCollection;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.listitem.yml b/docs/docs-ref-autogen/word_1_9/word/word.listitem.yml new file mode 100644 index 0000000000..cdba7f140b --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.listitem.yml @@ -0,0 +1,370 @@ +### YamlMime:TSType +name: Word.ListItem +uid: 'word!Word.ListItem:class' +package: word! +fullName: Word.ListItem +summary: Represents the paragraph list item format. +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/20-lists/insert-list.yaml + + + // This example starts a new list with the second paragraph. + + await Word.run(async (context) => { + const paragraphs: Word.ParagraphCollection = context.document.body.paragraphs; + paragraphs.load("$none"); + + await context.sync(); + + // Start new list using the second paragraph. + const list: Word.List = paragraphs.items[1].startNewList(); + list.load("$none"); + + await context.sync(); + + // To add new items to the list, use Start or End on the insertLocation parameter. + list.insertParagraph("New list item at the start of the list", "Start"); + const paragraph: Word.Paragraph = list.insertParagraph("New list item at the end of the list (set to list level 5)", "End"); + + // Set up list level for the list item. + paragraph.listItem.level = 4; + + // To add paragraphs outside the list, use Before or After. + list.insertParagraph("New paragraph goes after (not part of the list)", "After"); + + await context.sync(); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.ListItem#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: level + uid: 'word!Word.ListItem#level:member' + package: word! + fullName: level + summary: Specifies the level of the item in the list. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/20-lists/insert-list.yaml + + + // This example starts a new list with the second paragraph. + + await Word.run(async (context) => { + const paragraphs: Word.ParagraphCollection = context.document.body.paragraphs; + paragraphs.load("$none"); + + await context.sync(); + + // Start new list using the second paragraph. + const list: Word.List = paragraphs.items[1].startNewList(); + list.load("$none"); + + await context.sync(); + + // To add new items to the list, use Start or End on the insertLocation parameter. + list.insertParagraph("New list item at the start of the list", "Start"); + const paragraph: Word.Paragraph = list.insertParagraph("New list item at the end of the list (set to list level 5)", "End"); + + // Set up list level for the list item. + paragraph.listItem.level = 4; + + // To add paragraphs outside the list, use Before or After. + list.insertParagraph("New paragraph goes after (not part of the list)", "After"); + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'level: number;' + return: + type: number + - name: listString + uid: 'word!Word.ListItem#listString:member' + package: word! + fullName: listString + summary: 'Gets the list item bullet, number, or picture as a string.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly listString: string;' + return: + type: string + - name: siblingIndex + uid: 'word!Word.ListItem#siblingIndex:member' + package: word! + fullName: siblingIndex + summary: Gets the list item order number in relation to its siblings. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly siblingIndex: number;' + return: + type: number +methods: + - name: getAncestor(parentOnly) + uid: 'word!Word.ListItem#getAncestor:member(1)' + package: word! + fullName: getAncestor(parentOnly) + summary: >- + Gets the list item parent, or the closest ancestor if the parent doesn't exist. Throws an `ItemNotFound` error if + the list item has no ancestor. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getAncestor(parentOnly?: boolean): Word.Paragraph;' + parameters: + - id: parentOnly + description: >- + Optional. Specifies only the list item's parent will be returned. The default is false that specifies to get + the lowest ancestor. + type: boolean + return: + type: '' + description: '' + - name: getAncestorOrNullObject(parentOnly) + uid: 'word!Word.ListItem#getAncestorOrNullObject:member(1)' + package: word! + fullName: getAncestorOrNullObject(parentOnly) + summary: >- + Gets the list item parent, or the closest ancestor if the parent doesn't exist. If the list item has no ancestor, + then this method will return an object with its `isNullObject` property set to `true`. For further + information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getAncestorOrNullObject(parentOnly?: boolean): Word.Paragraph;' + parameters: + - id: parentOnly + description: >- + Optional. Specifies only the list item's parent will be returned. The default is false that specifies to get + the lowest ancestor. + type: boolean + return: + type: '' + description: '' + - name: getDescendants(directChildrenOnly) + uid: 'word!Word.ListItem#getDescendants:member(1)' + package: word! + fullName: getDescendants(directChildrenOnly) + summary: Gets all descendant list items of the list item. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getDescendants(directChildrenOnly?: boolean): Word.ParagraphCollection;' + parameters: + - id: directChildrenOnly + description: >- + Optional. Specifies only the list item's direct children will be returned. The default is false that + indicates to get all descendant items. + type: boolean + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.ListItem#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.ListItemLoadOptions): Word.ListItem;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.ListItem#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.ListItem;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.ListItem#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ListItem; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.ListItem#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.ListItemUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.ListItem#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.ListItem): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.ListItem#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.ListItem` object is an API object, the `toJSON` method returns a plain + JavaScript object (typed as `Word.Interfaces.ListItemData`) that contains shallow copies of any loaded + child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.ListItemData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.ListItem#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.ListItem;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.ListItem#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.ListItem;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.listleveltype.yml b/docs/docs-ref-autogen/word_1_9/word/word.listleveltype.yml new file mode 100644 index 0000000000..e6d43cb152 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.listleveltype.yml @@ -0,0 +1,70 @@ +### YamlMime:TSEnum +name: Word.ListLevelType +uid: 'word!Word.ListLevelType:enum' +package: word! +fullName: Word.ListLevelType +summary: '' +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/20-lists/organize-list.yaml + + + // Gets information about the first list in the document. + + await Word.run(async (context) => { + const lists: Word.ListCollection = context.document.body.lists; + lists.load("items"); + + await context.sync(); + + if (lists.items.length === 0) { + console.warn("There are no lists in this document."); + return; + } + + // Get the first list. + const list: Word.List = lists.getFirst(); + list.load("levelTypes,levelExistences"); + + await context.sync(); + + const levelTypes = list.levelTypes; + console.log("Level types of the first list:"); + for (let i = 0; i < levelTypes.length; i++) { + console.log(`- Level ${i + 1} (index ${i}): ${levelTypes[i]}`); + } + + const levelExistences = list.levelExistences; + console.log("Level existences of the first list:"); + for (let i = 0; i < levelExistences.length; i++) { + console.log(`- Level ${i + 1} (index ${i}): ${levelExistences[i]}`); + } + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: bullet + uid: 'word!Word.ListLevelType.bullet:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Bullet"' + - name: number + uid: 'word!Word.ListLevelType.number:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Number"' + - name: picture + uid: 'word!Word.ListLevelType.picture:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Picture"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.listnumbering.yml b/docs/docs-ref-autogen/word_1_9/word/word.listnumbering.yml new file mode 100644 index 0000000000..f506bb5f5d --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.listnumbering.yml @@ -0,0 +1,85 @@ +### YamlMime:TSEnum +name: Word.ListNumbering +uid: 'word!Word.ListNumbering:enum' +package: word! +fullName: Word.ListNumbering +summary: '' +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/20-lists/organize-list.yaml + + + // Inserts a list starting with the first paragraph then set numbering and bullet types of the list items. + + await Word.run(async (context) => { + const paragraphs: Word.ParagraphCollection = context.document.body.paragraphs; + paragraphs.load("$none"); + + await context.sync(); + + // Use the first paragraph to start a new list. + const list: Word.List = paragraphs.items[0].startNewList(); + list.load("$none"); + + await context.sync(); + + // To add new items to the list, use Start or End on the insertLocation parameter. + list.insertParagraph("New list item at the start of the list", "Start"); + const paragraph: Word.Paragraph = list.insertParagraph("New list item at the end of the list (set to list level 5)", "End"); + + // Set numbering for list level 1. + list.setLevelNumbering(0, Word.ListNumbering.arabic); + + // Set bullet type for list level 5. + list.setLevelBullet(4, Word.ListBullet.arrow); + + // Set list level for the last item in this list. + paragraph.listItem.level = 4; + + list.load("levelTypes"); + + await context.sync(); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: arabic + uid: 'word!Word.ListNumbering.arabic:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Arabic"' + - name: lowerLetter + uid: 'word!Word.ListNumbering.lowerLetter:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"LowerLetter"' + - name: lowerRoman + uid: 'word!Word.ListNumbering.lowerRoman:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"LowerRoman"' + - name: none + uid: 'word!Word.ListNumbering.none:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"None"' + - name: upperLetter + uid: 'word!Word.ListNumbering.upperLetter:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"UpperLetter"' + - name: upperRoman + uid: 'word!Word.ListNumbering.upperRoman:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"UpperRoman"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.locationrelation.yml b/docs/docs-ref-autogen/word_1_9/word/word.locationrelation.yml new file mode 100644 index 0000000000..a294acd7b5 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.locationrelation.yml @@ -0,0 +1,166 @@ +### YamlMime:TSEnum +name: Word.LocationRelation +uid: 'word!Word.LocationRelation:enum' +package: word! +fullName: Word.LocationRelation +summary: '' +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/35-ranges/compare-location.yaml + + + // Compares the location of one paragraph in relation to another paragraph. + + await Word.run(async (context) => { + const paragraphs: Word.ParagraphCollection = context.document.body.paragraphs; + paragraphs.load("items"); + + await context.sync(); + + const firstParagraphAsRange: Word.Range = paragraphs.items[0].getRange(); + const secondParagraphAsRange: Word.Range = paragraphs.items[1].getRange(); + + const comparedLocation = firstParagraphAsRange.compareLocationWith(secondParagraphAsRange); + + await context.sync(); + + const locationValue: Word.LocationRelation = comparedLocation.value; + console.log(`Location of the first paragraph in relation to the second paragraph: ${locationValue}`); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: adjacentAfter + uid: 'word!Word.LocationRelation.adjacentAfter:member' + package: word! + summary: |- + Indicates that this instance occurs after, and is adjacent to, the range. + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"AdjacentAfter"' + - name: adjacentBefore + uid: 'word!Word.LocationRelation.adjacentBefore:member' + package: word! + summary: |- + Indicates that this instance occurs before, and is adjacent to, the range. + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"AdjacentBefore"' + - name: after + uid: 'word!Word.LocationRelation.after:member' + package: word! + summary: |- + Indicates that this instance occurs after the range. + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"After"' + - name: before + uid: 'word!Word.LocationRelation.before:member' + package: word! + summary: |- + Indicates that this instance occurs before the range. + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Before"' + - name: contains + uid: 'word!Word.LocationRelation.contains:member' + package: word! + summary: >- + Indicates that this instance contains the range, with the exception of the start and end character of this + instance. + + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Contains"' + - name: containsEnd + uid: 'word!Word.LocationRelation.containsEnd:member' + package: word! + summary: >- + Indicates that this instance contains the range and that it shares the same end character. The range doesn't share + the same start character as this instance. + + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"ContainsEnd"' + - name: containsStart + uid: 'word!Word.LocationRelation.containsStart:member' + package: word! + summary: >- + Indicates that this instance contains the range and that it shares the same start character. The range doesn't + share the same end character as this instance. + + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"ContainsStart"' + - name: equal + uid: 'word!Word.LocationRelation.equal:member' + package: word! + summary: |- + Indicates that this instance and the range represent the same range. + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Equal"' + - name: inside + uid: 'word!Word.LocationRelation.inside:member' + package: word! + summary: >- + Indicates that this instance is inside the range. The range doesn't share the same start and end characters as + this instance. + + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Inside"' + - name: insideEnd + uid: 'word!Word.LocationRelation.insideEnd:member' + package: word! + summary: >- + Indicates that this instance is inside the range and that it shares the same end character. The range doesn't + share the same start character as this instance. + + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"InsideEnd"' + - name: insideStart + uid: 'word!Word.LocationRelation.insideStart:member' + package: word! + summary: >- + Indicates that this instance is inside the range and that it shares the same start character. The range doesn't + share the same end character as this instance. + + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"InsideStart"' + - name: overlapsAfter + uid: 'word!Word.LocationRelation.overlapsAfter:member' + package: word! + summary: |- + Indicates that this instance starts inside the range and overlaps the range’s last character. + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"OverlapsAfter"' + - name: overlapsBefore + uid: 'word!Word.LocationRelation.overlapsBefore:member' + package: word! + summary: |- + Indicates that this instance starts before the range and overlaps the range's first character. + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"OverlapsBefore"' + - name: unrelated + uid: 'word!Word.LocationRelation.unrelated:member' + package: word! + summary: |- + Indicates that this instance and the range are in different sub-documents. + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Unrelated"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.noteitem.yml b/docs/docs-ref-autogen/word_1_9/word/word.noteitem.yml new file mode 100644 index 0000000000..e769b875af --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.noteitem.yml @@ -0,0 +1,444 @@ +### YamlMime:TSType +name: Word.NoteItem +uid: 'word!Word.NoteItem:class' +package: word! +fullName: Word.NoteItem +summary: Represents a footnote or endnote. +remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-footnotes.yaml + + + // Gets the text of the referenced footnote. + + await Word.run(async (context) => { + const footnotes: Word.NoteItemCollection = context.document.body.footnotes; + footnotes.load("items/body"); + await context.sync(); + + const referenceNumber = $("#input-reference").val(); + const mark = (referenceNumber as number) - 1; + const footnoteBody: Word.Range = footnotes.items[mark].body.getRange(); + footnoteBody.load("text"); + await context.sync(); + + console.log(`Text of footnote ${referenceNumber}: ${footnoteBody.text}`); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: body + uid: 'word!Word.NoteItem#body:member' + package: word! + fullName: body + summary: Represents the body object of the note item. It's the portion of the text within the footnote or endnote. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-footnotes.yaml + + + // Gets the text of the referenced footnote. + + await Word.run(async (context) => { + const footnotes: Word.NoteItemCollection = context.document.body.footnotes; + footnotes.load("items/body"); + await context.sync(); + + const referenceNumber = $("#input-reference").val(); + const mark = (referenceNumber as number) - 1; + const footnoteBody: Word.Range = footnotes.items[mark].body.getRange(); + footnoteBody.load("text"); + await context.sync(); + + console.log(`Text of footnote ${referenceNumber}: ${footnoteBody.text}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly body: Word.Body;' + return: + type: '' + - name: context + uid: 'word!Word.NoteItem#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: reference + uid: 'word!Word.NoteItem#reference:member' + package: word! + fullName: reference + summary: Represents a footnote or endnote reference in the main document. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-footnotes.yaml + + + // Selects the footnote's reference mark in the document body. + + await Word.run(async (context) => { + const footnotes: Word.NoteItemCollection = context.document.body.footnotes; + footnotes.load("items/reference"); + await context.sync(); + + const referenceNumber = $("#input-reference").val(); + const mark = (referenceNumber as number) - 1; + const item: Word.NoteItem = footnotes.items[mark]; + const reference: Word.Range = item.reference; + reference.select(); + await context.sync(); + + console.log(`Reference ${referenceNumber} is selected.`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly reference: Word.Range;' + return: + type: '' + - name: type + uid: 'word!Word.NoteItem#type:member' + package: word! + fullName: type + summary: 'Represents the note item type: footnote or endnote.' + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-footnotes.yaml + + + // Gets the referenced note's item type and body type, which are both "Footnote". + + await Word.run(async (context) => { + const footnotes: Word.NoteItemCollection = context.document.body.footnotes; + footnotes.load("items"); + await context.sync(); + + const referenceNumber = $("#input-reference").val(); + const mark = (referenceNumber as number) - 1; + const item: Word.NoteItem = footnotes.items[mark]; + console.log(`Note type of footnote ${referenceNumber}: ${item.type}`); + + item.body.load("type"); + await context.sync(); + + console.log(`Body type of note: ${item.body.type}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly type: Word.NoteItemType | "Footnote" | "Endnote";' + return: + type: ' | "Footnote" | "Endnote"' +methods: + - name: delete() + uid: 'word!Word.NoteItem#delete:member(1)' + package: word! + fullName: delete() + summary: Deletes the note item. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-footnotes.yaml + + + // Deletes this referenced footnote. + + await Word.run(async (context) => { + const footnotes: Word.NoteItemCollection = context.document.body.footnotes; + footnotes.load("items"); + await context.sync(); + + const referenceNumber = $("#input-reference").val(); + const mark = (referenceNumber as number) - 1; + footnotes.items[mark].delete(); + await context.sync(); + + console.log("Footnote deleted."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'delete(): void;' + return: + type: void + description: '' + - name: getNext() + uid: 'word!Word.NoteItem#getNext:member(1)' + package: word! + fullName: getNext() + summary: Gets the next note item of the same type. Throws an `ItemNotFound` error if this note item is the last one. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-footnotes.yaml + + + // Selects the next footnote in the document body. + + await Word.run(async (context) => { + const footnotes: Word.NoteItemCollection = context.document.body.footnotes; + footnotes.load("items/reference"); + await context.sync(); + + const referenceNumber = $("#input-reference").val(); + const mark = (referenceNumber as number) - 1; + const reference: Word.Range = footnotes.items[mark].getNext().reference; + reference.select(); + console.log("Selected is the next footnote: " + (mark + 2)); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getNext(): Word.NoteItem;' + return: + type: '' + description: '' + - name: getNextOrNullObject() + uid: 'word!Word.NoteItem#getNextOrNullObject:member(1)' + package: word! + fullName: getNextOrNullObject() + summary: >- + Gets the next note item of the same type. If this note item is the last one, then this method will return an + object with its `isNullObject` property set to `true`. For further information, see [*OrNullObject + methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getNextOrNullObject(): Word.NoteItem;' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.NoteItem#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.NoteItemLoadOptions): Word.NoteItem;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.NoteItem#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.NoteItem;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.NoteItem#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.NoteItem; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.NoteItem#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.NoteItemUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.NoteItem#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.NoteItem): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.NoteItem#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.NoteItem` object is an API object, the `toJSON` method returns a plain + JavaScript object (typed as `Word.Interfaces.NoteItemData`) that contains shallow copies of any loaded + child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.NoteItemData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.NoteItem#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.NoteItem;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.NoteItem#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.NoteItem;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.noteitemcollection.yml b/docs/docs-ref-autogen/word_1_9/word/word.noteitemcollection.yml new file mode 100644 index 0000000000..da1278f3f1 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.noteitemcollection.yml @@ -0,0 +1,229 @@ +### YamlMime:TSType +name: Word.NoteItemCollection +uid: 'word!Word.NoteItemCollection:class' +package: word! +fullName: Word.NoteItemCollection +summary: 'Contains a collection of [Word.NoteItem](xref:word!Word.NoteItem:class) objects.' +remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-footnotes.yaml + + + // Gets the first footnote in the document body and select its reference mark. + + await Word.run(async (context) => { + const reference: Word.Range = context.document.body.footnotes.getFirst().reference; + reference.select(); + console.log("The first footnote is selected."); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.NoteItemCollection#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: items + uid: 'word!Word.NoteItemCollection#items:member' + package: word! + fullName: items + summary: Gets the loaded child items in this collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly items: Word.NoteItem[];' + return: + type: '[]' +methods: + - name: getFirst() + uid: 'word!Word.NoteItemCollection#getFirst:member(1)' + package: word! + fullName: getFirst() + summary: Gets the first note item in this collection. Throws an `ItemNotFound` error if this collection is empty. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-footnotes.yaml + + + // Gets the first footnote in the document body and select its reference mark. + + await Word.run(async (context) => { + const reference: Word.Range = context.document.body.footnotes.getFirst().reference; + reference.select(); + console.log("The first footnote is selected."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getFirst(): Word.NoteItem;' + return: + type: '' + description: '' + - name: getFirstOrNullObject() + uid: 'word!Word.NoteItemCollection#getFirstOrNullObject:member(1)' + package: word! + fullName: getFirstOrNullObject() + summary: >- + Gets the first note item in this collection. If this collection is empty, then this method will return an object + with its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFirstOrNullObject(): Word.NoteItem;' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.NoteItemCollection#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: >- + load(options?: Word.Interfaces.NoteItemCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): + Word.NoteItemCollection; + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: >- + & + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.NoteItemCollection#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.NoteItemCollection;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.NoteItemCollection#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.NoteItemCollection;' + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: '' + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.NoteItemCollection#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.NoteItemCollection` object is an API object, the `toJSON` method returns + a plain JavaScript object (typed as `Word.Interfaces.NoteItemCollectionData`) that contains an "items" + array with shallow copies of any loaded properties from the collection's items. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.NoteItemCollectionData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.NoteItemCollection#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.NoteItemCollection;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.NoteItemCollection#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.NoteItemCollection;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.noteitemtype.yml b/docs/docs-ref-autogen/word_1_9/word/word.noteitemtype.yml new file mode 100644 index 0000000000..388d63ca7f --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.noteitemtype.yml @@ -0,0 +1,51 @@ +### YamlMime:TSEnum +name: Word.NoteItemType +uid: 'word!Word.NoteItemType:enum' +package: word! +fullName: Word.NoteItemType +summary: Note item type +remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-footnotes.yaml + + + // Gets the referenced note's item type and body type, which are both "Footnote". + + await Word.run(async (context) => { + const footnotes: Word.NoteItemCollection = context.document.body.footnotes; + footnotes.load("items"); + await context.sync(); + + const referenceNumber = $("#input-reference").val(); + const mark = (referenceNumber as number) - 1; + const item: Word.NoteItem = footnotes.items[mark]; + console.log(`Note type of footnote ${referenceNumber}: ${item.type}`); + + item.body.load("type"); + await context.sync(); + + console.log(`Body type of note: ${item.body.type}`); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: endnote + uid: 'word!Word.NoteItemType.endnote:member' + package: word! + summary: '* \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Endnote"' + - name: footnote + uid: 'word!Word.NoteItemType.footnote:member' + package: word! + summary: '* \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Footnote"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.outlinelevel.yml b/docs/docs-ref-autogen/word_1_9/word/word.outlinelevel.yml new file mode 100644 index 0000000000..56dbf23834 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.outlinelevel.yml @@ -0,0 +1,113 @@ +### YamlMime:TSEnum +name: Word.OutlineLevel +uid: 'word!Word.OutlineLevel:enum' +package: word! +fullName: Word.OutlineLevel +summary: Represents the outline levels. +remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-custom-style.yaml + + + // Imports styles from JSON. + + await Word.run(async (context) => { + const str = + '{"styles":[{"baseStyle":"Default Paragraph Font","builtIn":false,"inUse":true,"linked":false,"nameLocal":"NewCharStyle","priority":2,"quickStyle":true,"type":"Character","unhideWhenUsed":false,"visibility":false,"paragraphFormat":null,"font":{"name":"DengXian Light","size":16.0,"bold":true,"italic":false,"color":"#F1A983","underline":"None","subscript":false,"superscript":true,"strikeThrough":true,"doubleStrikeThrough":false,"highlightColor":null,"hidden":false},"shading":{"backgroundPatternColor":"#FF0000"}},{"baseStyle":"Normal","builtIn":false,"inUse":true,"linked":false,"nextParagraphStyle":"NewParaStyle","nameLocal":"NewParaStyle","priority":1,"quickStyle":true,"type":"Paragraph","unhideWhenUsed":false,"visibility":false,"paragraphFormat":{"alignment":"Centered","firstLineIndent":0.0,"keepTogether":false,"keepWithNext":false,"leftIndent":72.0,"lineSpacing":18.0,"lineUnitAfter":0.0,"lineUnitBefore":0.0,"mirrorIndents":false,"outlineLevel":"OutlineLevelBodyText","rightIndent":72.0,"spaceAfter":30.0,"spaceBefore":30.0,"widowControl":true},"font":{"name":"DengXian","size":14.0,"bold":true,"italic":true,"color":"#8DD873","underline":"Single","subscript":false,"superscript":false,"strikeThrough":false,"doubleStrikeThrough":true,"highlightColor":null,"hidden":false},"shading":{"backgroundPatternColor":"#00FF00"}},{"baseStyle":"Table Normal","builtIn":false,"inUse":true,"linked":false,"nextParagraphStyle":"NewTableStyle","nameLocal":"NewTableStyle","priority":100,"type":"Table","unhideWhenUsed":false,"visibility":false,"paragraphFormat":{"alignment":"Left","firstLineIndent":0.0,"keepTogether":false,"keepWithNext":false,"leftIndent":0.0,"lineSpacing":12.0,"lineUnitAfter":0.0,"lineUnitBefore":0.0,"mirrorIndents":false,"outlineLevel":"OutlineLevelBodyText","rightIndent":0.0,"spaceAfter":0.0,"spaceBefore":0.0,"widowControl":true},"font":{"name":"DengXian","size":20.0,"bold":false,"italic":true,"color":"#D86DCB","underline":"None","subscript":false,"superscript":false,"strikeThrough":false,"doubleStrikeThrough":false,"highlightColor":null,"hidden":false},"tableStyle":{"allowBreakAcrossPage":true,"alignment":"Left","bottomCellMargin":0.0,"leftCellMargin":0.08,"rightCellMargin":0.08,"topCellMargin":0.0,"cellSpacing":0.0},"shading":{"backgroundPatternColor":"#60CAF3"}}]}'; + const styles = context.document.importStylesFromJson(str); + await context.sync(); + console.log("Styles imported from JSON:", styles); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: outlineLevel1 + uid: 'word!Word.OutlineLevel.outlineLevel1:member' + package: word! + summary: |- + Represents outline level 1. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"OutlineLevel1"' + - name: outlineLevel2 + uid: 'word!Word.OutlineLevel.outlineLevel2:member' + package: word! + summary: |- + Represents outline level 2. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"OutlineLevel2"' + - name: outlineLevel3 + uid: 'word!Word.OutlineLevel.outlineLevel3:member' + package: word! + summary: |- + Represents outline level 3. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"OutlineLevel3"' + - name: outlineLevel4 + uid: 'word!Word.OutlineLevel.outlineLevel4:member' + package: word! + summary: |- + Represents outline level 4. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"OutlineLevel4"' + - name: outlineLevel5 + uid: 'word!Word.OutlineLevel.outlineLevel5:member' + package: word! + summary: |- + Represents outline level 5. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"OutlineLevel5"' + - name: outlineLevel6 + uid: 'word!Word.OutlineLevel.outlineLevel6:member' + package: word! + summary: |- + Represents outline level 6. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"OutlineLevel6"' + - name: outlineLevel7 + uid: 'word!Word.OutlineLevel.outlineLevel7:member' + package: word! + summary: |- + Represents outline level 7. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"OutlineLevel7"' + - name: outlineLevel8 + uid: 'word!Word.OutlineLevel.outlineLevel8:member' + package: word! + summary: |- + Represents outline level 8. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"OutlineLevel8"' + - name: outlineLevel9 + uid: 'word!Word.OutlineLevel.outlineLevel9:member' + package: word! + summary: |- + Represents outline level 9. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"OutlineLevel9"' + - name: outlineLevelBodyText + uid: 'word!Word.OutlineLevel.outlineLevelBodyText:member' + package: word! + summary: |- + Represents outline level body text, not an outline level. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"OutlineLevelBodyText"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.paragraph.yml b/docs/docs-ref-autogen/word_1_9/word/word.paragraph.yml new file mode 100644 index 0000000000..e4b6d672c6 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.paragraph.yml @@ -0,0 +1,2285 @@ +### YamlMime:TSType +name: Word.Paragraph +uid: 'word!Word.Paragraph:class' +package: word! +fullName: Word.Paragraph +summary: 'Represents a single paragraph in a selection, range, content control, or document body.' +remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/get-paragraph-on-insertion-point.yaml + + + await Word.run(async (context) => { + // The collection of paragraphs of the current selection returns the full paragraphs contained in it. + const paragraph: Word.Paragraph = context.document.getSelection().paragraphs.getFirst(); + paragraph.load("text"); + + await context.sync(); + console.log(paragraph.text); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: alignment + uid: 'word!Word.Paragraph#alignment:member' + package: word! + fullName: alignment + summary: 'Specifies the alignment for a paragraph. The value can be ''left'', ''centered'', ''right'', or ''justified''.' + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/paragraph-properties.yaml + + + await Word.run(async (context) => { + // Center last paragraph alignment. + context.document.body.paragraphs.getLast().alignment = "Centered"; + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified";' + return: + type: ' | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"' + - name: contentControls + uid: 'word!Word.Paragraph#contentControls:member' + package: word! + fullName: contentControls + summary: Gets the collection of content control objects in the paragraph. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly contentControls: Word.ContentControlCollection;' + return: + type: '' + - name: context + uid: 'word!Word.Paragraph#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: endnotes + uid: 'word!Word.Paragraph#endnotes:member' + package: word! + fullName: endnotes + summary: Gets the collection of endnotes in the paragraph. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly endnotes: Word.NoteItemCollection;' + return: + type: '' + - name: fields + uid: 'word!Word.Paragraph#fields:member' + package: word! + fullName: fields + summary: Gets the collection of fields in the paragraph. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly fields: Word.FieldCollection;' + return: + type: '' + - name: firstLineIndent + uid: 'word!Word.Paragraph#firstLineIndent:member' + package: word! + fullName: firstLineIndent + summary: >- + Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line + indent, and use a negative value to set a hanging indent. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'firstLineIndent: number;' + return: + type: number + - name: font + uid: 'word!Word.Paragraph#font:member' + package: word! + fullName: font + summary: 'Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly font: Word.Font;' + return: + type: '' + - name: footnotes + uid: 'word!Word.Paragraph#footnotes:member' + package: word! + fullName: footnotes + summary: Gets the collection of footnotes in the paragraph. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly footnotes: Word.NoteItemCollection;' + return: + type: '' + - name: inlinePictures + uid: 'word!Word.Paragraph#inlinePictures:member' + package: word! + fullName: inlinePictures + summary: Gets the collection of InlinePicture objects in the paragraph. The collection doesn't include floating images. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly inlinePictures: Word.InlinePictureCollection;' + return: + type: '' + - name: isLastParagraph + uid: 'word!Word.Paragraph#isLastParagraph:member' + package: word! + fullName: isLastParagraph + summary: Indicates the paragraph is the last one inside its parent body. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly isLastParagraph: boolean;' + return: + type: boolean + - name: isListItem + uid: 'word!Word.Paragraph#isListItem:member' + package: word! + fullName: isListItem + summary: Checks whether the paragraph is a list item. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly isListItem: boolean;' + return: + type: boolean + - name: leftIndent + uid: 'word!Word.Paragraph#leftIndent:member' + package: word! + fullName: leftIndent + summary: 'Specifies the left indent value, in points, for the paragraph.' + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/paragraph-properties.yaml + + + await Word.run(async (context) => { + // Indent the first paragraph. + context.document.body.paragraphs.getFirst().leftIndent = 75; //units = points + + return context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'leftIndent: number;' + return: + type: number + - name: lineSpacing + uid: 'word!Word.Paragraph#lineSpacing:member' + package: word! + fullName: lineSpacing + summary: 'Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12.' + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/paragraph-properties.yaml + + + await Word.run(async (context) => { + // Adjust line spacing. + context.document.body.paragraphs.getFirst().lineSpacing = 20; + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'lineSpacing: number;' + return: + type: number + - name: lineUnitAfter + uid: 'word!Word.Paragraph#lineUnitAfter:member' + package: word! + fullName: lineUnitAfter + summary: 'Specifies the amount of spacing, in grid lines, after the paragraph.' + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/paragraph-properties.yaml + + + await Word.run(async (context) => { + // Set the space (in line units) after the first paragraph. + context.document.body.paragraphs.getFirst().lineUnitAfter = 1; + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'lineUnitAfter: number;' + return: + type: number + - name: lineUnitBefore + uid: 'word!Word.Paragraph#lineUnitBefore:member' + package: word! + fullName: lineUnitBefore + summary: 'Specifies the amount of spacing, in grid lines, before the paragraph.' + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/paragraph-properties.yaml + + + await Word.run(async (context) => { + // Set the space (in line units) before the first paragraph. + context.document.body.paragraphs.getFirst().lineUnitBefore = 1; + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'lineUnitBefore: number;' + return: + type: number + - name: list + uid: 'word!Word.Paragraph#list:member' + package: word! + fullName: list + summary: Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph isn't in a list. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly list: Word.List;' + return: + type: '' + - name: listItem + uid: 'word!Word.Paragraph#listItem:member' + package: word! + fullName: listItem + summary: Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly listItem: Word.ListItem;' + return: + type: '' + - name: listItemOrNullObject + uid: 'word!Word.Paragraph#listItemOrNullObject:member' + package: word! + fullName: listItemOrNullObject + summary: >- + Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object + with its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly listItemOrNullObject: Word.ListItem;' + return: + type: '' + - name: listOrNullObject + uid: 'word!Word.Paragraph#listOrNullObject:member' + package: word! + fullName: listOrNullObject + summary: >- + Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an + object with its `isNullObject` property set to `true`. For further information, see [*OrNullObject + methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly listOrNullObject: Word.List;' + return: + type: '' + - name: outlineLevel + uid: 'word!Word.Paragraph#outlineLevel:member' + package: word! + fullName: outlineLevel + summary: Specifies the outline level for the paragraph. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'outlineLevel: number;' + return: + type: number + - name: parentBody + uid: 'word!Word.Paragraph#parentBody:member' + package: word! + fullName: parentBody + summary: Gets the parent body of the paragraph. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentBody: Word.Body;' + return: + type: '' + - name: parentContentControl + uid: 'word!Word.Paragraph#parentContentControl:member' + package: word! + fullName: parentContentControl + summary: >- + Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent + content control. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentContentControl: Word.ContentControl;' + return: + type: '' + - name: parentContentControlOrNullObject + uid: 'word!Word.Paragraph#parentContentControlOrNullObject:member' + package: word! + fullName: parentContentControlOrNullObject + summary: >- + Gets the content control that contains the paragraph. If there isn't a parent content control, then this method + will return an object with its `isNullObject` property set to `true`. For further information, see + [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentContentControlOrNullObject: Word.ContentControl;' + return: + type: '' + - name: parentTable + uid: 'word!Word.Paragraph#parentTable:member' + package: word! + fullName: parentTable + summary: Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTable: Word.Table;' + return: + type: '' + - name: parentTableCell + uid: 'word!Word.Paragraph#parentTableCell:member' + package: word! + fullName: parentTableCell + summary: >- + Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table + cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTableCell: Word.TableCell;' + return: + type: '' + - name: parentTableCellOrNullObject + uid: 'word!Word.Paragraph#parentTableCellOrNullObject:member' + package: word! + fullName: parentTableCellOrNullObject + summary: >- + Gets the table cell that contains the paragraph. If it isn't contained in a table cell, then this method will + return an object with its `isNullObject` property set to `true`. For further information, see + [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTableCellOrNullObject: Word.TableCell;' + return: + type: '' + - name: parentTableOrNullObject + uid: 'word!Word.Paragraph#parentTableOrNullObject:member' + package: word! + fullName: parentTableOrNullObject + summary: >- + Gets the table that contains the paragraph. If it isn't contained in a table, then this method will return an + object with its `isNullObject` property set to `true`. For further information, see [*OrNullObject + methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTableOrNullObject: Word.Table;' + return: + type: '' + - name: rightIndent + uid: 'word!Word.Paragraph#rightIndent:member' + package: word! + fullName: rightIndent + summary: 'Specifies the right indent value, in points, for the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'rightIndent: number;' + return: + type: number + - name: spaceAfter + uid: 'word!Word.Paragraph#spaceAfter:member' + package: word! + fullName: spaceAfter + summary: 'Specifies the spacing, in points, after the paragraph.' + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/paragraph-properties.yaml + + + await Word.run(async (context) => { + // Set the space (in points) after the first paragraph. + context.document.body.paragraphs.getFirst().spaceAfter = 20; + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'spaceAfter: number;' + return: + type: number + - name: spaceBefore + uid: 'word!Word.Paragraph#spaceBefore:member' + package: word! + fullName: spaceBefore + summary: 'Specifies the spacing, in points, before the paragraph.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'spaceBefore: number;' + return: + type: number + - name: style + uid: 'word!Word.Paragraph#style:member' + package: word! + fullName: style + summary: >- + Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use + the built-in styles that are portable between locales, see the "styleBuiltIn" property. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-styles.yaml + + + // Applies the specified style to a paragraph. + + await Word.run(async (context) => { + const styleName = $("#style-name-to-use").val() as string; + if (styleName == "") { + console.warn("Enter a style name to apply."); + return; + } + + const style: Word.Style = context.document.getStyles().getByNameOrNullObject(styleName); + style.load(); + await context.sync(); + + if (style.isNullObject) { + console.warn(`There's no existing style with the name '${styleName}'.`); + } else if (style.type != Word.StyleType.paragraph) { + console.log(`The '${styleName}' style isn't a paragraph style.`); + } else { + const body: Word.Body = context.document.body; + body.clear(); + body.insertParagraph( + "Do you want to create a solution that extends the functionality of Word? You can use the Office Add-ins platform to extend Word clients running on the web, on a Windows desktop, or on a Mac.", + "Start" + ); + const paragraph: Word.Paragraph = body.paragraphs.getFirst(); + paragraph.style = style.nameLocal; + console.log(`'${styleName}' style applied to first paragraph.`); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'style: string;' + return: + type: string + - name: styleBuiltIn + uid: 'word!Word.Paragraph#styleBuiltIn:member' + package: word! + fullName: styleBuiltIn + summary: >- + Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable + between locales. To use custom styles or localized style names, see the "style" property. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/90-scenarios/doc-assembly.yaml + + + await Word.run(async (context) => { + const paragraph: Word.Paragraph = context.document.body.insertParagraph("Timeline", "End"); + paragraph.styleBuiltIn = "Heading2"; + const paragraph2: Word.Paragraph = context.document.body.insertParagraph("The Services shall commence on July 31, 2015, and shall continue through July 29, 2015.", "End"); + paragraph2.styleBuiltIn = "Normal"; + const paragraph3: Word.Paragraph = context.document.body.insertParagraph("Project Costs by Phase", "End"); + paragraph3.styleBuiltIn = "Heading2"; + // Note a content control with the title of "ProjectCosts" is added. Content will be replaced later. + const paragraph4: Word.Paragraph = context.document.body.insertParagraph("", "End"); + paragraph4.styleBuiltIn = "Normal"; + paragraph4.font.highlightColor = "#FFFF00"; + const contentControl: Word.ContentControl = paragraph4.insertContentControl(); + contentControl.title = "ProjectCosts"; + const paragraph5: Word.Paragraph = context.document.body.insertParagraph("Project Team", "End"); + paragraph5.styleBuiltIn = "Heading2"; + paragraph5.font.highlightColor = "#FFFFFF"; + const paragraph6: Word.Paragraph = context.document.body.insertParagraph("Terms of Work", "End"); + paragraph6.styleBuiltIn = "Heading1"; + const paragraph7: Word.Paragraph = context.document.body.insertParagraph("Contractor shall provide the Services and Deliverable(s) as follows:", "End"); + paragraph7.styleBuiltIn = "Normal"; + const paragraph8: Word.Paragraph = context.document.body.insertParagraph("Out-of-Pocket Expenses / Invoice Procedures", "End"); + paragraph8.styleBuiltIn = "Heading2"; + const paragraph9 : Word.Paragraph= context.document.body.insertParagraph("Client will be invoiced monthly for the consulting services and T&L expenses. Standard Contractor invoicing is assumed to be acceptable. Invoices are due upon receipt. client will be invoiced all costs associated with out-of-pocket expenses (including, without limitation, costs and expenses associated with meals, lodging, local transportation and any other applicable business expenses) listed on the invoice as a separate line item. Reimbursement for out-of-pocket expenses in connection with performance of this SOW, when authorized and up to the limits set forth in this SOW, shall be in accordance with Client's then-current published policies governing travel and associated business expenses, which information shall be provided by the Client Project Manager.", "End"); + paragraph9.styleBuiltIn = "Normal"; + // Insert a page break at the end of the document. + context.document.body.insertBreak("Page", "End"); + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | + "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | + "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | + "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | + "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | + "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | + "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" + | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" + | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" + | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | + "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" + | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | + "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | + "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | + "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | + "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" + | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | + "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | + "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | + "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | + "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | + "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | + "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | + "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + return: + type: >- + | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | + "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | + "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | + "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | + "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | + "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | + "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | + "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | + "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | + "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | + "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | + "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | + "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" + | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" + | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | + "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | + "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | + "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | + "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | + "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | + "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | + "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | + "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | + "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | + "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6" + - name: tableNestingLevel + uid: 'word!Word.Paragraph#tableNestingLevel:member' + package: word! + fullName: tableNestingLevel + summary: Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly tableNestingLevel: number;' + return: + type: number + - name: text + uid: 'word!Word.Paragraph#text:member' + package: word! + fullName: text + summary: Gets the text of the paragraph. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/get-paragraph-on-insertion-point.yaml + + + await Word.run(async (context) => { + // The collection of paragraphs of the current selection returns the full paragraphs contained in it. + const paragraph: Word.Paragraph = context.document.getSelection().paragraphs.getFirst(); + paragraph.load("text"); + + await context.sync(); + console.log(paragraph.text); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly text: string;' + return: + type: string + - name: uniqueLocalId + uid: 'word!Word.Paragraph#uniqueLocalId:member' + package: word! + fullName: uniqueLocalId + summary: >- + Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID + format without curly braces and differs across sessions and coauthors. + remarks: >- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Registers event handlers. + + await Word.run(async (context) => { + eventContexts[0] = context.document.onParagraphAdded.add(paragraphChanged); + eventContexts[1] = context.document.onParagraphChanged.add(paragraphChanged); + + eventContexts[2] = context.document.onAnnotationClicked.add(onClickedHandler); + eventContexts[3] = context.document.onAnnotationHovered.add(onHoveredHandler); + eventContexts[4] = context.document.onAnnotationInserted.add(onInsertedHandler); + eventContexts[5] = context.document.onAnnotationRemoved.add(onRemovedHandler); + eventContexts[6] = context.document.onAnnotationPopupAction.add(onPopupActionHandler); + + await context.sync(); + + console.log("Event handlers registered."); + }); + + + ... + + + async function paragraphChanged(args: Word.ParagraphChangedEventArgs) { + await Word.run(async (context) => { + const results = []; + for (let id of args.uniqueLocalIds) { + let para = context.document.getParagraphByUniqueLocalId(id); + para.load("uniqueLocalId"); + + results.push({ para: para, text: para.getText() }); + } + + await context.sync(); + + for (let result of results) { + console.log(`${args.type}: ID ${result.para.uniqueLocalId}:-`, result.text.value); + } + }); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly uniqueLocalId: string;' + return: + type: string +methods: + - name: 'attachToList(listId, level)' + uid: 'word!Word.Paragraph#attachToList:member(1)' + package: word! + fullName: 'attachToList(listId, level)' + summary: >- + Lets the paragraph join an existing list at the specified level. Fails if the paragraph cannot join the list or if + the paragraph is already a list item. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'attachToList(listId: number, level: number): Word.List;' + parameters: + - id: listId + description: Required. The ID of an existing list. + type: number + - id: level + description: Required. The level in the list. + type: number + return: + type: '' + description: '' + - name: clear() + uid: 'word!Word.Paragraph#clear:member(1)' + package: word! + fullName: clear() + summary: Clears the contents of the paragraph object. The user can perform the undo operation on the cleared content. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the paragraphs collection. + const paragraphs = context.document.body.paragraphs; + + // Queue a command to load the style property for all of the paragraphs. + paragraphs.load('style'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + + // Queue a command to clear the contents of the first paragraph. + paragraphs.items[0].clear(); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Cleared the contents of the first paragraph.'); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'clear(): void;' + return: + type: void + description: '' + - name: delete() + uid: 'word!Word.Paragraph#delete:member(1)' + package: word! + fullName: delete() + summary: Deletes the paragraph and its content from the document. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the paragraphs collection. + const paragraphs = context.document.body.paragraphs; + + // Queue a command to load the text property for all of the paragraphs. + paragraphs.load('text'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + + // Queue a command to delete the first paragraph. + paragraphs.items[0].delete(); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Deleted the first paragraph.'); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'delete(): void;' + return: + type: void + description: '' + - name: detachFromList() + uid: 'word!Word.Paragraph#detachFromList:member(1)' + package: word! + fullName: detachFromList() + summary: 'Moves this paragraph out of its list, if the paragraph is a list item.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'detachFromList(): void;' + return: + type: void + description: '' + - name: getAnnotations() + uid: 'word!Word.Paragraph#getAnnotations:member(1)' + package: word! + fullName: getAnnotations() + summary: Gets annotations set on this Paragraph object. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getAnnotations(): Word.AnnotationCollection;' + return: + type: '' + description: '' + - name: getComments() + uid: 'word!Word.Paragraph#getComments:member(1)' + package: word! + fullName: getComments() + summary: Gets comments associated with the paragraph. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getComments(): Word.CommentCollection;' + return: + type: '' + description: '' + - name: getContentControls(options) + uid: 'word!Word.Paragraph#getContentControls:member(1)' + package: word! + fullName: getContentControls(options) + summary: Gets the currently supported content controls in the paragraph. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Important: If specific types are provided in the options parameter, only content controls of supported types are + returned. Be aware that an exception will be thrown on using methods of a generic + [Word.ContentControl](xref:word!Word.ContentControl:class) that aren't relevant for the specific type. With time, + additional types of content controls may be supported. Therefore, your add-in should request and handle specific + types of content controls. + isPreview: false + isDeprecated: false + syntax: + content: 'getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection;' + parameters: + - id: options + description: Optional. Options that define which content controls are returned. + type: '' + return: + type: '' + description: '' + - name: getHtml() + uid: 'word!Word.Paragraph#getHtml:member(1)' + package: word! + fullName: getHtml() + summary: >- + Gets an HTML representation of the paragraph object. When rendered in a web page or HTML viewer, the formatting + will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact + same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact + fidelity, or consistency across platforms, use `Paragraph.getOoxml()` and convert the returned XML to HTML. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the paragraphs collection. + const paragraphs = context.document.body.paragraphs; + + // Queue a command to load the style property for all of the paragraphs. + paragraphs.load('style'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + + // Queue a set of commands to get the HTML of the first paragraph. + const html = paragraphs.items[0].getHtml(); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Paragraph HTML: ' + html.value); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getHtml(): OfficeExtension.ClientResult;' + return: + type: '<string>' + description: '' + - name: getNext() + uid: 'word!Word.Paragraph#getNext:member(1)' + package: word! + fullName: getNext() + summary: Gets the next paragraph. Throws an `ItemNotFound` error if the paragraph is the last one. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getNext(): Word.Paragraph;' + return: + type: '' + description: '' + - name: getNextOrNullObject() + uid: 'word!Word.Paragraph#getNextOrNullObject:member(1)' + package: word! + fullName: getNextOrNullObject() + summary: >- + Gets the next paragraph. If the paragraph is the last one, then this method will return an object with its + `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getNextOrNullObject(): Word.Paragraph;' + return: + type: '' + description: '' + - name: getOoxml() + uid: 'word!Word.Paragraph#getOoxml:member(1)' + package: word! + fullName: getOoxml() + summary: Gets the Office Open XML (OOXML) representation of the paragraph object. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the paragraphs collection. + const paragraphs = context.document.body.paragraphs; + + // Queue a command to load the style property for the top 2 paragraphs. + paragraphs.load({select: 'style', top: 2} ); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + + // Queue a set of commands to get the OOXML of the first paragraph. + const ooxml = paragraphs.items[0].getOoxml(); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Paragraph OOXML: ' + ooxml.value); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getOoxml(): OfficeExtension.ClientResult;' + return: + type: '<string>' + description: '' + - name: getPrevious() + uid: 'word!Word.Paragraph#getPrevious:member(1)' + package: word! + fullName: getPrevious() + summary: Gets the previous paragraph. Throws an `ItemNotFound` error if the paragraph is the first one. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getPrevious(): Word.Paragraph;' + return: + type: '' + description: '' + - name: getPreviousOrNullObject() + uid: 'word!Word.Paragraph#getPreviousOrNullObject:member(1)' + package: word! + fullName: getPreviousOrNullObject() + summary: >- + Gets the previous paragraph. If the paragraph is the first one, then this method will return an object with its + `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: |- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the paragraphs collection. + const paragraphs = context.document.body.paragraphs; + + // Queue a command to load the text property for all of the paragraphs. + paragraphs.load('text'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + + // Queue commands to create a proxy object for the next-to-last paragraph. + const indexOfLastParagraph = paragraphs.items.length - 1; + const precedingParagraph = paragraphs.items[indexOfLastParagraph].getPreviousOrNullObject(); + + // Queue a command to load the text of the preceding paragraph. + precedingParagraph.load('text'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + if (precedingParagraph.isNullObject) { + console.log('There are no paragraphs before the current one.'); + } else { + console.log('The preceding paragraph is: ' + precedingParagraph.text); + } + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getPreviousOrNullObject(): Word.Paragraph;' + return: + type: '' + description: '' + - name: getRange(rangeLocation) + uid: 'word!Word.Paragraph#getRange:member(1)' + package: word! + fullName: getRange(rangeLocation) + summary: 'Gets the whole paragraph, or the starting or ending point of the paragraph, as a range.' + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/get-paragraph-on-insertion-point.yaml + + + await Word.run(async (context) => { + // Get the complete sentence (as range) associated with the insertion point. + const sentences: Word.RangeCollection = context.document + .getSelection() + .getTextRanges(["."] /* Using the "." as delimiter */, false /*means without trimming spaces*/); + sentences.load("$none"); + await context.sync(); + + // Expand the range to the end of the paragraph to get all the complete sentences. + const sentencesToTheEndOfParagraph: Word.RangeCollection = sentences.items[0] + .getRange() + .expandTo( + context.document + .getSelection() + .paragraphs.getFirst() + .getRange(Word.RangeLocation.end) + ) + .getTextRanges(["."], false /* Don't trim spaces*/); + sentencesToTheEndOfParagraph.load("text"); + await context.sync(); + + for (let i = 0; i < sentencesToTheEndOfParagraph.items.length; i++) { + console.log(sentencesToTheEndOfParagraph.items[i].text); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | + Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): + Word.Range; + parameters: + - id: rangeLocation + description: 'Optional. The range location must be ''Whole'', ''Start'', ''End'', ''After'', or ''Content''.' + type: >- + | | + | | + | "Whole" | "Start" | "End" | "After" | "Content" + return: + type: '' + description: '' + - name: getReviewedText(changeTrackingVersion) + uid: 'word!Word.Paragraph#getReviewedText:member(1)' + package: word! + fullName: getReviewedText(changeTrackingVersion) + summary: Gets reviewed text based on ChangeTrackingVersion selection. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult;' + parameters: + - id: changeTrackingVersion + description: Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + type: '' + return: + type: '<string>' + description: '' + - name: getReviewedText(changeTrackingVersionString) + uid: 'word!Word.Paragraph#getReviewedText:member(2)' + package: word! + fullName: getReviewedText(changeTrackingVersionString) + summary: Gets reviewed text based on ChangeTrackingVersion selection. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getReviewedText(changeTrackingVersionString?: "Original" | "Current"): OfficeExtension.ClientResult;' + parameters: + - id: changeTrackingVersionString + description: Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + type: '"Original" | "Current"' + return: + type: '<string>' + description: '' + - name: getText(options) + uid: 'word!Word.Paragraph#getText:member(1)' + package: word! + fullName: getText(options) + summary: >- + Returns the text of the paragraph. This excludes equations, graphics (e.g., images, videos, drawings), and special + characters that mark various content (e.g., for content controls, fields, comments, footnotes, endnotes). By + default, hidden text and text marked as deleted are excluded. + remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: |- + getText(options?: Word.GetTextOptions | { + IncludeHiddenText?: boolean; + IncludeTextMarkedAsDeleted?: boolean; + }): OfficeExtension.ClientResult; + parameters: + - id: options + description: >- + Optional. Options that define whether the final result should include hidden text and text marked as + deleted. + type: |- + | { + IncludeHiddenText?: boolean; + IncludeTextMarkedAsDeleted?: boolean; + } + return: + type: '<string>' + description: '' + - name: 'getTextRanges(endingMarks, trimSpacing)' + uid: 'word!Word.Paragraph#getTextRanges:member(1)' + package: word! + fullName: 'getTextRanges(endingMarks, trimSpacing)' + summary: Gets the text ranges in the paragraph by using punctuation marks and/or other ending marks. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection;' + parameters: + - id: endingMarks + description: Required. The punctuation marks and/or other ending marks as an array of strings. + type: 'string[]' + - id: trimSpacing + description: >- + Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end + marks) from the start and end of the ranges returned in the range collection. Default is false which + indicates that spacing characters at the start and end of the ranges are included in the range collection. + type: boolean + return: + type: '' + description: '' + - name: getTrackedChanges() + uid: 'word!Word.Paragraph#getTrackedChanges:member(1)' + package: word! + fullName: getTrackedChanges() + summary: Gets the collection of the TrackedChange objects in the paragraph. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getTrackedChanges(): Word.TrackedChangeCollection;' + return: + type: '' + description: '' + - name: insertAnnotations(annotations) + uid: 'word!Word.Paragraph#insertAnnotations:member(1)' + package: word! + fullName: insertAnnotations(annotations) + summary: Inserts annotations on this Paragraph object. + remarks: >- + \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Adds annotations to the selected paragraph. + + await Word.run(async (context) => { + const paragraph: Word.Paragraph = context.document.getSelection().paragraphs.getFirst(); + const options: Word.CritiquePopupOptions = { + brandingTextResourceId: "PG.TabLabel", + subtitleResourceId: "PG.HelpCommand.TipTitle", + titleResourceId: "PG.HelpCommand.Label", + suggestions: ["suggestion 1", "suggestion 2", "suggestion 3"] + }; + const critique1: Word.Critique = { + colorScheme: Word.CritiqueColorScheme.red, + start: 1, + length: 3, + popupOptions: options + }; + const critique2: Word.Critique = { + colorScheme: Word.CritiqueColorScheme.green, + start: 6, + length: 1, + popupOptions: options + }; + const critique3: Word.Critique = { + colorScheme: Word.CritiqueColorScheme.blue, + start: 10, + length: 3, + popupOptions: options + }; + const critique4: Word.Critique = { + colorScheme: Word.CritiqueColorScheme.lavender, + start: 14, + length: 3, + popupOptions: options + }; + const critique5: Word.Critique = { + colorScheme: Word.CritiqueColorScheme.berry, + start: 18, + length: 10, + popupOptions: options + }; + const annotationSet: Word.AnnotationSet = { + critiques: [critique1, critique2, critique3, critique4, critique5] + }; + + const annotationIds = paragraph.insertAnnotations(annotationSet); + + await context.sync(); + + console.log("Annotations inserted:", annotationIds.value); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'insertAnnotations(annotations: Word.AnnotationSet): OfficeExtension.ClientResult;' + parameters: + - id: annotations + description: Annotations to set. + type: '' + return: + type: '<string[]>' + description: An array of the inserted annotations identifiers. + - name: 'insertBreak(breakType, insertLocation)' + uid: 'word!Word.Paragraph#insertBreak:member(1)' + package: word! + fullName: 'insertBreak(breakType, insertLocation)' + summary: Inserts a break at the specified location in the main document. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Run a batch operation against the Word object model. + + await Word.run(async (context) => { + + // Create a proxy object for the paragraphs collection. + const paragraphs = context.document.body.paragraphs; + + // Queue a command to load the style property for the top 2 paragraphs. + // We never perform an empty load. We always must request a property. + paragraphs.load({select: 'style', top: 2} ); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + + // Queue a command to get the first paragraph. + const paragraph = paragraphs.items[0]; + + // Queue a command to insert a page break after the first paragraph. + paragraph.insertBreak(Word.BreakType.page, Word.InsertLocation.after); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Inserted a page break after the paragraph.'); + }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/insert-line-and-page-breaks.yaml + + + Word.run(async (context) => { + context.document.body.paragraphs.getFirst().insertBreak(Word.BreakType.line, "After"); + + await context.sync(); + console.log("success"); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | + "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | + "After"): void; + parameters: + - id: breakType + description: Required. The break type to add to the document. + type: >- + | "Page" | "Next" | "SectionNext" | "SectionContinuous" | + "SectionEven" | "SectionOdd" | "Line" + - id: insertLocation + description: Required. The value must be 'Before' or 'After'. + type: >- + | + | "Before" | "After" + return: + type: void + description: '' + - name: insertContentControl(contentControlType) + uid: 'word!Word.Paragraph#insertContentControl:member(1)' + package: word! + fullName: insertContentControl(contentControlType) + summary: Wraps the Paragraph object with a content control. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. + + + #### Examples + + + ```TypeScript + + // Run a batch operation against the Word object model. + + await Word.run(async (context) => { + + // Create a proxy object for the paragraphs collection. + const paragraphs = context.document.body.paragraphs; + + // Queue a command to load the style property for the top 2 paragraphs. + // We never perform an empty load. We always must request a property. + paragraphs.load({select: 'style', top: 2} ); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + + // Queue a command to get the first paragraph. + const paragraph = paragraphs.items[0]; + + // Queue a command to wrap the first paragraph in a rich text content control. + paragraph.insertContentControl(); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Wrapped the first paragraph in a content control.'); + }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-content-controls.yaml + + + // Traverses each paragraph of the document and wraps a content control on each with either a even or odd tags. + + await Word.run(async (context) => { + let paragraphs = context.document.body.paragraphs; + paragraphs.load("$none"); // Don't need any properties; just wrap each paragraph with a content control. + + await context.sync(); + + for (let i = 0; i < paragraphs.items.length; i++) { + let contentControl = paragraphs.items[i].insertContentControl(); + // For even, tag "even". + if (i % 2 === 0) { + contentControl.tag = "even"; + } else { + contentControl.tag = "odd"; + } + } + console.log("Content controls inserted: " + paragraphs.items.length); + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; + parameters: + - id: contentControlType + description: >- + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. + type: >- + | | | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" + return: + type: '' + description: '' + - name: 'insertFileFromBase64(base64File, insertLocation)' + uid: 'word!Word.Paragraph#insertFileFromBase64:member(1)' + package: word! + fullName: 'insertFileFromBase64(base64File, insertLocation)' + summary: Inserts a document into the paragraph at the specified location. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form + field). Consider replacing such a form field with a content control or other option appropriate for your scenario. + isPreview: false + isDeprecated: false + syntax: + content: >- + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start + | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + parameters: + - id: base64File + description: Required. The Base64-encoded content of a .docx file. + type: string + - id: insertLocation + description: 'Required. The value must be ''Replace'', ''Start'', or ''End''.' + type: >- + | | | "Replace" | "Start" | "End" + return: + type: '' + description: '' + - name: 'insertHtml(html, insertLocation)' + uid: 'word!Word.Paragraph#insertHtml:member(1)' + package: word! + fullName: 'insertHtml(html, insertLocation)' + summary: Inserts HTML into the paragraph at the specified location. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the paragraphs collection. + const paragraphs = context.document.body.paragraphs; + + // Queue a command to load the style property for the top 2 paragraphs. + // We never perform an empty load. We always must request a property. + paragraphs.load({select: 'style', top: 2} ); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + + // Queue a command to get the first paragraph. + const paragraph = paragraphs.items[0]; + + // Queue a command to insert HTML content at the end of the first paragraph. + paragraph.insertHtml('Inserted HTML.', Word.InsertLocation.end); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Inserted HTML content at the end of the first paragraph.'); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | + Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + parameters: + - id: html + description: Required. The HTML to be inserted in the paragraph. + type: string + - id: insertLocation + description: 'Required. The value must be ''Replace'', ''Start'', or ''End''.' + type: >- + | | | "Replace" | "Start" | "End" + return: + type: '' + description: '' + - name: 'insertInlinePictureFromBase64(base64EncodedImage, insertLocation)' + uid: 'word!Word.Paragraph#insertInlinePictureFromBase64:member(1)' + package: word! + fullName: 'insertInlinePictureFromBase64(base64EncodedImage, insertLocation)' + summary: Inserts a picture into the paragraph at the specified location. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the paragraphs collection. + const paragraphs = context.document.body.paragraphs; + + // Queue a command to load the style property for all of the paragraphs. + paragraphs.load('style'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + + // Queue a command to get the first paragraph. + const paragraph = paragraphs.items[0]; + + const b64encodedImg = "iVBORw0KGgoAAAANSUhEUgAAAB4AAAANCAIAAAAxEEnAAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACFSURBVDhPtY1BEoQwDMP6/0+XgIMTBAeYoTqso9Rkx1zG+tNj1H94jgGzeNSjteO5vtQQuG2seO0av8LzGbe3anzRoJ4ybm/VeKEerAEbAUpW4aWQCmrGFWykRzGBCnYy2ha3oAIq2MloW9yCCqhgJ6NtcQsqoIKdjLbFLaiACnYyf2fODbrjZcXfr2F4AAAAAElFTkSuQmCC"; + + // Queue a command to insert a base64 encoded image at the beginning of the first paragraph. + paragraph.insertInlinePictureFromBase64(b64encodedImg, Word.InsertLocation.start); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Added an image to the first paragraph.'); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | + Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.InlinePicture; + parameters: + - id: base64EncodedImage + description: Required. The Base64-encoded image to be inserted. + type: string + - id: insertLocation + description: 'Required. The value must be ''Replace'', ''Start'', or ''End''.' + type: >- + | | | "Replace" | "Start" | "End" + return: + type: '' + description: '' + - name: 'insertOoxml(ooxml, insertLocation)' + uid: 'word!Word.Paragraph#insertOoxml:member(1)' + package: word! + fullName: 'insertOoxml(ooxml, insertLocation)' + summary: Inserts OOXML into the paragraph at the specified location. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | + Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + parameters: + - id: ooxml + description: Required. The OOXML to be inserted in the paragraph. + type: string + - id: insertLocation + description: 'Required. The value must be ''Replace'', ''Start'', or ''End''.' + type: >- + | | | "Replace" | "Start" | "End" + return: + type: '' + description: '' + - name: 'insertParagraph(paragraphText, insertLocation)' + uid: 'word!Word.Paragraph#insertParagraph:member(1)' + package: word! + fullName: 'insertParagraph(paragraphText, insertLocation)' + summary: Inserts a paragraph at the specified location. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | + "Before" | "After"): Word.Paragraph; + parameters: + - id: paragraphText + description: Required. The paragraph text to be inserted. + type: string + - id: insertLocation + description: Required. The value must be 'Before' or 'After'. + type: >- + | + | "Before" | "After" + return: + type: '' + description: '' + - name: 'insertTable(rowCount, columnCount, insertLocation, values)' + uid: 'word!Word.Paragraph#insertTable:member(1)' + package: word! + fullName: 'insertTable(rowCount, columnCount, insertLocation, values)' + summary: Inserts a table with the specified number of rows and columns. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before | + Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; + parameters: + - id: rowCount + description: Required. The number of rows in the table. + type: number + - id: columnCount + description: Required. The number of columns in the table. + type: number + - id: insertLocation + description: Required. The value must be 'Before' or 'After'. + type: >- + | + | "Before" | "After" + - id: values + description: Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + type: 'string[][]' + return: + type: '' + description: '' + - name: 'insertText(text, insertLocation)' + uid: 'word!Word.Paragraph#insertText:member(1)' + package: word! + fullName: 'insertText(text, insertLocation)' + summary: Inserts text into the paragraph at the specified location. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/insert-in-different-locations.yaml + + + await Word.run(async (context) => { + // Replace the last paragraph. + const range: Word.Range = context.document.body.paragraphs.getLast().insertText("Just replaced the last paragraph!", "Replace"); + range.font.highlightColor = "black"; + range.font.color = "white"; + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | + Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + parameters: + - id: text + description: Required. Text to be inserted. + type: string + - id: insertLocation + description: 'Required. The value must be ''Replace'', ''Start'', or ''End''.' + type: >- + | | | "Replace" | "Start" | "End" + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.Paragraph#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.ParagraphLoadOptions): Word.Paragraph;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.Paragraph#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.Paragraph;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.Paragraph#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Paragraph; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: 'search(searchText, searchOptions)' + uid: 'word!Word.Paragraph#search:member(1)' + package: word! + fullName: 'search(searchText, searchOptions)' + summary: >- + Performs a search with the specified SearchOptions on the scope of the paragraph object. The search results are a + collection of range objects. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: |- + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + parameters: + - id: searchText + description: Required. The search text. + type: string + - id: searchOptions + description: Optional. Options for the search. + type: |- + | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + } + return: + type: '' + description: '' + - name: select(selectionMode) + uid: 'word!Word.Paragraph#select:member(1)' + package: word! + fullName: select(selectionMode) + summary: Selects and navigates the Word UI to the paragraph. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/35-ranges/scroll-to-range.yaml + + + await Word.run(async (context) => { + // If select is called with no parameters, it selects the object. + context.document.body.paragraphs.getLast().select(); + + await context.sync(); + }); + + + ... + + + await Word.run(async (context) => { + // Select can be at the start or end of a range; this by definition moves the insertion point without selecting the range. + context.document.body.paragraphs.getLast().select(Word.SelectionMode.end); + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'select(selectionMode?: Word.SelectionMode): void;' + parameters: + - id: selectionMode + description: 'Optional. The selection mode must be ''Select'', ''Start'', or ''End''. ''Select'' is the default.' + type: '' + return: + type: void + description: '' + - name: select(selectionModeString) + uid: 'word!Word.Paragraph#select:member(2)' + package: word! + fullName: select(selectionModeString) + summary: Selects and navigates the Word UI to the paragraph. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'select(selectionModeString?: "Select" | "Start" | "End"): void;' + parameters: + - id: selectionModeString + description: 'Optional. The selection mode must be ''Select'', ''Start'', or ''End''. ''Select'' is the default.' + type: '"Select" | "Start" | "End"' + return: + type: void + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.Paragraph#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.ParagraphUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: >- + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/90-scenarios/multiple-property-set.yaml + + + await Word.run(async (context) => { + const paragraph: Word.Paragraph = context.document.body.paragraphs.getFirst(); + paragraph.set({ + leftIndent: 30, + font: { + bold: true, + color: "red" + } + }); + + await context.sync(); + }); + + + ... + + + await Word.run(async (context) => { + const firstParagraph: Word.Paragraph = context.document.body.paragraphs.getFirst(); + const secondParagraph: Word.Paragraph = firstParagraph.getNext(); + firstParagraph.load("text, font/color, font/bold, leftIndent"); + + await context.sync(); + + secondParagraph.set(firstParagraph); + + await context.sync(); + }); + + ``` + - name: set(properties) + uid: 'word!Word.Paragraph#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.Paragraph): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: 'split(delimiters, trimDelimiters, trimSpacing)' + uid: 'word!Word.Paragraph#split:member(1)' + package: word! + fullName: 'split(delimiters, trimDelimiters, trimSpacing)' + summary: Splits the paragraph into child ranges by using delimiters. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/35-ranges/split-words-of-first-paragraph.yaml + + + await Word.run(async (context) => { + const paragraph: Word.Paragraph = context.document.body.paragraphs.getFirst(); + const words = paragraph.split([" "], true /* trimDelimiters*/, true /* trimSpaces */); + words.load("text"); + + await context.sync(); + + for (let i = 0; i < words.items.length; i++) { + if (i >= 1) { + words.items[i - 1].font.highlightColor = "#FFFFFF"; + } + words.items[i].font.highlightColor = "#FFFF00"; + + await context.sync(); + await pause(200); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'split(delimiters: string[], trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection;' + parameters: + - id: delimiters + description: Required. The delimiters as an array of strings. + type: 'string[]' + - id: trimDelimiters + description: >- + Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false + which indicates that the delimiters are included in the ranges returned in the range collection. + type: boolean + - id: trimSpacing + description: >- + Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end + marks) from the start and end of the ranges returned in the range collection. Default is false which + indicates that spacing characters at the start and end of the ranges are included in the range collection. + type: boolean + return: + type: '' + description: '' + - name: startNewList() + uid: 'word!Word.Paragraph#startNewList:member(1)' + package: word! + fullName: startNewList() + summary: Starts a new list with this paragraph. Fails if the paragraph is already a list item. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/20-lists/insert-list.yaml + + + // This example starts a new list with the second paragraph. + + await Word.run(async (context) => { + const paragraphs: Word.ParagraphCollection = context.document.body.paragraphs; + paragraphs.load("$none"); + + await context.sync(); + + // Start new list using the second paragraph. + const list: Word.List = paragraphs.items[1].startNewList(); + list.load("$none"); + + await context.sync(); + + // To add new items to the list, use Start or End on the insertLocation parameter. + list.insertParagraph("New list item at the start of the list", "Start"); + const paragraph: Word.Paragraph = list.insertParagraph("New list item at the end of the list (set to list level 5)", "End"); + + // Set up list level for the list item. + paragraph.listItem.level = 4; + + // To add paragraphs outside the list, use Before or After. + list.insertParagraph("New paragraph goes after (not part of the list)", "After"); + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'startNewList(): Word.List;' + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.Paragraph#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.Paragraph` object is an API object, the `toJSON` method returns a plain + JavaScript object (typed as `Word.Interfaces.ParagraphData`) that contains shallow copies of any loaded + child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.ParagraphData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.Paragraph#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.Paragraph;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.Paragraph#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.Paragraph;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.paragraphaddedeventargs.yml b/docs/docs-ref-autogen/word_1_9/word/word.paragraphaddedeventargs.yml new file mode 100644 index 0000000000..1004f92e3a --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.paragraphaddedeventargs.yml @@ -0,0 +1,89 @@ +### YamlMime:TSType +name: Word.ParagraphAddedEventArgs +uid: 'word!Word.ParagraphAddedEventArgs:interface' +package: word! +fullName: Word.ParagraphAddedEventArgs +summary: Provides information about the paragraphs that raised the paragraphAdded event. +remarks: >- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/onadded-event.yaml + + + // Registers the onParagraphAdded event handler on the document. + + await Word.run(async (context) => { + eventContext = context.document.onParagraphAdded.add(paragraphAdded); + await context.sync(); + + console.log("Added event handler for when paragraphs are added."); + }); + + + ... + + + async function paragraphAdded(event: Word.ParagraphAddedEventArgs) { + await Word.run(async (context) => { + console.log(`${event.type} event detected. IDs of paragraphs that were added:`, event.uniqueLocalIds); + }); + } + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: source + uid: 'word!Word.ParagraphAddedEventArgs#source:member' + package: word! + fullName: source + summary: The source of the event. It can be local or remote (through coauthoring). + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'source: Word.EventSource | "Local" | "Remote";' + return: + type: ' | "Local" | "Remote"' + - name: type + uid: 'word!Word.ParagraphAddedEventArgs#type:member' + package: word! + fullName: type + summary: The event type. See Word.EventType for details. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" + | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | + "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | + "AnnotationRemoved" | "AnnotationPopupAction"; + return: + type: >- + | "ContentControlDeleted" | "ContentControlSelectionChanged" | + "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | + "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | + "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction" + - name: uniqueLocalIds + uid: 'word!Word.ParagraphAddedEventArgs#uniqueLocalIds:member' + package: word! + fullName: uniqueLocalIds + summary: >- + Gets the unique IDs of the involved paragraphs. IDs are in standard 8-4-4-4-12 GUID format without curly braces + and differ across sessions and coauthors. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'uniqueLocalIds: string[];' + return: + type: 'string[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.paragraphchangedeventargs.yml b/docs/docs-ref-autogen/word_1_9/word/word.paragraphchangedeventargs.yml new file mode 100644 index 0000000000..30f904d6a0 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.paragraphchangedeventargs.yml @@ -0,0 +1,89 @@ +### YamlMime:TSType +name: Word.ParagraphChangedEventArgs +uid: 'word!Word.ParagraphChangedEventArgs:interface' +package: word! +fullName: Word.ParagraphChangedEventArgs +summary: Provides information about the paragraphs that raised the paragraphChanged event. +remarks: >- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/onchanged-event.yaml + + + // Registers the onParagraphChanged event handler on the document. + + await Word.run(async (context) => { + eventContext = context.document.onParagraphChanged.add(paragraphChanged); + await context.sync(); + + console.log("Added event handler for when content is changed in paragraphs."); + }); + + + ... + + + async function paragraphChanged(event: Word.ParagraphChangedEventArgs) { + await Word.run(async (context) => { + console.log(`${event.type} event detected. IDs of paragraphs where content was changed:`, event.uniqueLocalIds); + }); + } + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: source + uid: 'word!Word.ParagraphChangedEventArgs#source:member' + package: word! + fullName: source + summary: The source of the event. It can be local or remote (through coauthoring). + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'source: Word.EventSource | "Local" | "Remote";' + return: + type: ' | "Local" | "Remote"' + - name: type + uid: 'word!Word.ParagraphChangedEventArgs#type:member' + package: word! + fullName: type + summary: The event type. See Word.EventType for details. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" + | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | + "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | + "AnnotationRemoved" | "AnnotationPopupAction"; + return: + type: >- + | "ContentControlDeleted" | "ContentControlSelectionChanged" | + "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | + "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | + "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction" + - name: uniqueLocalIds + uid: 'word!Word.ParagraphChangedEventArgs#uniqueLocalIds:member' + package: word! + fullName: uniqueLocalIds + summary: >- + Gets the unique IDs of the involved paragraphs. IDs are in standard 8-4-4-4-12 GUID format without curly braces + and differ across sessions and coauthors. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'uniqueLocalIds: string[];' + return: + type: 'string[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.paragraphcollection.yml b/docs/docs-ref-autogen/word_1_9/word/word.paragraphcollection.yml new file mode 100644 index 0000000000..efab333626 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.paragraphcollection.yml @@ -0,0 +1,362 @@ +### YamlMime:TSType +name: Word.ParagraphCollection +uid: 'word!Word.ParagraphCollection:class' +package: word! +fullName: Word.ParagraphCollection +summary: 'Contains a collection of [Word.Paragraph](xref:word!Word.Paragraph:class) objects.' +remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/15-images/insert-and-get-pictures.yaml + + + // Inserts an image anchored to the last paragraph. + + await Word.run(async (context) => { + context.document.body.paragraphs + .getLast() + .insertParagraph("", "After") + .insertInlinePictureFromBase64(base64Image, "End"); + + await context.sync(); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.ParagraphCollection#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: items + uid: 'word!Word.ParagraphCollection#items:member' + package: word! + fullName: items + summary: Gets the loaded child items in this collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly items: Word.Paragraph[];' + return: + type: '[]' + description: >- + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/20-lists/insert-list.yaml + + + // This example starts a new list with the second paragraph. + + await Word.run(async (context) => { + const paragraphs: Word.ParagraphCollection = context.document.body.paragraphs; + paragraphs.load("$none"); + + await context.sync(); + + // Start new list using the second paragraph. + const list: Word.List = paragraphs.items[1].startNewList(); + list.load("$none"); + + await context.sync(); + + // To add new items to the list, use Start or End on the insertLocation parameter. + list.insertParagraph("New list item at the start of the list", "Start"); + const paragraph: Word.Paragraph = list.insertParagraph("New list item at the end of the list (set to list level 5)", "End"); + + // Set up list level for the list item. + paragraph.listItem.level = 4; + + // To add paragraphs outside the list, use Before or After. + list.insertParagraph("New paragraph goes after (not part of the list)", "After"); + + await context.sync(); + }); + + ``` +methods: + - name: getFirst() + uid: 'word!Word.ParagraphCollection#getFirst:member(1)' + package: word! + fullName: getFirst() + summary: Gets the first paragraph in this collection. Throws an `ItemNotFound` error if the collection is empty. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml + + + // Gets annotations found in the selected paragraph. + + await Word.run(async (context) => { + const paragraph: Word.Paragraph = context.document.getSelection().paragraphs.getFirst(); + const annotations: Word.AnnotationCollection = paragraph.getAnnotations(); + annotations.load("id,state,critiqueAnnotation"); + + await context.sync(); + + console.log("Annotations found:"); + + for (let i = 0; i < annotations.items.length; i++) { + const annotation: Word.Annotation = annotations.items[i]; + + console.log(`ID ${annotation.id} - state '${annotation.state}':`, annotation.critiqueAnnotation.critique); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getFirst(): Word.Paragraph;' + return: + type: '' + description: '' + - name: getFirstOrNullObject() + uid: 'word!Word.ParagraphCollection#getFirstOrNullObject:member(1)' + package: word! + fullName: getFirstOrNullObject() + summary: >- + Gets the first paragraph in this collection. If the collection is empty, then this method will return an object + with its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFirstOrNullObject(): Word.Paragraph;' + return: + type: '' + description: '' + - name: getLast() + uid: 'word!Word.ParagraphCollection#getLast:member(1)' + package: word! + fullName: getLast() + summary: Gets the last paragraph in this collection. Throws an `ItemNotFound` error if the collection is empty. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/15-images/insert-and-get-pictures.yaml + + + // Inserts an image anchored to the last paragraph. + + await Word.run(async (context) => { + context.document.body.paragraphs + .getLast() + .insertParagraph("", "After") + .insertInlinePictureFromBase64(base64Image, "End"); + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getLast(): Word.Paragraph;' + return: + type: '' + description: '' + - name: getLastOrNullObject() + uid: 'word!Word.ParagraphCollection#getLastOrNullObject:member(1)' + package: word! + fullName: getLastOrNullObject() + summary: >- + Gets the last paragraph in this collection. If the collection is empty, then this method will return an object + with its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getLastOrNullObject(): Word.Paragraph;' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.ParagraphCollection#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: >- + load(options?: Word.Interfaces.ParagraphCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): + Word.ParagraphCollection; + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: >- + & + return: + type: '' + description: |- + + + #### Examples + + ```TypeScript + // This example shows how to get the paragraphs in the Word document + // along with their text and font size properties. + // + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy object for the paragraphs collection. + const paragraphs = context.document.body.paragraphs; + + // Queue a command to load the text and font properties. + // It is best practice to always specify the property set. Otherwise, all properties are + // returned in on the object. + paragraphs.load('text, font/size'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + + // Insert code that works with the paragraphs loaded by paragraphs.load(). + }); + ``` + - name: load(propertyNames) + uid: 'word!Word.ParagraphCollection#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.ParagraphCollection;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.ParagraphCollection#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ParagraphCollection;' + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: '' + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.ParagraphCollection#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.ParagraphCollection` object is an API object, the `toJSON` method + returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphCollectionData`) that contains an + "items" array with shallow copies of any loaded properties from the collection's items. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.ParagraphCollectionData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.ParagraphCollection#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.ParagraphCollection;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.ParagraphCollection#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.ParagraphCollection;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.paragraphdeletedeventargs.yml b/docs/docs-ref-autogen/word_1_9/word/word.paragraphdeletedeventargs.yml new file mode 100644 index 0000000000..6c00fd85b4 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.paragraphdeletedeventargs.yml @@ -0,0 +1,89 @@ +### YamlMime:TSType +name: Word.ParagraphDeletedEventArgs +uid: 'word!Word.ParagraphDeletedEventArgs:interface' +package: word! +fullName: Word.ParagraphDeletedEventArgs +summary: Provides information about the paragraphs that raised the paragraphDeleted event. +remarks: >- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/ondeleted-event.yaml + + + // Registers the onParagraphDeleted event handler on the document. + + await Word.run(async (context) => { + eventContext = context.document.onParagraphDeleted.add(paragraphDeleted); + await context.sync(); + + console.log("Added event handlers for when paragraphs are deleted."); + }); + + + ... + + + async function paragraphDeleted(event: Word.ParagraphDeletedEventArgs) { + await Word.run(async (context) => { + console.log(`${event.type} event detected. IDs of paragraphs that were deleted:`, event.uniqueLocalIds); + }); + } + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: source + uid: 'word!Word.ParagraphDeletedEventArgs#source:member' + package: word! + fullName: source + summary: The source of the event. It can be local or remote (through coauthoring). + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'source: Word.EventSource | "Local" | "Remote";' + return: + type: ' | "Local" | "Remote"' + - name: type + uid: 'word!Word.ParagraphDeletedEventArgs#type:member' + package: word! + fullName: type + summary: The event type. See Word.EventType for details. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" + | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | + "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | + "AnnotationRemoved" | "AnnotationPopupAction"; + return: + type: >- + | "ContentControlDeleted" | "ContentControlSelectionChanged" | + "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | + "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | + "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction" + - name: uniqueLocalIds + uid: 'word!Word.ParagraphDeletedEventArgs#uniqueLocalIds:member' + package: word! + fullName: uniqueLocalIds + summary: >- + Gets the unique IDs of the involved paragraphs. IDs are in standard 8-4-4-4-12 GUID format without curly braces + and differ across sessions and coauthors. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'uniqueLocalIds: string[];' + return: + type: 'string[]' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.paragraphformat.yml b/docs/docs-ref-autogen/word_1_9/word/word.paragraphformat.yml new file mode 100644 index 0000000000..0c21c379cd --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.paragraphformat.yml @@ -0,0 +1,477 @@ +### YamlMime:TSType +name: Word.ParagraphFormat +uid: 'word!Word.ParagraphFormat:class' +package: word! +fullName: Word.ParagraphFormat +summary: Represents a style of paragraph in a document. +remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-styles.yaml + + + // Sets certain aspects of the specified style's paragraph format e.g., the left indent size and the alignment. + + await Word.run(async (context) => { + const styleName = $("#style-name").val() as string; + if (styleName == "") { + console.warn("Enter a style name to update its paragraph format."); + return; + } + + const style: Word.Style = context.document.getStyles().getByNameOrNullObject(styleName); + style.load(); + await context.sync(); + + if (style.isNullObject) { + console.warn(`There's no existing style with the name '${styleName}'.`); + } else { + style.paragraphFormat.leftIndent = 30; + style.paragraphFormat.alignment = Word.Alignment.centered; + console.log(`Successfully the paragraph format of the '${styleName}' style.`); + } + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: alignment + uid: 'word!Word.ParagraphFormat#alignment:member' + package: word! + fullName: alignment + summary: Specifies the alignment for the specified paragraphs. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-styles.yaml + + + // Sets certain aspects of the specified style's paragraph format e.g., the left indent size and the alignment. + + await Word.run(async (context) => { + const styleName = $("#style-name").val() as string; + if (styleName == "") { + console.warn("Enter a style name to update its paragraph format."); + return; + } + + const style: Word.Style = context.document.getStyles().getByNameOrNullObject(styleName); + style.load(); + await context.sync(); + + if (style.isNullObject) { + console.warn(`There's no existing style with the name '${styleName}'.`); + } else { + style.paragraphFormat.leftIndent = 30; + style.paragraphFormat.alignment = Word.Alignment.centered; + console.log(`Successfully the paragraph format of the '${styleName}' style.`); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified";' + return: + type: ' | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"' + - name: context + uid: 'word!Word.ParagraphFormat#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: firstLineIndent + uid: 'word!Word.ParagraphFormat#firstLineIndent:member' + package: word! + fullName: firstLineIndent + summary: >- + Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line + indent, and use a negative value to set a hanging indent. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'firstLineIndent: number;' + return: + type: number + - name: keepTogether + uid: 'word!Word.ParagraphFormat#keepTogether:member' + package: word! + fullName: keepTogether + summary: >- + Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates + the document. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'keepTogether: boolean;' + return: + type: boolean + - name: keepWithNext + uid: 'word!Word.ParagraphFormat#keepWithNext:member' + package: word! + fullName: keepWithNext + summary: >- + Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft + Word repaginates the document. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'keepWithNext: boolean;' + return: + type: boolean + - name: leftIndent + uid: 'word!Word.ParagraphFormat#leftIndent:member' + package: word! + fullName: leftIndent + summary: Specifies the left indent. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-styles.yaml + + + // Sets certain aspects of the specified style's paragraph format e.g., the left indent size and the alignment. + + await Word.run(async (context) => { + const styleName = $("#style-name").val() as string; + if (styleName == "") { + console.warn("Enter a style name to update its paragraph format."); + return; + } + + const style: Word.Style = context.document.getStyles().getByNameOrNullObject(styleName); + style.load(); + await context.sync(); + + if (style.isNullObject) { + console.warn(`There's no existing style with the name '${styleName}'.`); + } else { + style.paragraphFormat.leftIndent = 30; + style.paragraphFormat.alignment = Word.Alignment.centered; + console.log(`Successfully the paragraph format of the '${styleName}' style.`); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'leftIndent: number;' + return: + type: number + - name: lineSpacing + uid: 'word!Word.ParagraphFormat#lineSpacing:member' + package: word! + fullName: lineSpacing + summary: Specifies the line spacing (in points) for the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lineSpacing: number;' + return: + type: number + - name: lineUnitAfter + uid: 'word!Word.ParagraphFormat#lineUnitAfter:member' + package: word! + fullName: lineUnitAfter + summary: Specifies the amount of spacing (in gridlines) after the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lineUnitAfter: number;' + return: + type: number + - name: lineUnitBefore + uid: 'word!Word.ParagraphFormat#lineUnitBefore:member' + package: word! + fullName: lineUnitBefore + summary: Specifies the amount of spacing (in gridlines) before the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'lineUnitBefore: number;' + return: + type: number + - name: mirrorIndents + uid: 'word!Word.ParagraphFormat#mirrorIndents:member' + package: word! + fullName: mirrorIndents + summary: Specifies whether left and right indents are the same width. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'mirrorIndents: boolean;' + return: + type: boolean + - name: outlineLevel + uid: 'word!Word.ParagraphFormat#outlineLevel:member' + package: word! + fullName: outlineLevel + summary: Specifies the outline level for the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + outlineLevel: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | + "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | + "OutlineLevelBodyText"; + return: + type: >- + | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | + "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | + "OutlineLevelBodyText" + - name: rightIndent + uid: 'word!Word.ParagraphFormat#rightIndent:member' + package: word! + fullName: rightIndent + summary: Specifies the right indent (in points) for the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'rightIndent: number;' + return: + type: number + - name: spaceAfter + uid: 'word!Word.ParagraphFormat#spaceAfter:member' + package: word! + fullName: spaceAfter + summary: Specifies the amount of spacing (in points) after the specified paragraph or text column. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'spaceAfter: number;' + return: + type: number + - name: spaceBefore + uid: 'word!Word.ParagraphFormat#spaceBefore:member' + package: word! + fullName: spaceBefore + summary: Specifies the spacing (in points) before the specified paragraphs. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'spaceBefore: number;' + return: + type: number + - name: widowControl + uid: 'word!Word.ParagraphFormat#widowControl:member' + package: word! + fullName: widowControl + summary: >- + Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the + paragraph when Microsoft Word repaginates the document. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'widowControl: boolean;' + return: + type: boolean +methods: + - name: load(options) + uid: 'word!Word.ParagraphFormat#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.ParagraphFormatLoadOptions): Word.ParagraphFormat;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.ParagraphFormat#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.ParagraphFormat;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.ParagraphFormat#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ParagraphFormat; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.ParagraphFormat#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.ParagraphFormatUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.ParagraphFormat#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.ParagraphFormat): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.ParagraphFormat#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.ParagraphFormat` object is an API object, the `toJSON` method returns a + plain JavaScript object (typed as `Word.Interfaces.ParagraphFormatData`) that contains shallow copies of + any loaded child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.ParagraphFormatData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.ParagraphFormat#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.ParagraphFormat;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.ParagraphFormat#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.ParagraphFormat;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.range.yml b/docs/docs-ref-autogen/word_1_9/word/word.range.yml new file mode 100644 index 0000000000..bc9e7dfb54 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.range.yml @@ -0,0 +1,2224 @@ +### YamlMime:TSType +name: Word.Range +uid: 'word!Word.Range:class' +package: word! +fullName: Word.Range +summary: Represents a contiguous area in a document. +remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-comments.yaml + + + // Gets the range of the first comment in the selected content. + + await Word.run(async (context) => { + const comment: Word.Comment = context.document.getSelection().getComments().getFirstOrNullObject(); + comment.load("contentRange"); + const range: Word.Range = comment.getRange(); + range.load("text"); + await context.sync(); + + if (comment.isNullObject) { + console.warn("No comments in the selection, so no range to get."); + return; + } + + console.log(`Comment location: ${range.text}`); + const contentRange: Word.CommentContentRange = comment.contentRange; + console.log("Comment content range:", contentRange); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: contentControls + uid: 'word!Word.Range#contentControls:member' + package: word! + fullName: contentControls + summary: Gets the collection of content control objects in the range. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly contentControls: Word.ContentControlCollection;' + return: + type: '' + - name: context + uid: 'word!Word.Range#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: endnotes + uid: 'word!Word.Range#endnotes:member' + package: word! + fullName: endnotes + summary: Gets the collection of endnotes in the range. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly endnotes: Word.NoteItemCollection;' + return: + type: '' + - name: fields + uid: 'word!Word.Range#fields:member' + package: word! + fullName: fields + summary: Gets the collection of field objects in the range. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly fields: Word.FieldCollection;' + return: + type: '' + - name: font + uid: 'word!Word.Range#font:member' + package: word! + fullName: font + summary: 'Gets the text format of the range. Use this to get and set font name, size, color, and other properties.' + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly font: Word.Font;' + return: + type: '' + - name: footnotes + uid: 'word!Word.Range#footnotes:member' + package: word! + fullName: footnotes + summary: Gets the collection of footnotes in the range. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-footnotes.yaml + + + // Gets the footnotes in the selected document range. + + await Word.run(async (context) => { + const footnotes: Word.NoteItemCollection = context.document.getSelection().footnotes; + footnotes.load("length"); + await context.sync(); + + console.log("Number of footnotes in the selected range: " + footnotes.items.length); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly footnotes: Word.NoteItemCollection;' + return: + type: '' + - name: hyperlink + uid: 'word!Word.Range#hyperlink:member' + package: word! + fullName: hyperlink + summary: >- + Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted + when you set a new hyperlink on the range. Use a '\#' to separate the address part from the optional location + part. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'hyperlink: string;' + return: + type: string + - name: inlinePictures + uid: 'word!Word.Range#inlinePictures:member' + package: word! + fullName: inlinePictures + summary: Gets the collection of inline picture objects in the range. + remarks: '\[ [API set: WordApi 1.2](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly inlinePictures: Word.InlinePictureCollection;' + return: + type: '' + - name: isEmpty + uid: 'word!Word.Range#isEmpty:member' + package: word! + fullName: isEmpty + summary: Checks whether the range length is zero. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly isEmpty: boolean;' + return: + type: boolean + - name: lists + uid: 'word!Word.Range#lists:member' + package: word! + fullName: lists + summary: Gets the collection of list objects in the range. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly lists: Word.ListCollection;' + return: + type: '' + - name: paragraphs + uid: 'word!Word.Range#paragraphs:member' + package: word! + fullName: paragraphs + summary: Gets the collection of paragraph objects in the range. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Important: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this range aren't + returned. From requirement set 1.3, paragraphs in such tables are also returned. + isPreview: false + isDeprecated: false + syntax: + content: 'readonly paragraphs: Word.ParagraphCollection;' + return: + type: '' + - name: parentBody + uid: 'word!Word.Range#parentBody:member' + package: word! + fullName: parentBody + summary: Gets the parent body of the range. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentBody: Word.Body;' + return: + type: '' + - name: parentContentControl + uid: 'word!Word.Range#parentContentControl:member' + package: word! + fullName: parentContentControl + summary: >- + Gets the currently supported content control that contains the range. Throws an `ItemNotFound` error if there + isn't a parent content control. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-checkbox-content-control.yaml + + + // Toggles the isChecked property of the first checkbox content control found in the selection. + + await Word.run(async (context) => { + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.checkBox] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,checkboxContentControl/isChecked"); + + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,checkboxContentControl/isChecked"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.checkBox) { + console.warn("No checkbox content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + const isCheckedBefore = selectedContentControl.checkboxContentControl.isChecked; + console.log("isChecked state before:", `id: ${selectedContentControl.id} ... isChecked: ${isCheckedBefore}`); + selectedContentControl.checkboxContentControl.isChecked = !isCheckedBefore; + selectedContentControl.load("id,checkboxContentControl/isChecked"); + await context.sync(); + + console.log( + "isChecked state after:", + `id: ${selectedContentControl.id} ... isChecked: ${selectedContentControl.checkboxContentControl.isChecked}` + ); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentContentControl: Word.ContentControl;' + return: + type: '' + - name: parentContentControlOrNullObject + uid: 'word!Word.Range#parentContentControlOrNullObject:member' + package: word! + fullName: parentContentControlOrNullObject + summary: >- + Gets the currently supported content control that contains the range. If there isn't a parent content control, + then this method will return an object with its `isNullObject` property set to `true`. For further + information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentContentControlOrNullObject: Word.ContentControl;' + return: + type: '' + - name: parentTable + uid: 'word!Word.Range#parentTable:member' + package: word! + fullName: parentTable + summary: Gets the table that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTable: Word.Table;' + return: + type: '' + - name: parentTableCell + uid: 'word!Word.Range#parentTableCell:member' + package: word! + fullName: parentTableCell + summary: Gets the table cell that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTableCell: Word.TableCell;' + return: + type: '' + - name: parentTableCellOrNullObject + uid: 'word!Word.Range#parentTableCellOrNullObject:member' + package: word! + fullName: parentTableCellOrNullObject + summary: >- + Gets the table cell that contains the range. If it isn't contained in a table cell, then this method will return + an object with its `isNullObject` property set to `true`. For further information, see [*OrNullObject + methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTableCellOrNullObject: Word.TableCell;' + return: + type: '' + - name: parentTableOrNullObject + uid: 'word!Word.Range#parentTableOrNullObject:member' + package: word! + fullName: parentTableOrNullObject + summary: >- + Gets the table that contains the range. If it isn't contained in a table, then this method will return an object + with its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTableOrNullObject: Word.Table;' + return: + type: '' + - name: style + uid: 'word!Word.Range#style:member' + package: word! + fullName: style + summary: >- + Specifies the style name for the range. Use this property for custom styles and localized style names. To use the + built-in styles that are portable between locales, see the "styleBuiltIn" property. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'style: string;' + return: + type: string + - name: styleBuiltIn + uid: 'word!Word.Range#styleBuiltIn:member' + package: word! + fullName: styleBuiltIn + summary: >- + Specifies the built-in style name for the range. Use this property for built-in styles that are portable between + locales. To use custom styles or localized style names, see the "style" property. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/90-scenarios/doc-assembly.yaml + + + await Word.run(async (context) => { + const header: Word.Range = context.document.body.insertText("This is a sample Heading 1 Title!!\n", + "Start" /*this means at the beginning of the body */); + header.styleBuiltIn = Word.BuiltInStyleName.heading1; + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | + "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | + "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | + "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | + "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | + "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | + "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" + | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" + | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" + | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | + "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" + | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | + "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | + "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | + "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | + "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" + | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | + "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | + "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | + "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | + "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | + "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | + "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | + "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + return: + type: >- + | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | + "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | + "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | + "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | + "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | + "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | + "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | + "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | + "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | + "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | + "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | + "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | + "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" + | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" + | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | + "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | + "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | + "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | + "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | + "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | + "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | + "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | + "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | + "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | + "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6" + - name: tables + uid: 'word!Word.Range#tables:member' + package: word! + fullName: tables + summary: Gets the collection of table objects in the range. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly tables: Word.TableCollection;' + return: + type: '' + - name: text + uid: 'word!Word.Range#text:member' + package: word! + fullName: text + summary: Gets the text of the range. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly text: string;' + return: + type: string +methods: + - name: clear() + uid: 'word!Word.Range#clear:member(1)' + package: word! + fullName: clear() + summary: Clears the contents of the range object. The user can perform the undo operation on the cleared content. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Queue a command to get the current selection and then + // create a proxy range object with the results. + const range = context.document.getSelection(); + + // Queue a command to clear the contents of the proxy range object. + range.clear(); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Cleared the selection (range object)'); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'clear(): void;' + return: + type: void + description: '' + - name: compareLocationWith(range) + uid: 'word!Word.Range#compareLocationWith:member(1)' + package: word! + fullName: compareLocationWith(range) + summary: Compares this range's location with another range's location. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/35-ranges/compare-location.yaml + + + // Compares the location of one paragraph in relation to another paragraph. + + await Word.run(async (context) => { + const paragraphs: Word.ParagraphCollection = context.document.body.paragraphs; + paragraphs.load("items"); + + await context.sync(); + + const firstParagraphAsRange: Word.Range = paragraphs.items[0].getRange(); + const secondParagraphAsRange: Word.Range = paragraphs.items[1].getRange(); + + const comparedLocation = firstParagraphAsRange.compareLocationWith(secondParagraphAsRange); + + await context.sync(); + + const locationValue: Word.LocationRelation = comparedLocation.value; + console.log(`Location of the first paragraph in relation to the second paragraph: ${locationValue}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'compareLocationWith(range: Word.Range): OfficeExtension.ClientResult;' + parameters: + - id: range + description: Required. The range to compare with this range. + type: '' + return: + type: '<>' + description: '' + - name: delete() + uid: 'word!Word.Range#delete:member(1)' + package: word! + fullName: delete() + summary: Deletes the range and its content from the document. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Queue a command to get the current selection and then + // create a proxy range object with the results. + const range = context.document.getSelection(); + + // Queue a command to delete the range object. + range.delete(); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Deleted the selection (range object)'); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'delete(): void;' + return: + type: void + description: '' + - name: expandTo(range) + uid: 'word!Word.Range#expandTo:member(1)' + package: word! + fullName: expandTo(range) + summary: >- + Returns a new range that extends from this range in either direction to cover another range. This range isn't + changed. Throws an `ItemNotFound` error if the two ranges do not have a union. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/get-paragraph-on-insertion-point.yaml + + + await Word.run(async (context) => { + // Get the complete sentence (as range) associated with the insertion point. + const sentences: Word.RangeCollection = context.document + .getSelection() + .getTextRanges(["."] /* Using the "." as delimiter */, false /*means without trimming spaces*/); + sentences.load("$none"); + await context.sync(); + + // Expand the range to the end of the paragraph to get all the complete sentences. + const sentencesToTheEndOfParagraph: Word.RangeCollection = sentences.items[0] + .getRange() + .expandTo( + context.document + .getSelection() + .paragraphs.getFirst() + .getRange(Word.RangeLocation.end) + ) + .getTextRanges(["."], false /* Don't trim spaces*/); + sentencesToTheEndOfParagraph.load("text"); + await context.sync(); + + for (let i = 0; i < sentencesToTheEndOfParagraph.items.length; i++) { + console.log(sentencesToTheEndOfParagraph.items[i].text); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'expandTo(range: Word.Range): Word.Range;' + parameters: + - id: range + description: Required. Another range. + type: '' + return: + type: '' + description: '' + - name: expandToOrNullObject(range) + uid: 'word!Word.Range#expandToOrNullObject:member(1)' + package: word! + fullName: expandToOrNullObject(range) + summary: >- + Returns a new range that extends from this range in either direction to cover another range. This range isn't + changed. If the two ranges don't have a union, then this method will return an object with its `isNullObject` + property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'expandToOrNullObject(range: Word.Range): Word.Range;' + parameters: + - id: range + description: Required. Another range. + type: '' + return: + type: '' + description: '' + - name: 'getBookmarks(includeHidden, includeAdjacent)' + uid: 'word!Word.Range#getBookmarks:member(1)' + package: word! + fullName: 'getBookmarks(includeHidden, includeAdjacent)' + summary: >- + Gets the names all bookmarks in or overlapping the range. A bookmark is hidden if its name starts with the + underscore character. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getBookmarks(includeHidden?: boolean, includeAdjacent?: boolean): OfficeExtension.ClientResult;' + parameters: + - id: includeHidden + description: >- + Optional. Indicates whether to include hidden bookmarks. Default is false which indicates that the hidden + bookmarks are excluded. + type: boolean + - id: includeAdjacent + description: >- + Optional. Indicates whether to include bookmarks that are adjacent to the range. Default is false which + indicates that the adjacent bookmarks are excluded. + type: boolean + return: + type: '<string[]>' + description: '' + - name: getComments() + uid: 'word!Word.Range#getComments:member(1)' + package: word! + fullName: getComments() + summary: Gets comments associated with the range. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-comments.yaml + + + // Gets the comments in the selected content. + + await Word.run(async (context) => { + const comments: Word.CommentCollection = context.document.getSelection().getComments(); + + // Load objects to log in the console. + comments.load(); + await context.sync(); + + console.log("Comments:", comments); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getComments(): Word.CommentCollection;' + return: + type: '' + description: '' + - name: getContentControls(options) + uid: 'word!Word.Range#getContentControls:member(1)' + package: word! + fullName: getContentControls(options) + summary: Gets the currently supported content controls in the range. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + **Important**: If specific types are provided in the options parameter, only content controls of supported + types are returned. Be aware that an exception will be thrown on using methods of a generic + [Word.ContentControl](xref:word!Word.ContentControl:class) that aren't relevant for the specific type. With time, + additional types of content controls may be supported. Therefore, your add-in should request and handle specific + types of content controls. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-checkbox-content-control.yaml + + + // Deletes the first checkbox content control found in the selection. + + await Word.run(async (context) => { + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.checkBox] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id"); + + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.checkBox) { + console.warn("No checkbox content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + console.log(`About to delete checkbox content control with id: ${selectedContentControl.id}`); + selectedContentControl.delete(false); + await context.sync(); + + console.log("Deleted checkbox content control."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection;' + parameters: + - id: options + description: Optional. Options that define which content controls are returned. + type: '' + return: + type: '' + description: '' + - name: getHtml() + uid: 'word!Word.Range#getHtml:member(1)' + package: word! + fullName: getHtml() + summary: >- + Gets an HTML representation of the range object. When rendered in a web page or HTML viewer, the formatting will + be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same + HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact + fidelity, or consistency across platforms, use `Range.getOoxml()` and convert the returned XML to HTML. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Queue a command to get the current selection and then + // create a proxy range object with the results. + const range = context.document.getSelection(); + + // Queue a command to get the HTML of the current selection. + const html = range.getHtml(); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('The HTML read from the document was: ' + html.value); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getHtml(): OfficeExtension.ClientResult;' + return: + type: '<string>' + description: '' + - name: getHyperlinkRanges() + uid: 'word!Word.Range#getHyperlinkRanges:member(1)' + package: word! + fullName: getHyperlinkRanges() + summary: Gets hyperlink child ranges within the range. + remarks: |- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + await Word.run(async (context) => { + // Get the entire document body. + const bodyRange = context.document.body.getRange(Word.RangeLocation.whole); + + // Get all the ranges that only consist of hyperlinks. + const hyperLinks = bodyRange.getHyperlinkRanges(); + hyperLinks.load("hyperlink"); + await context.sync(); + + // Log each hyperlink. + hyperLinks.items.forEach((linkRange) => { + console.log(linkRange.hyperlink); + }); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getHyperlinkRanges(): Word.RangeCollection;' + return: + type: '' + description: '' + - name: 'getNextTextRange(endingMarks, trimSpacing)' + uid: 'word!Word.Range#getNextTextRange:member(1)' + package: word! + fullName: 'getNextTextRange(endingMarks, trimSpacing)' + summary: >- + Gets the next text range by using punctuation marks and/or other ending marks. Throws an `ItemNotFound` error if + this text range is the last one. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getNextTextRange(endingMarks: string[], trimSpacing?: boolean): Word.Range;' + parameters: + - id: endingMarks + description: Required. The punctuation marks and/or other ending marks as an array of strings. + type: 'string[]' + - id: trimSpacing + description: >- + Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end + marks) from the start and end of the returned range. Default is false which indicates that spacing + characters at the start and end of the range are included. + type: boolean + return: + type: '' + description: '' + - name: 'getNextTextRangeOrNullObject(endingMarks, trimSpacing)' + uid: 'word!Word.Range#getNextTextRangeOrNullObject:member(1)' + package: word! + fullName: 'getNextTextRangeOrNullObject(endingMarks, trimSpacing)' + summary: >- + Gets the next text range by using punctuation marks and/or other ending marks. If this text range is the last one, + then this method will return an object with its `isNullObject` property set to `true`. For further + information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getNextTextRangeOrNullObject(endingMarks: string[], trimSpacing?: boolean): Word.Range;' + parameters: + - id: endingMarks + description: Required. The punctuation marks and/or other ending marks as an array of strings. + type: 'string[]' + - id: trimSpacing + description: >- + Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end + marks) from the start and end of the returned range. Default is false which indicates that spacing + characters at the start and end of the range are included. + type: boolean + return: + type: '' + description: '' + - name: getOoxml() + uid: 'word!Word.Range#getOoxml:member(1)' + package: word! + fullName: getOoxml() + summary: Gets the OOXML representation of the range object. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Queue a command to get the current selection and then + // create a proxy range object with the results. + const range = context.document.getSelection(); + + // Queue a command to get the OOXML of the current selection. + const ooxml = range.getOoxml(); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('The OOXML read from the document was: ' + ooxml.value); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getOoxml(): OfficeExtension.ClientResult;' + return: + type: '<string>' + description: '' + - name: getRange(rangeLocation) + uid: 'word!Word.Range#getRange:member(1)' + package: word! + fullName: getRange(rangeLocation) + summary: 'Clones the range, or gets the starting or ending point of the range as a new range.' + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml + + + // Places a dropdown list content control at the end of the selection. + + await Word.run(async (context) => { + let selection = context.document.getSelection(); + selection.getRange(Word.RangeLocation.end).insertContentControl(Word.ContentControlType.dropDownList); + await context.sync(); + + console.log("Dropdown list content control inserted at the end of the selection."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | + Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): + Word.Range; + parameters: + - id: rangeLocation + description: 'Optional. The range location must be ''Whole'', ''Start'', ''End'', ''After'', or ''Content''.' + type: >- + | | + | | + | "Whole" | "Start" | "End" | "After" | "Content" + return: + type: '' + description: '' + - name: getReviewedText(changeTrackingVersion) + uid: 'word!Word.Range#getReviewedText:member(1)' + package: word! + fullName: getReviewedText(changeTrackingVersion) + summary: Gets reviewed text based on ChangeTrackingVersion selection. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-change-tracking.yaml + + + // Gets the reviewed text. + + await Word.run(async (context) => { + const range: Word.Range = context.document.getSelection(); + const before = range.getReviewedText(Word.ChangeTrackingVersion.original); + const after = range.getReviewedText(Word.ChangeTrackingVersion.current); + + await context.sync(); + + console.log("Reviewed text (before):", before.value, "Reviewed text (after):", after.value); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult;' + parameters: + - id: changeTrackingVersion + description: Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + type: '' + return: + type: '<string>' + description: '' + - name: getReviewedText(changeTrackingVersionString) + uid: 'word!Word.Range#getReviewedText:member(2)' + package: word! + fullName: getReviewedText(changeTrackingVersionString) + summary: Gets reviewed text based on ChangeTrackingVersion selection. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getReviewedText(changeTrackingVersionString?: "Original" | "Current"): OfficeExtension.ClientResult;' + parameters: + - id: changeTrackingVersionString + description: Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + type: '"Original" | "Current"' + return: + type: '<string>' + description: '' + - name: 'getTextRanges(endingMarks, trimSpacing)' + uid: 'word!Word.Range#getTextRanges:member(1)' + package: word! + fullName: 'getTextRanges(endingMarks, trimSpacing)' + summary: Gets the text child ranges in the range by using punctuation marks and/or other ending marks. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/get-paragraph-on-insertion-point.yaml + + + await Word.run(async (context) => { + // Get the complete sentence (as range) associated with the insertion point. + const sentences: Word.RangeCollection = context.document + .getSelection() + .getTextRanges(["."] /* Using the "." as delimiter */, false /*means without trimming spaces*/); + sentences.load("$none"); + await context.sync(); + + // Expand the range to the end of the paragraph to get all the complete sentences. + const sentencesToTheEndOfParagraph: Word.RangeCollection = sentences.items[0] + .getRange() + .expandTo( + context.document + .getSelection() + .paragraphs.getFirst() + .getRange(Word.RangeLocation.end) + ) + .getTextRanges(["."], false /* Don't trim spaces*/); + sentencesToTheEndOfParagraph.load("text"); + await context.sync(); + + for (let i = 0; i < sentencesToTheEndOfParagraph.items.length; i++) { + console.log(sentencesToTheEndOfParagraph.items[i].text); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection;' + parameters: + - id: endingMarks + description: Required. The punctuation marks and/or other ending marks as an array of strings. + type: 'string[]' + - id: trimSpacing + description: >- + Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end + marks) from the start and end of the ranges returned in the range collection. Default is false which + indicates that spacing characters at the start and end of the ranges are included in the range collection. + type: boolean + return: + type: '' + description: '' + - name: getTrackedChanges() + uid: 'word!Word.Range#getTrackedChanges:member(1)' + package: word! + fullName: getTrackedChanges() + summary: Gets the collection of the TrackedChange objects in the range. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getTrackedChanges(): Word.TrackedChangeCollection;' + return: + type: '' + description: '' + - name: highlight() + uid: 'word!Word.Range#highlight:member(1)' + package: word! + fullName: highlight() + summary: >- + Highlights the range temporarily without changing document content. To highlight the text permanently, set the + range's Font.HighlightColor. + remarks: '\[ [API set: WordApi 1.8](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'highlight(): void;' + return: + type: void + description: '' + - name: insertBookmark(name) + uid: 'word!Word.Range#insertBookmark:member(1)' + package: word! + fullName: insertBookmark(name) + summary: 'Inserts a bookmark on the range. If a bookmark of the same name exists somewhere, it is deleted first.' + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Note: The conditions of inserting a bookmark are similar to doing so in the Word UI. To learn more about managing + bookmarks in the Word UI, see [Add or delete bookmarks in a Word document or Outlook + message](https://support.microsoft.com/office/f68d781f-0150-4583-a90e-a4009d99c2a0). + isPreview: false + isDeprecated: false + syntax: + content: 'insertBookmark(name: string): void;' + parameters: + - id: name + description: >- + Required. The case-insensitive bookmark name. Only alphanumeric and underscore characters are supported. It + must begin with a letter but if you want to tag the bookmark as hidden, then start the name with an + underscore character. Names can't be longer than 40 characters. + type: string + return: + type: void + description: '' + - name: 'insertBreak(breakType, insertLocation)' + uid: 'word!Word.Range#insertBreak:member(1)' + package: word! + fullName: 'insertBreak(breakType, insertLocation)' + summary: Inserts a break at the specified location in the main document. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Queue a command to get the current selection and then + // create a proxy range object with the results. + const range = context.document.getSelection(); + + // Queue a command to insert a page break after the selected text. + range.insertBreak(Word.BreakType.page, Word.InsertLocation.after); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Inserted a page break after the selected text.'); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | + "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | + "After"): void; + parameters: + - id: breakType + description: Required. The break type to add. + type: >- + | "Page" | "Next" | "SectionNext" | "SectionContinuous" | + "SectionEven" | "SectionOdd" | "Line" + - id: insertLocation + description: Required. The value must be 'Before' or 'After'. + type: >- + | + | "Before" | "After" + return: + type: void + description: '' + - name: insertComment(commentText) + uid: 'word!Word.Range#insertComment:member(1)' + package: word! + fullName: insertComment(commentText) + summary: Insert a comment on the range. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-comments.yaml + + + // Sets a comment on the selected content. + + await Word.run(async (context) => { + const text = $("#comment-text") + .val() + .toString(); + const comment: Word.Comment = context.document.getSelection().insertComment(text); + + // Load object to log in the console. + comment.load(); + await context.sync(); + + console.log("Comment inserted:", comment); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'insertComment(commentText: string): Word.Comment;' + parameters: + - id: commentText + description: Required. The comment text to be inserted. + type: string + return: + type: '' + description: comment object + - name: insertContentControl(contentControlType) + uid: 'word!Word.Range#insertContentControl:member(1)' + package: word! + fullName: insertContentControl(contentControlType) + summary: Wraps the Range object with a content control. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/90-scenarios/doc-assembly.yaml + + + // Simulates creation of a template. First searches the document for instances of the string "Contractor", + + // then changes the format of each search result, + + // then wraps each search result within a content control, + + // finally sets a tag and title property on each content control. + + await Word.run(async (context) => { + const results: Word.RangeCollection = context.document.body.search("Contractor"); + results.load("font/bold"); + + // Check to make sure these content controls haven't been added yet. + const customerContentControls: Word.ContentControlCollection = context.document.contentControls.getByTag("customer"); + customerContentControls.load("text"); + await context.sync(); + + if (customerContentControls.items.length === 0) { + for (let i = 0; i < results.items.length; i++) { + results.items[i].font.bold = true; + let cc: Word.ContentControl = results.items[i].insertContentControl(); + cc.tag = "customer"; // This value is used in the next step of this sample. + cc.title = "Customer Name " + i; + } + } + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; + parameters: + - id: contentControlType + description: >- + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. + type: >- + | | | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" + return: + type: '' + description: '' + - name: insertEndnote(insertText) + uid: 'word!Word.Range#insertEndnote:member(1)' + package: word! + fullName: insertEndnote(insertText) + summary: Inserts an endnote. The endnote reference is placed after the range. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'insertEndnote(insertText?: string): Word.NoteItem;' + parameters: + - id: insertText + description: Optional. Text to be inserted into the endnote body. The default is "". + type: string + return: + type: '' + description: '' + - name: 'insertField(insertLocation, fieldType, text, removeFormatting)' + uid: 'word!Word.Range#insertField:member(1)' + package: word! + fullName: 'insertField(insertLocation, fieldType, text, removeFormatting)' + summary: Inserts a field at the specified location. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Important: + + + In Word on Windows and on Mac, the API supports inserting and managing all types listed in + [Word.FieldType](xref:word!Word.FieldType:enum) except `Word.FieldType.others`. + + + In Word on the web, the API supports inserting and managing the following field types. + + + - `Word.FieldType.addin` + + + - `Word.FieldType.date` + + + - `Word.FieldType.hyperlink` + + + - `Word.FieldType.toc` + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-fields.yaml + + + // Inserts a Date field before selection. + + await Word.run(async (context) => { + const range: Word.Range = context.document.getSelection().getRange(); + + const field: Word.Field = range.insertField(Word.InsertLocation.before, Word.FieldType.date, '\\@ "M/d/yyyy h:mm am/pm"', true); + + field.load("result,code"); + await context.sync(); + + if (field.isNullObject) { + console.log("There are no fields in this document."); + } else { + console.log("Code of the field: " + field.code, "Result of the field: " + JSON.stringify(field.result)); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertField(insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After", fieldType?: + Word.FieldType, text?: string, removeFormatting?: boolean): Word.Field; + parameters: + - id: insertLocation + description: >- + Required. The location relative to the range where the field will be inserted. The value must be 'Replace', + 'Start', 'End', 'Before', or 'After'. + type: ' | "Replace" | "Start" | "End" | "Before" | "After"' + - id: fieldType + description: Optional. Can be any FieldType constant. The default value is Empty. + type: '' + - id: text + description: Optional. Additional properties or options if needed for specified field type. + type: string + - id: removeFormatting + description: >- + Optional. `true` to remove the formatting that's applied to the field during updates, `false` otherwise. The + default value is `false`. + type: boolean + return: + type: '' + description: '' + - name: 'insertField(insertLocation, fieldTypeString, text, removeFormatting)' + uid: 'word!Word.Range#insertField:member(2)' + package: word! + fullName: 'insertField(insertLocation, fieldTypeString, text, removeFormatting)' + summary: Inserts a field at the specified location. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Important: + + + In Word on Windows and on Mac, the API supports inserting and managing all types listed in + [Word.FieldType](xref:word!Word.FieldType:enum) except `Word.FieldType.others`. + + + In Word on the web, the API supports inserting and managing the following field types. + + + - `Word.FieldType.addin` + + + - `Word.FieldType.date` + + + - `Word.FieldType.hyperlink` + + + - `Word.FieldType.toc` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertField(insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After", + fieldTypeString?: "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | + "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | + "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | + "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" + | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | + "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | + "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" + | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | + "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | + "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | + "Empty" | "Others" | "Undefined", text?: string, removeFormatting?: boolean): Word.Field; + parameters: + - id: insertLocation + description: >- + Required. The location relative to the range where the field will be inserted. The value must be 'Replace', + 'Start', 'End', 'Before', or 'After'. + type: ' | "Replace" | "Start" | "End" | "Before" | "After"' + - id: fieldTypeString + description: Optional. Can be any FieldType constant. The default value is Empty. + type: >- + "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | + "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | + "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | + "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | + "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | + "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | + "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | + "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | + "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | + "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | + "UserName" | "XE" | "Empty" | "Others" | "Undefined" + - id: text + description: Optional. Additional properties or options if needed for specified field type. + type: string + - id: removeFormatting + description: >- + Optional. `true` to remove the formatting that's applied to the field during updates, `false` otherwise. The + default value is `false`. + type: boolean + return: + type: '' + description: '' + - name: 'insertFileFromBase64(base64File, insertLocation)' + uid: 'word!Word.Range#insertFileFromBase64:member(1)' + package: word! + fullName: 'insertFileFromBase64(base64File, insertLocation)' + summary: Inserts a document at the specified location. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form + field). Consider replacing such a form field with a content control or other option appropriate for your scenario. + + + #### Examples + + + ```TypeScript + + // Run a batch operation against the Word object model. + + await Word.run(async (context) => { + + // Queue a command to get the current selection and then + // create a proxy range object with the results. + const range = context.document.getSelection(); + + // Queue a command to insert base64 encoded .docx at the beginning of the range. + // You'll need to implement getBase64() to make this work. + range.insertFileFromBase64(getBase64(), Word.InsertLocation.start); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Added base64 encoded text to the beginning of the range.'); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | + "Before" | "After"): Word.Range; + parameters: + - id: base64File + description: Required. The Base64-encoded content of a .docx file. + type: string + - id: insertLocation + description: 'Required. The value must be ''Replace'', ''Start'', ''End'', ''Before'', or ''After''.' + type: ' | "Replace" | "Start" | "End" | "Before" | "After"' + return: + type: '' + description: '' + - name: insertFootnote(insertText) + uid: 'word!Word.Range#insertFootnote:member(1)' + package: word! + fullName: insertFootnote(insertText) + summary: Inserts a footnote. The footnote reference is placed after the range. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-footnotes.yaml + + + // Sets a footnote on the selected content. + + await Word.run(async (context) => { + const text = $("#input-footnote") + .val() + .toString(); + const footnote: Word.NoteItem = context.document.getSelection().insertFootnote(text); + await context.sync(); + + console.log("Inserted footnote."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'insertFootnote(insertText?: string): Word.NoteItem;' + parameters: + - id: insertText + description: Optional. Text to be inserted into the footnote body. The default is "". + type: string + return: + type: '' + description: '' + - name: 'insertHtml(html, insertLocation)' + uid: 'word!Word.Range#insertHtml:member(1)' + package: word! + fullName: 'insertHtml(html, insertLocation)' + summary: Inserts HTML at the specified location. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Queue a command to get the current selection and then + // create a proxy range object with the results. + const range = context.document.getSelection(); + + // Queue a command to insert HTML in to the beginning of the range. + range.insertHtml('This is text inserted with range.insertHtml()', Word.InsertLocation.start); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('HTML added to the beginning of the range.'); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertHtml(html: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | + "After"): Word.Range; + parameters: + - id: html + description: Required. The HTML to be inserted. + type: string + - id: insertLocation + description: 'Required. The value must be ''Replace'', ''Start'', ''End'', ''Before'', or ''After''.' + type: ' | "Replace" | "Start" | "End" | "Before" | "After"' + return: + type: '' + description: '' + - name: 'insertInlinePictureFromBase64(base64EncodedImage, insertLocation)' + uid: 'word!Word.Range#insertInlinePictureFromBase64:member(1)' + package: word! + fullName: 'insertInlinePictureFromBase64(base64EncodedImage, insertLocation)' + summary: Inserts a picture at the specified location. + remarks: '\[ [API set: WordApi 1.2](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation | "Replace" | + "Start" | "End" | "Before" | "After"): Word.InlinePicture; + parameters: + - id: base64EncodedImage + description: Required. The Base64-encoded image to be inserted. + type: string + - id: insertLocation + description: 'Required. The value must be ''Replace'', ''Start'', ''End'', ''Before'', or ''After''.' + type: ' | "Replace" | "Start" | "End" | "Before" | "After"' + return: + type: '' + description: '' + - name: 'insertOoxml(ooxml, insertLocation)' + uid: 'word!Word.Range#insertOoxml:member(1)' + package: word! + fullName: 'insertOoxml(ooxml, insertLocation)' + summary: Inserts OOXML at the specified location. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Queue a command to get the current selection and then + // create a proxy range object with the results. + const range = context.document.getSelection(); + + // Queue a command to insert OOXML in to the beginning of the range. + range.insertOoxml("This text has formatting directly applied to achieve its font size, color, line spacing, and paragraph spacing.", Word.InsertLocation.start); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('OOXML added to the beginning of the range.'); + }); + + // Read "Create better add-ins for Word with Office Open XML" for guidance on working with OOXML. + // https://learn.microsoft.com/office/dev/add-ins/word/create-better-add-ins-for-word-with-office-open-xml + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | + "After"): Word.Range; + parameters: + - id: ooxml + description: Required. The OOXML to be inserted. + type: string + - id: insertLocation + description: 'Required. The value must be ''Replace'', ''Start'', ''End'', ''Before'', or ''After''.' + type: ' | "Replace" | "Start" | "End" | "Before" | "After"' + return: + type: '' + description: '' + - name: 'insertParagraph(paragraphText, insertLocation)' + uid: 'word!Word.Range#insertParagraph:member(1)' + package: word! + fullName: 'insertParagraph(paragraphText, insertLocation)' + summary: Inserts a paragraph at the specified location. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Queue a command to get the current selection and then + // create a proxy range object with the results. + const range = context.document.getSelection(); + + // Queue a command to insert the paragraph after the range. + range.insertParagraph('Content of a new paragraph', Word.InsertLocation.after); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Paragraph added to the end of the range.'); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | + "Before" | "After"): Word.Paragraph; + parameters: + - id: paragraphText + description: Required. The paragraph text to be inserted. + type: string + - id: insertLocation + description: Required. The value must be 'Before' or 'After'. + type: >- + | + | "Before" | "After" + return: + type: '' + description: '' + - name: 'insertTable(rowCount, columnCount, insertLocation, values)' + uid: 'word!Word.Range#insertTable:member(1)' + package: word! + fullName: 'insertTable(rowCount, columnCount, insertLocation, values)' + summary: Inserts a table with the specified number of rows and columns. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before | + Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; + parameters: + - id: rowCount + description: Required. The number of rows in the table. + type: number + - id: columnCount + description: Required. The number of columns in the table. + type: number + - id: insertLocation + description: Required. The value must be 'Before' or 'After'. + type: >- + | + | "Before" | "After" + - id: values + description: Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + type: 'string[][]' + return: + type: '' + description: '' + - name: 'insertText(text, insertLocation)' + uid: 'word!Word.Range#insertText:member(1)' + package: word! + fullName: 'insertText(text, insertLocation)' + summary: Inserts text at the specified location. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Queue a command to get the current selection and then + // create a proxy range object with the results. + const range = context.document.getSelection(); + + // Queue a command to insert the paragraph at the end of the range. + range.insertText('New text inserted into the range.', Word.InsertLocation.end); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Text added to the end of the range.'); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + insertText(text: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | + "After"): Word.Range; + parameters: + - id: text + description: Required. Text to be inserted. + type: string + - id: insertLocation + description: 'Required. The value must be ''Replace'', ''Start'', ''End'', ''Before'', or ''After''.' + type: ' | "Replace" | "Start" | "End" | "Before" | "After"' + return: + type: '' + description: '' + - name: intersectWith(range) + uid: 'word!Word.Range#intersectWith:member(1)' + package: word! + fullName: intersectWith(range) + summary: >- + Returns a new range as the intersection of this range with another range. This range isn't changed. Throws an + `ItemNotFound` error if the two ranges aren't overlapped or adjacent. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'intersectWith(range: Word.Range): Word.Range;' + parameters: + - id: range + description: Required. Another range. + type: '' + return: + type: '' + description: '' + - name: intersectWithOrNullObject(range) + uid: 'word!Word.Range#intersectWithOrNullObject:member(1)' + package: word! + fullName: intersectWithOrNullObject(range) + summary: >- + Returns a new range as the intersection of this range with another range. This range isn't changed. If the two + ranges aren't overlapped or adjacent, then this method will return an object with its `isNullObject` property set + to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'intersectWithOrNullObject(range: Word.Range): Word.Range;' + parameters: + - id: range + description: Required. Another range. + type: '' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.Range#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.RangeLoadOptions): Word.Range;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.Range#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.Range;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.Range#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Range; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: removeHighlight() + uid: 'word!Word.Range#removeHighlight:member(1)' + package: word! + fullName: removeHighlight() + summary: Removes the highlight added by the Highlight function if any. + remarks: '\[ [API set: WordApi 1.8](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'removeHighlight(): void;' + return: + type: void + description: '' + - name: 'search(searchText, searchOptions)' + uid: 'word!Word.Range#search:member(1)' + package: word! + fullName: 'search(searchText, searchOptions)' + summary: >- + Performs a search with the specified SearchOptions on the scope of the range object. The search results are a + collection of range objects. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: |- + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + parameters: + - id: searchText + description: Required. The search text. + type: string + - id: searchOptions + description: Optional. Options for the search. + type: |- + | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + } + return: + type: '' + description: '' + - name: select(selectionMode) + uid: 'word!Word.Range#select:member(1)' + package: word! + fullName: select(selectionMode) + summary: Selects and navigates the Word UI to the range. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Queue a command to get the current selection and then + // create a proxy range object with the results. + const range = context.document.getSelection(); + + // Queue a command to insert HTML in to the beginning of the range. + range.insertHtml('This is text inserted with range.insertHtml()', Word.InsertLocation.start); + + // Queue a command to select the HTML that was inserted. + range.select(); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Selected the range.'); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'select(selectionMode?: Word.SelectionMode): void;' + parameters: + - id: selectionMode + description: 'Optional. The selection mode must be ''Select'', ''Start'', or ''End''. ''Select'' is the default.' + type: '' + return: + type: void + description: '' + - name: select(selectionModeString) + uid: 'word!Word.Range#select:member(2)' + package: word! + fullName: select(selectionModeString) + summary: Selects and navigates the Word UI to the range. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'select(selectionModeString?: "Select" | "Start" | "End"): void;' + parameters: + - id: selectionModeString + description: 'Optional. The selection mode must be ''Select'', ''Start'', or ''End''. ''Select'' is the default.' + type: '"Select" | "Start" | "End"' + return: + type: void + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.Range#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.RangeUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.Range#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.Range): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: 'split(delimiters, multiParagraphs, trimDelimiters, trimSpacing)' + uid: 'word!Word.Range#split:member(1)' + package: word! + fullName: 'split(delimiters, multiParagraphs, trimDelimiters, trimSpacing)' + summary: Splits the range into child ranges by using delimiters. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + split(delimiters: string[], multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean): + Word.RangeCollection; + parameters: + - id: delimiters + description: Required. The delimiters as an array of strings. + type: 'string[]' + - id: multiParagraphs + description: >- + Optional. Indicates whether a returned child range can cover multiple paragraphs. Default is false which + indicates that the paragraph boundaries are also used as delimiters. + type: boolean + - id: trimDelimiters + description: >- + Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false + which indicates that the delimiters are included in the ranges returned in the range collection. + type: boolean + - id: trimSpacing + description: >- + Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end + marks) from the start and end of the ranges returned in the range collection. Default is false which + indicates that spacing characters at the start and end of the ranges are included in the range collection. + type: boolean + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.Range#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.Range` object is an API object, the `toJSON` method returns a plain + JavaScript object (typed as `Word.Interfaces.RangeData`) that contains shallow copies of any loaded child + properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.RangeData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.Range#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.Range;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.Range#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.Range;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.rangecollection.yml b/docs/docs-ref-autogen/word_1_9/word/word.rangecollection.yml new file mode 100644 index 0000000000..9101a94b10 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.rangecollection.yml @@ -0,0 +1,216 @@ +### YamlMime:TSType +name: Word.RangeCollection +uid: 'word!Word.RangeCollection:class' +package: word! +fullName: Word.RangeCollection +summary: 'Contains a collection of [Word.Range](xref:word!Word.Range:class) objects.' +remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/search.yaml + + + // Does a basic text search and highlights matches in the document. + + await Word.run(async (context) => { + const results : Word.RangeCollection = context.document.body.search("extend"); + results.load("length"); + + await context.sync(); + + // Let's traverse the search results and highlight matches. + for (let i = 0; i < results.items.length; i++) { + results.items[i].font.highlightColor = "yellow"; + } + + await context.sync(); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.RangeCollection#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: items + uid: 'word!Word.RangeCollection#items:member' + package: word! + fullName: items + summary: Gets the loaded child items in this collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly items: Word.Range[];' + return: + type: '[]' +methods: + - name: getFirst() + uid: 'word!Word.RangeCollection#getFirst:member(1)' + package: word! + fullName: getFirst() + summary: Gets the first range in this collection. Throws an `ItemNotFound` error if this collection is empty. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFirst(): Word.Range;' + return: + type: '' + description: '' + - name: getFirstOrNullObject() + uid: 'word!Word.RangeCollection#getFirstOrNullObject:member(1)' + package: word! + fullName: getFirstOrNullObject() + summary: >- + Gets the first range in this collection. If this collection is empty, then this method will return an object with + its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFirstOrNullObject(): Word.Range;' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.RangeCollection#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: >- + load(options?: Word.Interfaces.RangeCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): + Word.RangeCollection; + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: >- + & + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.RangeCollection#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.RangeCollection;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.RangeCollection#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.RangeCollection;' + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: '' + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.RangeCollection#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.RangeCollection` object is an API object, the `toJSON` method returns a + plain JavaScript object (typed as `Word.Interfaces.RangeCollectionData`) that contains an "items" array + with shallow copies of any loaded properties from the collection's items. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.RangeCollectionData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.RangeCollection#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.RangeCollection;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.RangeCollection#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.RangeCollection;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.rangelocation.yml b/docs/docs-ref-autogen/word_1_9/word/word.rangelocation.yml new file mode 100644 index 0000000000..888e225e60 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.rangelocation.yml @@ -0,0 +1,103 @@ +### YamlMime:TSEnum +name: Word.RangeLocation +uid: 'word!Word.RangeLocation:enum' +package: word! +fullName: Word.RangeLocation +summary: '' +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/get-paragraph-on-insertion-point.yaml + + + await Word.run(async (context) => { + // Get the complete sentence (as range) associated with the insertion point. + const sentences: Word.RangeCollection = context.document + .getSelection() + .getTextRanges(["."] /* Using the "." as delimiter */, false /*means without trimming spaces*/); + sentences.load("$none"); + await context.sync(); + + // Expand the range to the end of the paragraph to get all the complete sentences. + const sentencesToTheEndOfParagraph: Word.RangeCollection = sentences.items[0] + .getRange() + .expandTo( + context.document + .getSelection() + .paragraphs.getFirst() + .getRange(Word.RangeLocation.end) + ) + .getTextRanges(["."], false /* Don't trim spaces*/); + sentencesToTheEndOfParagraph.load("text"); + await context.sync(); + + for (let i = 0; i < sentencesToTheEndOfParagraph.items.length; i++) { + console.log(sentencesToTheEndOfParagraph.items[i].text); + } + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: after + uid: 'word!Word.RangeLocation.after:member' + package: word! + summary: >- + The point after the object. If the object is a paragraph content control or table content control, it is the point + after the EOP or Table characters. + + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"After"' + - name: before + uid: 'word!Word.RangeLocation.before:member' + package: word! + summary: |- + For content control only. It is the point before the opening tag. + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Before"' + - name: content + uid: 'word!Word.RangeLocation.content:member' + package: word! + summary: |- + The range between 'Start' and 'End'. + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Content"' + - name: end + uid: 'word!Word.RangeLocation.end:member' + package: word! + summary: >- + The ending point of the object. For paragraph, it is the point before the EOP. For content control, it is the + point before the closing tag. + + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"End"' + - name: start + uid: 'word!Word.RangeLocation.start:member' + package: word! + summary: |- + The starting point of the object. For content control, it is the point after the opening tag. + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Start"' + - name: whole + uid: 'word!Word.RangeLocation.whole:member' + package: word! + summary: >- + The object's whole range. If the object is a paragraph content control or table content control, the EOP or Table + characters after the content control are also included. + + + * \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Whole"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.requestcontext.yml b/docs/docs-ref-autogen/word_1_9/word/word.requestcontext.yml new file mode 100644 index 0000000000..65f580c750 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.requestcontext.yml @@ -0,0 +1,66 @@ +### YamlMime:TSType +name: Word.RequestContext +uid: 'word!Word.RequestContext:class' +package: word! +fullName: Word.RequestContext +summary: >- + The RequestContext object facilitates requests to the Word application. Since the Office add-in and the Word + application run in two different processes, the request context is required to get access to the Word object model + from the add-in. +remarks: |- + + + #### Examples + + ```TypeScript + // *.run methods automatically create an OfficeExtension.ClientRequestContext + // object to work with the Office file. + await Word.run(async (context: Word.RequestContext) => { + const document = context.document; + // Interact with the Word document... + }); + ``` +isPreview: false +isDeprecated: false +type: class +constructors: + - name: (constructor)(url) + uid: 'word!Word.RequestContext:constructor(1)' + package: word! + fullName: (constructor)(url) + summary: Constructs a new instance of the `RequestContext` class + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'constructor(url?: string);' + parameters: + - id: url + description: '' + type: string +properties: + - name: application + uid: 'word!Word.RequestContext#application:member' + package: word! + fullName: application + summary: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] *' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly application: Application;' + return: + type: '' + - name: document + uid: 'word!Word.RequestContext#document:member' + package: word! + fullName: document + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly document: Document;' + return: + type: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.savebehavior.yml b/docs/docs-ref-autogen/word_1_9/word/word.savebehavior.yml new file mode 100644 index 0000000000..96f1b125e1 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.savebehavior.yml @@ -0,0 +1,52 @@ +### YamlMime:TSEnum +name: Word.SaveBehavior +uid: 'word!Word.SaveBehavior:enum' +package: word! +fullName: Word.SaveBehavior +summary: Specifies the save behavior for `Document.save`. +remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/save-close.yaml + + + // If the document hasn't been saved before, prompts + + // user with options for if or how they want to save. + + await Word.run(async (context) => { + context.document.save(Word.SaveBehavior.prompt); + await context.sync(); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: prompt + uid: 'word!Word.SaveBehavior.prompt:member' + package: word! + summary: >- + Displays the "Save As" dialog to the user if the document hasn't been saved. Won't take effect if the document was + previously saved. + + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Prompt"' + - name: save + uid: 'word!Word.SaveBehavior.save:member' + package: word! + summary: >- + Saves the document without prompting the user. If it's a new document, it will be saved with the default name or + specified name in the default location. + + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Save"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.searchoptions.yml b/docs/docs-ref-autogen/word_1_9/word/word.searchoptions.yml new file mode 100644 index 0000000000..3610675374 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.searchoptions.yml @@ -0,0 +1,420 @@ +### YamlMime:TSType +name: Word.SearchOptions +uid: 'word!Word.SearchOptions:class' +package: word! +fullName: Word.SearchOptions +summary: >- + Specifies the options to be included in a search operation. To learn more about how to use search options in the Word + JavaScript APIs, read [Use search options to find text in your Word + add-in](https://learn.microsoft.com/office/dev/add-ins/word/search-option-guidance). +remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Search using a wildcard + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Queue a command to search the document with a wildcard + // for any string of characters that starts with 'to' and ends with 'n'. + const searchResults = context.document.body.search('to*n', {matchWildcards: true}); + + // Queue a command to load the search results and get the font property values. + searchResults.load('font'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Found count: ' + searchResults.items.length); + + // Queue a set of commands to change the font for each found item. + for (let i = 0; i < searchResults.items.length; i++) { + searchResults.items[i].font.color = 'purple'; + searchResults.items[i].font.highlightColor = 'pink'; + searchResults.items[i].font.bold = true; + } + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + }); + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.SearchOptions#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: ignorePunct + uid: 'word!Word.SearchOptions#ignorePunct:member' + package: word! + fullName: ignorePunct + summary: >- + Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the + Ignore punctuation check box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'ignorePunct: boolean;' + return: + type: boolean + - name: ignoreSpace + uid: 'word!Word.SearchOptions#ignoreSpace:member' + package: word! + fullName: ignoreSpace + summary: >- + Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore + whitespace characters check box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'ignoreSpace: boolean;' + return: + type: boolean + - name: matchCase + uid: 'word!Word.SearchOptions#matchCase:member' + package: word! + fullName: matchCase + summary: >- + Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check + box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'matchCase: boolean;' + return: + type: boolean + - name: matchPrefix + uid: 'word!Word.SearchOptions#matchPrefix:member' + package: word! + fullName: matchPrefix + summary: >- + Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the + Match prefix check box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'matchPrefix: boolean;' + return: + type: boolean + - name: matchSuffix + uid: 'word!Word.SearchOptions#matchSuffix:member' + package: word! + fullName: matchSuffix + summary: >- + Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match + suffix check box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'matchSuffix: boolean;' + return: + type: boolean + - name: matchWholeWord + uid: 'word!Word.SearchOptions#matchWholeWord:member' + package: word! + fullName: matchWholeWord + summary: >- + Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger + word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'matchWholeWord: boolean;' + return: + type: boolean + - name: matchWildcards + uid: 'word!Word.SearchOptions#matchWildcards:member' + package: word! + fullName: matchWildcards + summary: >- + Specifies a value that indicates whether the search will be performed using special search operators. Corresponds + to the Use wildcards check box in the Find and Replace dialog box. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'matchWildcards: boolean;' + return: + type: boolean +methods: + - name: load(options) + uid: 'word!Word.SearchOptions#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.SearchOptionsLoadOptions): Word.SearchOptions;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: |- + + + #### Examples + + ```TypeScript + // Ignore punctuation search + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Queue a command to search the document and ignore punctuation. + const searchResults = context.document.body.search('video you', {ignorePunct: true}); + + // Queue a command to load the search results and get the font property values. + searchResults.load('font'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Found count: ' + searchResults.items.length); + + // Queue a set of commands to change the font for each found item. + for (let i = 0; i < searchResults.items.length; i++) { + searchResults.items[i].font.color = 'purple'; + searchResults.items[i].font.highlightColor = '#FFFF00'; //Yellow + searchResults.items[i].font.bold = true; + } + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + }); + ``` + ```TypeScript + // Search based on a prefix + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Queue a command to search the document based on a prefix. + const searchResults = context.document.body.search('vid', {matchPrefix: true}); + + // Queue a command to load the search results and get the font property values. + searchResults.load('font'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + + // Queue a set of commands to change the font for each found item. + for (let i = 0; i < searchResults.items.length; i++) { + searchResults.items[i].font.color = 'purple'; + searchResults.items[i].font.highlightColor = '#FFFF00'; //Yellow + searchResults.items[i].font.bold = true; + } + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + }); + ``` + ```TypeScript + // Search based on a suffix + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Queue a command to search the document for any string of characters after 'ly'. + const searchResults = context.document.body.search('ly', {matchSuffix: true}); + + // Queue a command to load the search results and get the font property values. + searchResults.load('font'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Found count: ' + searchResults.items.length); + + // Queue a set of commands to change the font for each found item. + for (let i = 0; i < searchResults.items.length; i++) { + searchResults.items[i].font.color = 'orange'; + searchResults.items[i].font.highlightColor = 'black'; + searchResults.items[i].font.bold = true; + } + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + }); + ``` + ```TypeScript + // Search using a wildcard + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Queue a command to search the document with a wildcard + // for any string of characters that starts with 'to' and ends with 'n'. + const searchResults = context.document.body.search('to*n', {matchWildcards: true}); + + // Queue a command to load the search results and get the font property values. + searchResults.load('font'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('Found count: ' + searchResults.items.length); + + // Queue a set of commands to change the font for each found item. + for (let i = 0; i < searchResults.items.length; i++) { + searchResults.items[i].font.color = 'purple'; + searchResults.items[i].font.highlightColor = 'pink'; + searchResults.items[i].font.bold = true; + } + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + }); + ``` + - name: load(propertyNames) + uid: 'word!Word.SearchOptions#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.SearchOptions;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.SearchOptions#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.SearchOptions; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: newObject(context) + uid: 'word!Word.SearchOptions.newObject:member(1)' + package: word! + fullName: newObject(context) + summary: Create a new instance of the `Word.SearchOptions` object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'static newObject(context: OfficeExtension.ClientRequestContext): Word.SearchOptions;' + parameters: + - id: context + description: '' + type: '' + return: + type: '' + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.SearchOptions#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.SearchOptionsUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.SearchOptions#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.SearchOptions): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.SearchOptions#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.SearchOptions` object is an API object, the `toJSON` method returns a + plain JavaScript object (typed as `Word.Interfaces.SearchOptionsData`) that contains shallow copies of any + loaded child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.SearchOptionsData;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.section.yml b/docs/docs-ref-autogen/word_1_9/word/word.section.yml new file mode 100644 index 0000000000..86193fb72a --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.section.yml @@ -0,0 +1,436 @@ +### YamlMime:TSType +name: Word.Section +uid: 'word!Word.Section:class' +package: word! +fullName: Word.Section +summary: Represents a section in a Word document. +remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/insert-section-breaks.yaml + + + // Inserts a section break on the next page. + + await Word.run(async (context) => { + const body: Word.Body = context.document.body; + body.insertBreak(Word.BreakType.sectionNext, Word.InsertLocation.end); + + await context.sync(); + + console.log("Inserted section break on next page."); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: body + uid: 'word!Word.Section#body:member' + package: word! + fullName: body + summary: Gets the body object of the section. This doesn't include the header/footer and other section metadata. + remarks: '\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly body: Word.Body;' + return: + type: '' + - name: context + uid: 'word!Word.Section#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' +methods: + - name: getFooter(type) + uid: 'word!Word.Section#getFooter:member(1)' + package: word! + fullName: getFooter(type) + summary: Gets one of the section's footers. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy sectionsCollection object. + const mySections = context.document.sections; + + // Queue a command to load the sections. + mySections.load('body/style'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + + // Create a proxy object the primary footer of the first section. + // Note that the footer is a body object. + const myFooter = mySections.items[0].getFooter(Word.HeaderFooterType.primary); + + // Queue a command to insert text at the end of the footer. + myFooter.insertText("This is a footer.", Word.InsertLocation.end); + + // Queue a command to wrap the header in a content control. + myFooter.insertContentControl(); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log("Added a footer to the first section."); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getFooter(type: Word.HeaderFooterType): Word.Body;' + parameters: + - id: type + description: 'Required. The type of footer to return. This value must be: ''Primary'', ''FirstPage'', or ''EvenPages''.' + type: '' + return: + type: '' + description: '' + - name: getFooter(typeString) + uid: 'word!Word.Section#getFooter:member(2)' + package: word! + fullName: getFooter(typeString) + summary: Gets one of the section's footers. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/insert-header-and-footer.yaml + + + await Word.run(async (context) => { + context.document.sections + .getFirst() + .getFooter("Primary") + .insertParagraph("This is a primary footer.", "End"); + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getFooter(typeString: "Primary" | "FirstPage" | "EvenPages"): Word.Body;' + parameters: + - id: typeString + description: 'Required. The type of footer to return. This value must be: ''Primary'', ''FirstPage'', or ''EvenPages''.' + type: '"Primary" | "FirstPage" | "EvenPages"' + return: + type: '' + description: '' + - name: getHeader(type) + uid: 'word!Word.Section#getHeader:member(1)' + package: word! + fullName: getHeader(type) + summary: Gets one of the section's headers. + remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/insert-header-and-footer.yaml + + + await Word.run(async (context) => { + context.document.sections + .getFirst() + .getHeader(Word.HeaderFooterType.primary) + .insertParagraph("This is a primary header.", "End"); + + await context.sync(); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getHeader(type: Word.HeaderFooterType): Word.Body;' + parameters: + - id: type + description: 'Required. The type of header to return. This value must be: ''Primary'', ''FirstPage'', or ''EvenPages''.' + type: '' + return: + type: '' + description: '' + - name: getHeader(typeString) + uid: 'word!Word.Section#getHeader:member(2)' + package: word! + fullName: getHeader(typeString) + summary: Gets one of the section's headers. + remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a proxy sectionsCollection object. + const mySections = context.document.sections; + + // Queue a command to load the sections. + mySections.load('body/style'); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + + // Create a proxy object the primary header of the first section. + // Note that the header is a body object. + const myHeader = mySections.items[0].getHeader("Primary"); + + // Queue a command to insert text at the end of the header. + myHeader.insertText("This is a header.", Word.InsertLocation.end); + + // Queue a command to wrap the header in a content control. + myHeader.insertContentControl(); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log("Added a header to the first section."); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getHeader(typeString: "Primary" | "FirstPage" | "EvenPages"): Word.Body;' + parameters: + - id: typeString + description: 'Required. The type of header to return. This value must be: ''Primary'', ''FirstPage'', or ''EvenPages''.' + type: '"Primary" | "FirstPage" | "EvenPages"' + return: + type: '' + description: '' + - name: getNext() + uid: 'word!Word.Section#getNext:member(1)' + package: word! + fullName: getNext() + summary: Gets the next section. Throws an `ItemNotFound` error if this section is the last one. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getNext(): Word.Section;' + return: + type: '' + description: '' + - name: getNextOrNullObject() + uid: 'word!Word.Section#getNextOrNullObject:member(1)' + package: word! + fullName: getNextOrNullObject() + summary: >- + Gets the next section. If this section is the last one, then this method will return an object with its + `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getNextOrNullObject(): Word.Section;' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.Section#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.SectionLoadOptions): Word.Section;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.Section#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.Section;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.Section#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Section; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.Section#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.SectionUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.Section#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.Section): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.Section#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.Section` object is an API object, the `toJSON` method returns a plain + JavaScript object (typed as `Word.Interfaces.SectionData`) that contains shallow copies of any loaded + child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.SectionData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.Section#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.Section;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.Section#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.Section;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.sectioncollection.yml b/docs/docs-ref-autogen/word_1_9/word/word.sectioncollection.yml new file mode 100644 index 0000000000..1a6871e4eb --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.sectioncollection.yml @@ -0,0 +1,211 @@ +### YamlMime:TSType +name: Word.SectionCollection +uid: 'word!Word.SectionCollection:class' +package: word! +fullName: Word.SectionCollection +summary: 'Contains the collection of the document''s [Word.Section](xref:word!Word.Section:class) objects.' +remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/insert-section-breaks.yaml + + + // Inserts a section break on the next even page. + + await Word.run(async (context) => { + const body: Word.Body = context.document.body; + body.insertBreak(Word.BreakType.sectionEven, Word.InsertLocation.end); + + await context.sync(); + + console.log("Inserted section break on next even page."); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.SectionCollection#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: items + uid: 'word!Word.SectionCollection#items:member' + package: word! + fullName: items + summary: Gets the loaded child items in this collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly items: Word.Section[];' + return: + type: '[]' +methods: + - name: getFirst() + uid: 'word!Word.SectionCollection#getFirst:member(1)' + package: word! + fullName: getFirst() + summary: Gets the first section in this collection. Throws an `ItemNotFound` error if this collection is empty. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFirst(): Word.Section;' + return: + type: '' + description: '' + - name: getFirstOrNullObject() + uid: 'word!Word.SectionCollection#getFirstOrNullObject:member(1)' + package: word! + fullName: getFirstOrNullObject() + summary: >- + Gets the first section in this collection. If this collection is empty, then this method will return an object + with its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFirstOrNullObject(): Word.Section;' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.SectionCollection#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: >- + load(options?: Word.Interfaces.SectionCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): + Word.SectionCollection; + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: >- + & + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.SectionCollection#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.SectionCollection;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.SectionCollection#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.SectionCollection;' + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: '' + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.SectionCollection#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.SectionCollection` object is an API object, the `toJSON` method returns + a plain JavaScript object (typed as `Word.Interfaces.SectionCollectionData`) that contains an "items" + array with shallow copies of any loaded properties from the collection's items. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.SectionCollectionData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.SectionCollection#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.SectionCollection;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.SectionCollection#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.SectionCollection;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.selectionmode.yml b/docs/docs-ref-autogen/word_1_9/word/word.selectionmode.yml new file mode 100644 index 0000000000..5d042ad6d5 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.selectionmode.yml @@ -0,0 +1,54 @@ +### YamlMime:TSEnum +name: Word.SelectionMode +uid: 'word!Word.SelectionMode:enum' +package: word! +fullName: Word.SelectionMode +summary: This enum sets where the cursor (insertion point) in the document is after a selection. +remarks: >- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/35-ranges/scroll-to-range.yaml + + + await Word.run(async (context) => { + // Select can be at the start or end of a range; this by definition moves the insertion point without selecting the range. + context.document.body.paragraphs.getLast().select(Word.SelectionMode.end); + + await context.sync(); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: end + uid: 'word!Word.SelectionMode.end:member' + package: word! + summary: |- + The cursor is at the end of the selection (just after the end of the selected range). + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"End"' + - name: select + uid: 'word!Word.SelectionMode.select:member' + package: word! + summary: |- + The entire range is selected. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Select"' + - name: start + uid: 'word!Word.SelectionMode.start:member' + package: word! + summary: |- + The cursor is at the beginning of the selection (just before the start of the selected range). + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Start"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.setting.yml b/docs/docs-ref-autogen/word_1_9/word/word.setting.yml new file mode 100644 index 0000000000..cbf54f36a5 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.setting.yml @@ -0,0 +1,376 @@ +### YamlMime:TSType +name: Word.Setting +uid: 'word!Word.Setting:class' +package: word! +fullName: Word.Setting +summary: Represents a setting of the add-in. +remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-settings.yaml + + + // Adds a new custom setting or + + // edits the value of an existing one. + + await Word.run(async (context) => { + const key = $("#key") + .val() + .toString(); + + if (key == "") { + console.error("Key shouldn't be empty."); + return; + } + + const value = $("#value") + .val() + .toString(); + + const settings: Word.SettingCollection = context.document.settings; + const setting: Word.Setting = settings.add(key, value); + setting.load(); + await context.sync(); + + console.log("Setting added or edited:", setting); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.Setting#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: key + uid: 'word!Word.Setting#key:member' + package: word! + fullName: key + summary: Gets the key of the setting. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-settings.yaml + + + // Adds a new custom setting or + + // edits the value of an existing one. + + await Word.run(async (context) => { + const key = $("#key") + .val() + .toString(); + + if (key == "") { + console.error("Key shouldn't be empty."); + return; + } + + const value = $("#value") + .val() + .toString(); + + const settings: Word.SettingCollection = context.document.settings; + const setting: Word.Setting = settings.add(key, value); + setting.load(); + await context.sync(); + + console.log("Setting added or edited:", setting); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly key: string;' + return: + type: string + - name: value + uid: 'word!Word.Setting#value:member' + package: word! + fullName: value + summary: Specifies the value of the setting. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-settings.yaml + + + // Adds a new custom setting or + + // edits the value of an existing one. + + await Word.run(async (context) => { + const key = $("#key") + .val() + .toString(); + + if (key == "") { + console.error("Key shouldn't be empty."); + return; + } + + const value = $("#value") + .val() + .toString(); + + const settings: Word.SettingCollection = context.document.settings; + const setting: Word.Setting = settings.add(key, value); + setting.load(); + await context.sync(); + + console.log("Setting added or edited:", setting); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'value: any;' + return: + type: any +methods: + - name: delete() + uid: 'word!Word.Setting#delete:member(1)' + package: word! + fullName: delete() + summary: Deletes the setting. + remarks: |- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Queue commands add a setting. + const settings = context.document.settings; + const startMonth = settings.add('startMonth', { month: 'March', year: 1998 }); + + // Queue a command to get the count of settings. + const count = settings.getCount(); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log(count.value); + + // Queue a command to delete the setting. + startMonth.delete(); + + // Queue a command to get the new count of settings. + count = settings.getCount(); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log(count.value); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'delete(): void;' + return: + type: void + description: '' + - name: load(options) + uid: 'word!Word.Setting#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.SettingLoadOptions): Word.Setting;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.Setting#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.Setting;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.Setting#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Setting; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.Setting#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.SettingUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.Setting#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.Setting): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.Setting#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.Setting` object is an API object, the `toJSON` method returns a plain + JavaScript object (typed as `Word.Interfaces.SettingData`) that contains shallow copies of any loaded + child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.SettingData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.Setting#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.Setting;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.Setting#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.Setting;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.settingcollection.yml b/docs/docs-ref-autogen/word_1_9/word/word.settingcollection.yml new file mode 100644 index 0000000000..44d9b94751 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.settingcollection.yml @@ -0,0 +1,460 @@ +### YamlMime:TSType +name: Word.SettingCollection +uid: 'word!Word.SettingCollection:class' +package: word! +fullName: Word.SettingCollection +summary: 'Contains the collection of [Word.Setting](xref:word!Word.Setting:class) objects.' +remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-settings.yaml + + + // Deletes all custom settings this add-in had set on this document. + + await Word.run(async (context) => { + const settings: Word.SettingCollection = context.document.settings; + settings.deleteAll(); + await context.sync(); + console.log("All settings deleted."); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.SettingCollection#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: items + uid: 'word!Word.SettingCollection#items:member' + package: word! + fullName: items + summary: Gets the loaded child items in this collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly items: Word.Setting[];' + return: + type: '[]' + description: >- + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-settings.yaml + + + // Gets all custom settings this add-in set on this document. + + await Word.run(async (context) => { + const settings: Word.SettingCollection = context.document.settings; + settings.load("items"); + await context.sync(); + + if (settings.items.length == 0) { + console.log("There are no settings."); + } else { + console.log("All settings:"); + for (let i = 0; i < settings.items.length; i++) { + console.log(settings.items[i]); + } + } + }); + + ``` +methods: + - name: 'add(key, value)' + uid: 'word!Word.SettingCollection#add:member(1)' + package: word! + fullName: 'add(key, value)' + summary: Creates a new setting or sets an existing setting. + remarks: >- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-settings.yaml + + + // Adds a new custom setting or + + // edits the value of an existing one. + + await Word.run(async (context) => { + const key = $("#key") + .val() + .toString(); + + if (key == "") { + console.error("Key shouldn't be empty."); + return; + } + + const value = $("#value") + .val() + .toString(); + + const settings: Word.SettingCollection = context.document.settings; + const setting: Word.Setting = settings.add(key, value); + setting.load(); + await context.sync(); + + console.log("Setting added or edited:", setting); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'add(key: string, value: any): Word.Setting;' + parameters: + - id: key + description: 'Required. The setting''s key, which is case-sensitive.' + type: string + - id: value + description: Required. The setting's value. + type: any + return: + type: '' + description: '' + - name: deleteAll() + uid: 'word!Word.SettingCollection#deleteAll:member(1)' + package: word! + fullName: deleteAll() + summary: Deletes all settings in this add-in. + remarks: |- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Queue commands add a setting. + const settings = context.document.settings; + settings.add('startMonth', { month: 'March', year: 1998 }); + + // Queue a command to get the count of settings. + const count = settings.getCount(); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log(count.value); + + // Queue a command to delete all settings. + settings.deleteAll(); + + // Queue a command to get the new count of settings. + count = settings.getCount(); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log(count.value); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'deleteAll(): void;' + return: + type: void + description: '' + - name: getCount() + uid: 'word!Word.SettingCollection#getCount:member(1)' + package: word! + fullName: getCount() + summary: Gets the count of settings. + remarks: |- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Queue commands add a setting. + const settings = context.document.settings; + settings.add('startMonth', { month: 'March', year: 1998 }); + + // Queue a command to get the count of settings. + const count = settings.getCount(); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log(count.value); + + // Queue a command to delete all settings. + settings.deleteAll(); + + // Queue a command to get the new count of settings. + count = settings.getCount(); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log(count.value); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getCount(): OfficeExtension.ClientResult;' + return: + type: '<number>' + description: '' + - name: getItem(key) + uid: 'word!Word.SettingCollection#getItem:member(1)' + package: word! + fullName: getItem(key) + summary: >- + Gets a setting object by its key, which is case-sensitive. Throws an `ItemNotFound` error if the setting doesn't + exist. + remarks: |- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Queue commands add a setting. + const settings = context.document.settings; + settings.add('startMonth', { month: 'March', year: 1998 }); + + // Queue a command to retrieve a setting. + const startMonth = settings.getItem('startMonth'); + + // Queue a command to load the setting. + startMonth.load(); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log(JSON.stringify(startMonth.value)); + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getItem(key: string): Word.Setting;' + parameters: + - id: key + description: The key that identifies the setting object. + type: string + return: + type: '' + description: '' + - name: getItemOrNullObject(key) + uid: 'word!Word.SettingCollection#getItemOrNullObject:member(1)' + package: word! + fullName: getItemOrNullObject(key) + summary: >- + Gets a setting object by its key, which is case-sensitive. If the setting doesn't exist, then this method will + return an object with its `isNullObject` property set to `true`. For further information, see + [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: |- + \[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Queue commands add a setting. + const settings = context.document.settings; + settings.add('startMonth', { month: 'March', year: 1998 }); + + // Queue commands to retrieve settings. + const startMonth = settings.getItemOrNullObject('startMonth'); + const endMonth = settings.getItemOrNullObject('endMonth'); + + // Queue commands to load settings. + startMonth.load(); + endMonth.load(); + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + if (startMonth.isNullObject) { + console.log("No such setting."); + } + else { + console.log(JSON.stringify(startMonth.value)); + } + if (endMonth.isNullObject) { + console.log("No such setting."); + } + else { + console.log(JSON.stringify(endMonth.value)); + } + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getItemOrNullObject(key: string): Word.Setting;' + parameters: + - id: key + description: Required. The key that identifies the setting object. + type: string + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.SettingCollection#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: >- + load(options?: Word.Interfaces.SettingCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): + Word.SettingCollection; + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: >- + & + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.SettingCollection#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.SettingCollection;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.SettingCollection#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.SettingCollection;' + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: '' + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.SettingCollection#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.SettingCollection` object is an API object, the `toJSON` method returns + a plain JavaScript object (typed as `Word.Interfaces.SettingCollectionData`) that contains an "items" + array with shallow copies of any loaded properties from the collection's items. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.SettingCollectionData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.SettingCollection#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.SettingCollection;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.SettingCollection#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.SettingCollection;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.shading.yml b/docs/docs-ref-autogen/word_1_9/word/word.shading.yml new file mode 100644 index 0000000000..fd645a541c --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.shading.yml @@ -0,0 +1,245 @@ +### YamlMime:TSType +name: Word.Shading +uid: 'word!Word.Shading:class' +package: word! +fullName: Word.Shading +summary: Represents the shading object. +remarks: >- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-styles.yaml + + + // Updates shading properties (e.g., texture, pattern colors) of the specified style. + + await Word.run(async (context) => { + const styleName = $("#style-name").val() as string; + if (styleName == "") { + console.warn("Enter a style name to update shading properties."); + return; + } + + const style: Word.Style = context.document.getStyles().getByNameOrNullObject(styleName); + style.load(); + await context.sync(); + + if (style.isNullObject) { + console.warn(`There's no existing style with the name '${styleName}'.`); + } else { + const shading: Word.Shading = style.shading; + shading.load(); + await context.sync(); + + shading.backgroundPatternColor = "blue"; + shading.foregroundPatternColor = "yellow"; + shading.texture = Word.ShadingTextureType.darkTrellis; + + console.log("Updated shading."); + } + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: backgroundPatternColor + uid: 'word!Word.Shading#backgroundPatternColor:member' + package: word! + fullName: backgroundPatternColor + summary: >- + Specifies the color for the background of the object. You can provide the value in the '\#RRGGBB' format or the + color name. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'backgroundPatternColor: string;' + return: + type: string + - name: context + uid: 'word!Word.Shading#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' +methods: + - name: load(options) + uid: 'word!Word.Shading#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.ShadingLoadOptions): Word.Shading;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.Shading#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.Shading;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.Shading#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Shading; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.Shading#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.ShadingUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.Shading#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.Shading): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.Shading#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.Shading` object is an API object, the `toJSON` method returns a plain + JavaScript object (typed as `Word.Interfaces.ShadingData`) that contains shallow copies of any loaded + child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.ShadingData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.Shading#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.Shading;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.Shading#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.Shading;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.style.yml b/docs/docs-ref-autogen/word_1_9/word/word.style.yml new file mode 100644 index 0000000000..62444c97eb --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.style.yml @@ -0,0 +1,629 @@ +### YamlMime:TSType +name: Word.Style +uid: 'word!Word.Style:class' +package: word! +fullName: Word.Style +summary: Represents a style in a Word document. +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-styles.yaml + + + // Applies the specified style to a paragraph. + + await Word.run(async (context) => { + const styleName = $("#style-name-to-use").val() as string; + if (styleName == "") { + console.warn("Enter a style name to apply."); + return; + } + + const style: Word.Style = context.document.getStyles().getByNameOrNullObject(styleName); + style.load(); + await context.sync(); + + if (style.isNullObject) { + console.warn(`There's no existing style with the name '${styleName}'.`); + } else if (style.type != Word.StyleType.paragraph) { + console.log(`The '${styleName}' style isn't a paragraph style.`); + } else { + const body: Word.Body = context.document.body; + body.clear(); + body.insertParagraph( + "Do you want to create a solution that extends the functionality of Word? You can use the Office Add-ins platform to extend Word clients running on the web, on a Windows desktop, or on a Mac.", + "Start" + ); + const paragraph: Word.Paragraph = body.paragraphs.getFirst(); + paragraph.style = style.nameLocal; + console.log(`'${styleName}' style applied to first paragraph.`); + } + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: baseStyle + uid: 'word!Word.Style#baseStyle:member' + package: word! + fullName: baseStyle + summary: Specifies the name of an existing style to use as the base formatting of another style. + remarks: |- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + Note: The ability to set `baseStyle` was introduced in WordApi 1.6. + isPreview: false + isDeprecated: false + syntax: + content: 'baseStyle: string;' + return: + type: string + - name: builtIn + uid: 'word!Word.Style#builtIn:member' + package: word! + fullName: builtIn + summary: Gets whether the specified style is a built-in style. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly builtIn: boolean;' + return: + type: boolean + - name: context + uid: 'word!Word.Style#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: font + uid: 'word!Word.Style#font:member' + package: word! + fullName: font + summary: Gets a font object that represents the character formatting of the specified style. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-styles.yaml + + + // Updates font properties (e.g., color, size) of the specified style. + + await Word.run(async (context) => { + const styleName = $("#style-name").val() as string; + if (styleName == "") { + console.warn("Enter a style name to update font properties."); + return; + } + + const style: Word.Style = context.document.getStyles().getByNameOrNullObject(styleName); + style.load(); + await context.sync(); + + if (style.isNullObject) { + console.warn(`There's no existing style with the name '${styleName}'.`); + } else { + const font: Word.Font = style.font; + font.color = "#FF0000"; + font.size = 20; + console.log(`Successfully updated font properties of the '${styleName}' style.`); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly font: Word.Font;' + return: + type: '' + - name: inUse + uid: 'word!Word.Style#inUse:member' + package: word! + fullName: inUse + summary: >- + Gets whether the specified style is a built-in style that has been modified or applied in the document or a new + style that has been created in the document. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly inUse: boolean;' + return: + type: boolean + - name: linked + uid: 'word!Word.Style#linked:member' + package: word! + fullName: linked + summary: Gets whether a style is a linked style that can be used for both paragraph and character formatting. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly linked: boolean;' + return: + type: boolean + - name: nameLocal + uid: 'word!Word.Style#nameLocal:member' + package: word! + fullName: nameLocal + summary: Gets the name of a style in the language of the user. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-styles.yaml + + + // Applies the specified style to a paragraph. + + await Word.run(async (context) => { + const styleName = $("#style-name-to-use").val() as string; + if (styleName == "") { + console.warn("Enter a style name to apply."); + return; + } + + const style: Word.Style = context.document.getStyles().getByNameOrNullObject(styleName); + style.load(); + await context.sync(); + + if (style.isNullObject) { + console.warn(`There's no existing style with the name '${styleName}'.`); + } else if (style.type != Word.StyleType.paragraph) { + console.log(`The '${styleName}' style isn't a paragraph style.`); + } else { + const body: Word.Body = context.document.body; + body.clear(); + body.insertParagraph( + "Do you want to create a solution that extends the functionality of Word? You can use the Office Add-ins platform to extend Word clients running on the web, on a Windows desktop, or on a Mac.", + "Start" + ); + const paragraph: Word.Paragraph = body.paragraphs.getFirst(); + paragraph.style = style.nameLocal; + console.log(`'${styleName}' style applied to first paragraph.`); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly nameLocal: string;' + return: + type: string + - name: nextParagraphStyle + uid: 'word!Word.Style#nextParagraphStyle:member' + package: word! + fullName: nextParagraphStyle + summary: >- + Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph + formatted with the specified style. + remarks: |- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. + isPreview: false + isDeprecated: false + syntax: + content: 'nextParagraphStyle: string;' + return: + type: string + - name: paragraphFormat + uid: 'word!Word.Style#paragraphFormat:member' + package: word! + fullName: paragraphFormat + summary: Gets a ParagraphFormat object that represents the paragraph settings for the specified style. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-styles.yaml + + + // Sets certain aspects of the specified style's paragraph format e.g., the left indent size and the alignment. + + await Word.run(async (context) => { + const styleName = $("#style-name").val() as string; + if (styleName == "") { + console.warn("Enter a style name to update its paragraph format."); + return; + } + + const style: Word.Style = context.document.getStyles().getByNameOrNullObject(styleName); + style.load(); + await context.sync(); + + if (style.isNullObject) { + console.warn(`There's no existing style with the name '${styleName}'.`); + } else { + style.paragraphFormat.leftIndent = 30; + style.paragraphFormat.alignment = Word.Alignment.centered; + console.log(`Successfully the paragraph format of the '${styleName}' style.`); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly paragraphFormat: Word.ParagraphFormat;' + return: + type: '' + - name: priority + uid: 'word!Word.Style#priority:member' + package: word! + fullName: priority + summary: Specifies the priority. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'priority: number;' + return: + type: number + - name: quickStyle + uid: 'word!Word.Style#quickStyle:member' + package: word! + fullName: quickStyle + summary: Specifies whether the style corresponds to an available quick style. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'quickStyle: boolean;' + return: + type: boolean + - name: shading + uid: 'word!Word.Style#shading:member' + package: word! + fullName: shading + summary: Gets a Shading object that represents the shading for the specified style. Not applicable to List style. + remarks: >- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-styles.yaml + + + // Updates shading properties (e.g., texture, pattern colors) of the specified style. + + await Word.run(async (context) => { + const styleName = $("#style-name").val() as string; + if (styleName == "") { + console.warn("Enter a style name to update shading properties."); + return; + } + + const style: Word.Style = context.document.getStyles().getByNameOrNullObject(styleName); + style.load(); + await context.sync(); + + if (style.isNullObject) { + console.warn(`There's no existing style with the name '${styleName}'.`); + } else { + const shading: Word.Shading = style.shading; + shading.load(); + await context.sync(); + + shading.backgroundPatternColor = "blue"; + shading.foregroundPatternColor = "yellow"; + shading.texture = Word.ShadingTextureType.darkTrellis; + + console.log("Updated shading."); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly shading: Word.Shading;' + return: + type: '' + - name: tableStyle + uid: 'word!Word.Style#tableStyle:member' + package: word! + fullName: tableStyle + summary: Gets a TableStyle object representing Style properties that can be applied to a table. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly tableStyle: Word.TableStyle;' + return: + type: '' + - name: type + uid: 'word!Word.Style#type:member' + package: word! + fullName: type + summary: Gets the style type. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly type: Word.StyleType | "Character" | "List" | "Paragraph" | "Table";' + return: + type: ' | "Character" | "List" | "Paragraph" | "Table"' + - name: unhideWhenUsed + uid: 'word!Word.Style#unhideWhenUsed:member' + package: word! + fullName: unhideWhenUsed + summary: >- + Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task + pane in Microsoft Word after it's used in the document. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'unhideWhenUsed: boolean;' + return: + type: boolean + - name: visibility + uid: 'word!Word.Style#visibility:member' + package: word! + fullName: visibility + summary: >- + Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles + task pane. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'visibility: boolean;' + return: + type: boolean +methods: + - name: delete() + uid: 'word!Word.Style#delete:member(1)' + package: word! + fullName: delete() + summary: Deletes the style. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-styles.yaml + + + // Deletes the custom style. + + await Word.run(async (context) => { + const styleName = $("#style-name-to-delete").val() as string; + if (styleName == "") { + console.warn("Enter a style name to delete."); + return; + } + + const style: Word.Style = context.document.getStyles().getByNameOrNullObject(styleName); + style.load(); + await context.sync(); + + if (style.isNullObject) { + console.warn(`There's no existing style with the name '${styleName}'.`); + } else { + style.delete(); + console.log(`Successfully deleted custom style '${styleName}'.`); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'delete(): void;' + return: + type: void + description: '' + - name: load(options) + uid: 'word!Word.Style#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.StyleLoadOptions): Word.Style;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.Style#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.Style;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.Style#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Style; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.Style#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.StyleUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.Style#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.Style): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.Style#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.Style` object is an API object, the `toJSON` method returns a plain + JavaScript object (typed as `Word.Interfaces.StyleData`) that contains shallow copies of any loaded child + properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.StyleData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.Style#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.Style;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.Style#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.Style;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.stylecollection.yml b/docs/docs-ref-autogen/word_1_9/word/word.stylecollection.yml new file mode 100644 index 0000000000..2626e7b5c6 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.stylecollection.yml @@ -0,0 +1,309 @@ +### YamlMime:TSType +name: Word.StyleCollection +uid: 'word!Word.StyleCollection:class' +package: word! +fullName: Word.StyleCollection +summary: 'Contains a collection of [Word.Style](xref:word!Word.Style:class) objects.' +remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-styles.yaml + + + // Gets the number of available styles stored with the document. + + await Word.run(async (context) => { + const styles: Word.StyleCollection = context.document.getStyles(); + const count = styles.getCount(); + await context.sync(); + + console.log(`Number of styles: ${count.value}`); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.StyleCollection#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: items + uid: 'word!Word.StyleCollection#items:member' + package: word! + fullName: items + summary: Gets the loaded child items in this collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly items: Word.Style[];' + return: + type: '[]' +methods: + - name: getByName(name) + uid: 'word!Word.StyleCollection#getByName:member(1)' + package: word! + fullName: getByName(name) + summary: Get the style object by its name. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getByName(name: string): Word.Style;' + parameters: + - id: name + description: Required. The style name. + type: string + return: + type: '' + description: '' + - name: getByNameOrNullObject(name) + uid: 'word!Word.StyleCollection#getByNameOrNullObject:member(1)' + package: word! + fullName: getByNameOrNullObject(name) + summary: >- + If the corresponding style doesn't exist, then this method returns an object with its `isNullObject` property set + to `true`. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-styles.yaml + + + // Adds a new style. + + await Word.run(async (context) => { + const newStyleName = $("#new-style-name").val() as string; + if (newStyleName == "") { + console.warn("Enter a style name to add."); + return; + } + + const style: Word.Style = context.document.getStyles().getByNameOrNullObject(newStyleName); + style.load(); + await context.sync(); + + if (!style.isNullObject) { + console.warn( + `There's an existing style with the same name '${newStyleName}'! Please provide another style name.` + ); + return; + } + + const newStyleType = ($("#new-style-type").val() as unknown) as Word.StyleType; + context.document.addStyle(newStyleName, newStyleType); + await context.sync(); + + console.log(newStyleName + " has been added to the style list."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getByNameOrNullObject(name: string): Word.Style;' + parameters: + - id: name + description: Required. The style name. + type: string + return: + type: '' + description: '' + - name: getCount() + uid: 'word!Word.StyleCollection#getCount:member(1)' + package: word! + fullName: getCount() + summary: Gets the number of the styles in the collection. + remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-styles.yaml + + + // Gets the number of available styles stored with the document. + + await Word.run(async (context) => { + const styles: Word.StyleCollection = context.document.getStyles(); + const count = styles.getCount(); + await context.sync(); + + console.log(`Number of styles: ${count.value}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getCount(): OfficeExtension.ClientResult;' + return: + type: '<number>' + description: '' + - name: getItem(index) + uid: 'word!Word.StyleCollection#getItem:member(1)' + package: word! + fullName: getItem(index) + summary: Gets a style object by its index in the collection. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getItem(index: number): Word.Style;' + parameters: + - id: index + description: A number that identifies the index location of a style object. + type: number + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.StyleCollection#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: >- + load(options?: Word.Interfaces.StyleCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): + Word.StyleCollection; + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: >- + & + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.StyleCollection#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.StyleCollection;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.StyleCollection#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.StyleCollection;' + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: '' + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.StyleCollection#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.StyleCollection` object is an API object, the `toJSON` method returns a + plain JavaScript object (typed as `Word.Interfaces.StyleCollectionData`) that contains an "items" array + with shallow copies of any loaded properties from the collection's items. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.StyleCollectionData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.StyleCollection#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.StyleCollection;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.StyleCollection#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.StyleCollection;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.styletype.yml b/docs/docs-ref-autogen/word_1_9/word/word.styletype.yml new file mode 100644 index 0000000000..ef6ebdcb65 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.styletype.yml @@ -0,0 +1,85 @@ +### YamlMime:TSEnum +name: Word.StyleType +uid: 'word!Word.StyleType:enum' +package: word! +fullName: Word.StyleType +summary: Represents the type of style. +remarks: >- + \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-styles.yaml + + + // Applies the specified style to a paragraph. + + await Word.run(async (context) => { + const styleName = $("#style-name-to-use").val() as string; + if (styleName == "") { + console.warn("Enter a style name to apply."); + return; + } + + const style: Word.Style = context.document.getStyles().getByNameOrNullObject(styleName); + style.load(); + await context.sync(); + + if (style.isNullObject) { + console.warn(`There's no existing style with the name '${styleName}'.`); + } else if (style.type != Word.StyleType.paragraph) { + console.log(`The '${styleName}' style isn't a paragraph style.`); + } else { + const body: Word.Body = context.document.body; + body.clear(); + body.insertParagraph( + "Do you want to create a solution that extends the functionality of Word? You can use the Office Add-ins platform to extend Word clients running on the web, on a Windows desktop, or on a Mac.", + "Start" + ); + const paragraph: Word.Paragraph = body.paragraphs.getFirst(); + paragraph.style = style.nameLocal; + console.log(`'${styleName}' style applied to first paragraph.`); + } + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: character + uid: 'word!Word.StyleType.character:member' + package: word! + summary: |- + Represents that the style is a character style. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Character"' + - name: list + uid: 'word!Word.StyleType.list:member' + package: word! + summary: |- + Represents that the style is a list style. Currently supported on desktop. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"List"' + - name: paragraph + uid: 'word!Word.StyleType.paragraph:member' + package: word! + summary: |- + Represents that the style is a paragraph style. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Paragraph"' + - name: table + uid: 'word!Word.StyleType.table:member' + package: word! + summary: |- + Represents that the style is a table style. + + * \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Table"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.table.yml b/docs/docs-ref-autogen/word_1_9/word/word.table.yml new file mode 100644 index 0000000000..7a036f48d4 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.table.yml @@ -0,0 +1,1420 @@ +### YamlMime:TSType +name: Word.Table +uid: 'word!Word.Table:class' +package: word! +fullName: Word.Table +summary: Represents a table in a Word document. +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/table-cell-access.yaml + + + await Word.run(async (context) => { + // Use a two-dimensional array to hold the initial table values. + const data = [ + ["Tokyo", "Beijing", "Seattle"], + ["Apple", "Orange", "Pineapple"] + ]; + const table: Word.Table = context.document.body.insertTable(2, 3, "Start", data); + table.styleBuiltIn = Word.BuiltInStyleName.gridTable5Dark_Accent2; + table.styleFirstColumn = false; + + await context.sync(); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: alignment + uid: 'word!Word.Table#alignment:member' + package: word! + fullName: alignment + summary: 'Specifies the alignment of the table against the page column. The value can be ''Left'', ''Centered'', or ''Right''.' + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets alignment details about the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + firstTable.load(["alignment", "horizontalAlignment", "verticalAlignment"]); + await context.sync(); + + console.log(`Details about the alignment of the first table:`, `- Alignment of the table within the containing page column: ${firstTable.alignment}`, `- Horizontal alignment of every cell in the table: ${firstTable.horizontalAlignment}`, `- Vertical alignment of every cell in the table: ${firstTable.verticalAlignment}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified";' + return: + type: ' | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"' + - name: context + uid: 'word!Word.Table#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: endnotes + uid: 'word!Word.Table#endnotes:member' + package: word! + fullName: endnotes + summary: Gets the collection of endnotes in the table. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly endnotes: Word.NoteItemCollection;' + return: + type: '' + - name: fields + uid: 'word!Word.Table#fields:member' + package: word! + fullName: fields + summary: Gets the collection of field objects in the table. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly fields: Word.FieldCollection;' + return: + type: '' + - name: font + uid: 'word!Word.Table#font:member' + package: word! + fullName: font + summary: 'Gets the font. Use this to get and set font name, size, color, and other properties.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly font: Word.Font;' + return: + type: '' + - name: footnotes + uid: 'word!Word.Table#footnotes:member' + package: word! + fullName: footnotes + summary: Gets the collection of footnotes in the table. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly footnotes: Word.NoteItemCollection;' + return: + type: '' + - name: headerRowCount + uid: 'word!Word.Table#headerRowCount:member' + package: word! + fullName: headerRowCount + summary: Specifies the number of header rows. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'headerRowCount: number;' + return: + type: number + - name: horizontalAlignment + uid: 'word!Word.Table#horizontalAlignment:member' + package: word! + fullName: horizontalAlignment + summary: >- + Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or + 'Justified'. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets alignment details about the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + firstTable.load(["alignment", "horizontalAlignment", "verticalAlignment"]); + await context.sync(); + + console.log(`Details about the alignment of the first table:`, `- Alignment of the table within the containing page column: ${firstTable.alignment}`, `- Horizontal alignment of every cell in the table: ${firstTable.horizontalAlignment}`, `- Vertical alignment of every cell in the table: ${firstTable.verticalAlignment}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified";' + return: + type: ' | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"' + - name: isUniform + uid: 'word!Word.Table#isUniform:member' + package: word! + fullName: isUniform + summary: Indicates whether all of the table rows are uniform. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly isUniform: boolean;' + return: + type: boolean + - name: nestingLevel + uid: 'word!Word.Table#nestingLevel:member' + package: word! + fullName: nestingLevel + summary: Gets the nesting level of the table. Top-level tables have level 1. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly nestingLevel: number;' + return: + type: number + - name: parentBody + uid: 'word!Word.Table#parentBody:member' + package: word! + fullName: parentBody + summary: Gets the parent body of the table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentBody: Word.Body;' + return: + type: '' + - name: parentContentControl + uid: 'word!Word.Table#parentContentControl:member' + package: word! + fullName: parentContentControl + summary: >- + Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content + control. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentContentControl: Word.ContentControl;' + return: + type: '' + - name: parentContentControlOrNullObject + uid: 'word!Word.Table#parentContentControlOrNullObject:member' + package: word! + fullName: parentContentControlOrNullObject + summary: >- + Gets the content control that contains the table. If there isn't a parent content control, then this method will + return an object with its `isNullObject` property set to `true`. For further information, see + [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentContentControlOrNullObject: Word.ContentControl;' + return: + type: '' + - name: parentTable + uid: 'word!Word.Table#parentTable:member' + package: word! + fullName: parentTable + summary: Gets the table that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTable: Word.Table;' + return: + type: '' + - name: parentTableCell + uid: 'word!Word.Table#parentTableCell:member' + package: word! + fullName: parentTableCell + summary: >- + Gets the table cell that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table + cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTableCell: Word.TableCell;' + return: + type: '' + - name: parentTableCellOrNullObject + uid: 'word!Word.Table#parentTableCellOrNullObject:member' + package: word! + fullName: parentTableCellOrNullObject + summary: >- + Gets the table cell that contains this table. If it isn't contained in a table cell, then this method will return + an object with its `isNullObject` property set to `true`. For further information, see [*OrNullObject + methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTableCellOrNullObject: Word.TableCell;' + return: + type: '' + - name: parentTableOrNullObject + uid: 'word!Word.Table#parentTableOrNullObject:member' + package: word! + fullName: parentTableOrNullObject + summary: >- + Gets the table that contains this table. If it isn't contained in a table, then this method will return an object + with its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTableOrNullObject: Word.Table;' + return: + type: '' + - name: rowCount + uid: 'word!Word.Table#rowCount:member' + package: word! + fullName: rowCount + summary: Gets the number of rows in the table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly rowCount: number;' + return: + type: number + - name: rows + uid: 'word!Word.Table#rows:member' + package: word! + fullName: rows + summary: Gets all of the table rows. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets content alignment details about the first row of the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + const firstTableRow: Word.TableRow = firstTable.rows.getFirst(); + firstTableRow.load(["horizontalAlignment", "verticalAlignment"]); + await context.sync(); + + console.log(`Details about the alignment of the first table's first row:`, `- Horizontal alignment of every cell in the row: ${firstTableRow.horizontalAlignment}`, `- Vertical alignment of every cell in the row: ${firstTableRow.verticalAlignment}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly rows: Word.TableRowCollection;' + return: + type: '' + - name: shadingColor + uid: 'word!Word.Table#shadingColor:member' + package: word! + fullName: shadingColor + summary: 'Specifies the shading color. Color is specified in "\#RRGGBB" format or by using the color name.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'shadingColor: string;' + return: + type: string + - name: style + uid: 'word!Word.Table#style:member' + package: word! + fullName: style + summary: >- + Specifies the style name for the table. Use this property for custom styles and localized style names. To use the + built-in styles that are portable between locales, see the "styleBuiltIn" property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'style: string;' + return: + type: string + - name: styleBandedColumns + uid: 'word!Word.Table#styleBandedColumns:member' + package: word! + fullName: styleBandedColumns + summary: Specifies whether the table has banded columns. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleBandedColumns: boolean;' + return: + type: boolean + - name: styleBandedRows + uid: 'word!Word.Table#styleBandedRows:member' + package: word! + fullName: styleBandedRows + summary: Specifies whether the table has banded rows. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleBandedRows: boolean;' + return: + type: boolean + - name: styleBuiltIn + uid: 'word!Word.Table#styleBuiltIn:member' + package: word! + fullName: styleBuiltIn + summary: >- + Specifies the built-in style name for the table. Use this property for built-in styles that are portable between + locales. To use custom styles or localized style names, see the "style" property. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | + "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | + "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | + "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | + "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | + "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | + "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" + | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" + | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" + | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | + "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" + | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | + "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | + "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | + "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | + "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" + | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | + "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | + "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | + "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | + "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | + "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | + "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | + "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + return: + type: >- + | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | + "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | + "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | + "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | + "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | + "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | + "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | + "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | + "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | + "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | + "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | + "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | + "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | + "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | + "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | + "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" + | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | + "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | + "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | + "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | + "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" + | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | + "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | + "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | + "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | + "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | + "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | + "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | + "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | + "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | + "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | + "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6" + - name: styleFirstColumn + uid: 'word!Word.Table#styleFirstColumn:member' + package: word! + fullName: styleFirstColumn + summary: Specifies whether the table has a first column with a special style. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleFirstColumn: boolean;' + return: + type: boolean + - name: styleLastColumn + uid: 'word!Word.Table#styleLastColumn:member' + package: word! + fullName: styleLastColumn + summary: Specifies whether the table has a last column with a special style. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleLastColumn: boolean;' + return: + type: boolean + - name: styleTotalRow + uid: 'word!Word.Table#styleTotalRow:member' + package: word! + fullName: styleTotalRow + summary: Specifies whether the table has a total (last) row with a special style. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'styleTotalRow: boolean;' + return: + type: boolean + - name: tables + uid: 'word!Word.Table#tables:member' + package: word! + fullName: tables + summary: Gets the child tables nested one level deeper. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly tables: Word.TableCollection;' + return: + type: '' + - name: values + uid: 'word!Word.Table#values:member' + package: word! + fullName: values + summary: 'Specifies the text values in the table, as a 2D JavaScript array.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'values: string[][];' + return: + type: 'string[][]' + - name: verticalAlignment + uid: 'word!Word.Table#verticalAlignment:member' + package: word! + fullName: verticalAlignment + summary: 'Specifies the vertical alignment of every cell in the table. The value can be ''Top'', ''Center'', or ''Bottom''.' + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets alignment details about the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + firstTable.load(["alignment", "horizontalAlignment", "verticalAlignment"]); + await context.sync(); + + console.log(`Details about the alignment of the first table:`, `- Alignment of the table within the containing page column: ${firstTable.alignment}`, `- Horizontal alignment of every cell in the table: ${firstTable.horizontalAlignment}`, `- Vertical alignment of every cell in the table: ${firstTable.verticalAlignment}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom";' + return: + type: ' | "Mixed" | "Top" | "Center" | "Bottom"' + - name: width + uid: 'word!Word.Table#width:member' + package: word! + fullName: width + summary: Specifies the width of the table in points. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'width: number;' + return: + type: number +methods: + - name: 'addColumns(insertLocation, columnCount, values)' + uid: 'word!Word.Table#addColumns:member(1)' + package: word! + fullName: 'addColumns(insertLocation, columnCount, values)' + summary: >- + Adds columns to the start or end of the table, using the first or last existing column as a template. This is + applicable to uniform tables. The string values, if specified, are set in the newly inserted rows. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + addColumns(insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End", columnCount: + number, values?: string[][]): void; + parameters: + - id: insertLocation + description: 'Required. It must be ''Start'' or ''End'', corresponding to the appropriate side of the table.' + type: >- + | | + "Start" | "End" + - id: columnCount + description: Required. Number of columns to add. + type: number + - id: values + description: Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + type: 'string[][]' + return: + type: void + description: '' + - name: 'addRows(insertLocation, rowCount, values)' + uid: 'word!Word.Table#addRows:member(1)' + package: word! + fullName: 'addRows(insertLocation, rowCount, values)' + summary: >- + Adds rows to the start or end of the table, using the first or last existing row as a template. The string values, + if specified, are set in the newly inserted rows. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + addRows(insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End", rowCount: number, + values?: string[][]): Word.TableRowCollection; + parameters: + - id: insertLocation + description: Required. It must be 'Start' or 'End'. + type: >- + | | + "Start" | "End" + - id: rowCount + description: Required. Number of rows to add. + type: number + - id: values + description: Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + type: 'string[][]' + return: + type: '' + description: '' + - name: autoFitWindow() + uid: 'word!Word.Table#autoFitWindow:member(1)' + package: word! + fullName: autoFitWindow() + summary: Autofits the table columns to the width of the window. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'autoFitWindow(): void;' + return: + type: void + description: '' + - name: clear() + uid: 'word!Word.Table#clear:member(1)' + package: word! + fullName: clear() + summary: Clears the contents of the table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'clear(): void;' + return: + type: void + description: '' + - name: delete() + uid: 'word!Word.Table#delete:member(1)' + package: word! + fullName: delete() + summary: Deletes the entire table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'delete(): void;' + return: + type: void + description: '' + - name: 'deleteColumns(columnIndex, columnCount)' + uid: 'word!Word.Table#deleteColumns:member(1)' + package: word! + fullName: 'deleteColumns(columnIndex, columnCount)' + summary: Deletes specific columns. This is applicable to uniform tables. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'deleteColumns(columnIndex: number, columnCount?: number): void;' + parameters: + - id: columnIndex + description: Required. The first column to delete. + type: number + - id: columnCount + description: Optional. The number of columns to delete. Default 1. + type: number + return: + type: void + description: '' + - name: 'deleteRows(rowIndex, rowCount)' + uid: 'word!Word.Table#deleteRows:member(1)' + package: word! + fullName: 'deleteRows(rowIndex, rowCount)' + summary: Deletes specific rows. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'deleteRows(rowIndex: number, rowCount?: number): void;' + parameters: + - id: rowIndex + description: Required. The first row to delete. + type: number + - id: rowCount + description: Optional. The number of rows to delete. Default 1. + type: number + return: + type: void + description: '' + - name: distributeColumns() + uid: 'word!Word.Table#distributeColumns:member(1)' + package: word! + fullName: distributeColumns() + summary: Distributes the column widths evenly. This is applicable to uniform tables. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'distributeColumns(): void;' + return: + type: void + description: '' + - name: getBorder(borderLocation) + uid: 'word!Word.Table#getBorder:member(1)' + package: word! + fullName: getBorder(borderLocation) + summary: Gets the border style for the specified border. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets border details about the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + const borderLocation = Word.BorderLocation.top; + const border: Word.TableBorder = firstTable.getBorder(borderLocation); + border.load(["type", "color", "width"]); + await context.sync(); + + console.log(`Details about the ${borderLocation} border of the first table:`, `- Color: ${border.color}`, `- Type: ${border.type}`, `- Width: ${border.width} points`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getBorder(borderLocation: Word.BorderLocation): Word.TableBorder;' + parameters: + - id: borderLocation + description: Required. The border location. + type: '' + return: + type: '' + description: '' + - name: getBorder(borderLocationString) + uid: 'word!Word.Table#getBorder:member(2)' + package: word! + fullName: getBorder(borderLocationString) + summary: Gets the border style for the specified border. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + getBorder(borderLocationString: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | + "Inside" | "Outside" | "All"): Word.TableBorder; + parameters: + - id: borderLocationString + description: Required. The border location. + type: '"Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"' + return: + type: '' + description: '' + - name: 'getCell(rowIndex, cellIndex)' + uid: 'word!Word.Table#getCell:member(1)' + package: word! + fullName: 'getCell(rowIndex, cellIndex)' + summary: >- + Gets the table cell at a specified row and column. Throws an `ItemNotFound` error if the specified table cell + doesn't exist. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/table-cell-access.yaml + + + // Gets the content of the first cell in the first table. + + await Word.run(async (context) => { + const firstCell: Word.Body = context.document.body.tables.getFirst().getCell(0, 0).body; + firstCell.load("text"); + + await context.sync(); + console.log("First cell's text is: " + firstCell.text); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getCell(rowIndex: number, cellIndex: number): Word.TableCell;' + parameters: + - id: rowIndex + description: Required. The index of the row. + type: number + - id: cellIndex + description: Required. The index of the cell in the row. + type: number + return: + type: '' + description: '' + - name: 'getCellOrNullObject(rowIndex, cellIndex)' + uid: 'word!Word.Table#getCellOrNullObject:member(1)' + package: word! + fullName: 'getCellOrNullObject(rowIndex, cellIndex)' + summary: >- + Gets the table cell at a specified row and column. If the specified table cell doesn't exist, then this method + will return an object with its `isNullObject` property set to `true`. For further information, see + [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getCellOrNullObject(rowIndex: number, cellIndex: number): Word.TableCell;' + parameters: + - id: rowIndex + description: Required. The index of the row. + type: number + - id: cellIndex + description: Required. The index of the cell in the row. + type: number + return: + type: '' + description: '' + - name: getCellPadding(cellPaddingLocation) + uid: 'word!Word.Table#getCellPadding:member(1)' + package: word! + fullName: getCellPadding(cellPaddingLocation) + summary: Gets cell padding in points. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets cell padding details about the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + const cellPaddingLocation = Word.CellPaddingLocation.right; + const cellPadding = firstTable.getCellPadding(cellPaddingLocation); + await context.sync(); + + console.log( + `Cell padding details about the ${cellPaddingLocation} border of the first table: ${cellPadding.value} points` + ); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult;' + parameters: + - id: cellPaddingLocation + description: 'Required. The cell padding location must be ''Top'', ''Left'', ''Bottom'', or ''Right''.' + type: '' + return: + type: '<number>' + description: '' + - name: getCellPadding(cellPaddingLocationString) + uid: 'word!Word.Table#getCellPadding:member(2)' + package: word! + fullName: getCellPadding(cellPaddingLocationString) + summary: Gets cell padding in points. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + getCellPadding(cellPaddingLocationString: "Top" | "Left" | "Bottom" | "Right"): + OfficeExtension.ClientResult; + parameters: + - id: cellPaddingLocationString + description: 'Required. The cell padding location must be ''Top'', ''Left'', ''Bottom'', or ''Right''.' + type: '"Top" | "Left" | "Bottom" | "Right"' + return: + type: '<number>' + description: '' + - name: getNext() + uid: 'word!Word.Table#getNext:member(1)' + package: word! + fullName: getNext() + summary: Gets the next table. Throws an `ItemNotFound` error if this table is the last one. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getNext(): Word.Table;' + return: + type: '' + description: '' + - name: getNextOrNullObject() + uid: 'word!Word.Table#getNextOrNullObject:member(1)' + package: word! + fullName: getNextOrNullObject() + summary: >- + Gets the next table. If this table is the last one, then this method will return an object with its `isNullObject` + property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getNextOrNullObject(): Word.Table;' + return: + type: '' + description: '' + - name: getParagraphAfter() + uid: 'word!Word.Table#getParagraphAfter:member(1)' + package: word! + fullName: getParagraphAfter() + summary: Gets the paragraph after the table. Throws an `ItemNotFound` error if there isn't a paragraph after the table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getParagraphAfter(): Word.Paragraph;' + return: + type: '' + description: '' + - name: getParagraphAfterOrNullObject() + uid: 'word!Word.Table#getParagraphAfterOrNullObject:member(1)' + package: word! + fullName: getParagraphAfterOrNullObject() + summary: >- + Gets the paragraph after the table. If there isn't a paragraph after the table, then this method will return an + object with its `isNullObject` property set to `true`. For further information, see [*OrNullObject + methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getParagraphAfterOrNullObject(): Word.Paragraph;' + return: + type: '' + description: '' + - name: getParagraphBefore() + uid: 'word!Word.Table#getParagraphBefore:member(1)' + package: word! + fullName: getParagraphBefore() + summary: Gets the paragraph before the table. Throws an `ItemNotFound` error if there isn't a paragraph before the table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getParagraphBefore(): Word.Paragraph;' + return: + type: '' + description: '' + - name: getParagraphBeforeOrNullObject() + uid: 'word!Word.Table#getParagraphBeforeOrNullObject:member(1)' + package: word! + fullName: getParagraphBeforeOrNullObject() + summary: >- + Gets the paragraph before the table. If there isn't a paragraph before the table, then this method will return an + object with its `isNullObject` property set to `true`. For further information, see [*OrNullObject + methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getParagraphBeforeOrNullObject(): Word.Paragraph;' + return: + type: '' + description: '' + - name: getRange(rangeLocation) + uid: 'word!Word.Table#getRange:member(1)' + package: word! + fullName: getRange(rangeLocation) + summary: 'Gets the range that contains this table, or the range at the start or end of the table.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | + Word.RangeLocation.after | "Whole" | "Start" | "End" | "After"): Word.Range; + parameters: + - id: rangeLocation + description: 'Optional. The range location must be ''Whole'', ''Start'', ''End'', or ''After''.' + type: >- + | | + | | + "Whole" | "Start" | "End" | "After" + return: + type: '' + description: '' + - name: insertContentControl() + uid: 'word!Word.Table#insertContentControl:member(1)' + package: word! + fullName: insertContentControl() + summary: Inserts a content control on the table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'insertContentControl(): Word.ContentControl;' + return: + type: '' + description: '' + - name: 'insertParagraph(paragraphText, insertLocation)' + uid: 'word!Word.Table#insertParagraph:member(1)' + package: word! + fullName: 'insertParagraph(paragraphText, insertLocation)' + summary: Inserts a paragraph at the specified location. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | + "Before" | "After"): Word.Paragraph; + parameters: + - id: paragraphText + description: Required. The paragraph text to be inserted. + type: string + - id: insertLocation + description: Required. The value must be 'Before' or 'After'. + type: >- + | + | "Before" | "After" + return: + type: '' + description: '' + - name: 'insertTable(rowCount, columnCount, insertLocation, values)' + uid: 'word!Word.Table#insertTable:member(1)' + package: word! + fullName: 'insertTable(rowCount, columnCount, insertLocation, values)' + summary: Inserts a table with the specified number of rows and columns. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before | + Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; + parameters: + - id: rowCount + description: Required. The number of rows in the table. + type: number + - id: columnCount + description: Required. The number of columns in the table. + type: number + - id: insertLocation + description: Required. The value must be 'Before' or 'After'. + type: >- + | + | "Before" | "After" + - id: values + description: Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + type: 'string[][]' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.Table#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.TableLoadOptions): Word.Table;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.Table#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.Table;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.Table#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Table; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: 'mergeCells(topRow, firstCell, bottomRow, lastCell)' + uid: 'word!Word.Table#mergeCells:member(1)' + package: word! + fullName: 'mergeCells(topRow, firstCell, bottomRow, lastCell)' + summary: Merges the cells bounded inclusively by a first and last cell. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'mergeCells(topRow: number, firstCell: number, bottomRow: number, lastCell: number): Word.TableCell;' + parameters: + - id: topRow + description: Required. The row of the first cell + type: number + - id: firstCell + description: Required. The index of the first cell in its row + type: number + - id: bottomRow + description: Required. The row of the last cell + type: number + - id: lastCell + description: Required. The index of the last cell in its row + type: number + return: + type: '' + description: '' + - name: 'search(searchText, searchOptions)' + uid: 'word!Word.Table#search:member(1)' + package: word! + fullName: 'search(searchText, searchOptions)' + summary: >- + Performs a search with the specified SearchOptions on the scope of the table object. The search results are a + collection of range objects. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: |- + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + parameters: + - id: searchText + description: Required. The search text. + type: string + - id: searchOptions + description: Optional. Options for the search. + type: |- + | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + } + return: + type: '' + description: '' + - name: select(selectionMode) + uid: 'word!Word.Table#select:member(1)' + package: word! + fullName: select(selectionMode) + summary: 'Selects the table, or the position at the start or end of the table, and navigates the Word UI to it.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'select(selectionMode?: Word.SelectionMode): void;' + parameters: + - id: selectionMode + description: 'Optional. The selection mode must be ''Select'', ''Start'', or ''End''. ''Select'' is the default.' + type: '' + return: + type: void + description: '' + - name: select(selectionModeString) + uid: 'word!Word.Table#select:member(2)' + package: word! + fullName: select(selectionModeString) + summary: 'Selects the table, or the position at the start or end of the table, and navigates the Word UI to it.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'select(selectionModeString?: "Select" | "Start" | "End"): void;' + parameters: + - id: selectionModeString + description: 'Optional. The selection mode must be ''Select'', ''Start'', or ''End''. ''Select'' is the default.' + type: '"Select" | "Start" | "End"' + return: + type: void + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.Table#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.TableUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.Table#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.Table): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: 'setCellPadding(cellPaddingLocation, cellPadding)' + uid: 'word!Word.Table#setCellPadding:member(1)' + package: word! + fullName: 'setCellPadding(cellPaddingLocation, cellPadding)' + summary: Sets cell padding in points. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void;' + parameters: + - id: cellPaddingLocation + description: 'Required. The cell padding location must be ''Top'', ''Left'', ''Bottom'', or ''Right''.' + type: '' + - id: cellPadding + description: Required. The cell padding. + type: number + return: + type: void + description: '' + - name: 'setCellPadding(cellPaddingLocationString, cellPadding)' + uid: 'word!Word.Table#setCellPadding:member(2)' + package: word! + fullName: 'setCellPadding(cellPaddingLocationString, cellPadding)' + summary: Sets cell padding in points. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'setCellPadding(cellPaddingLocationString: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void;' + parameters: + - id: cellPaddingLocationString + description: 'Required. The cell padding location must be ''Top'', ''Left'', ''Bottom'', or ''Right''.' + type: '"Top" | "Left" | "Bottom" | "Right"' + - id: cellPadding + description: Required. The cell padding. + type: number + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.Table#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.Table` object is an API object, the `toJSON` method returns a plain + JavaScript object (typed as `Word.Interfaces.TableData`) that contains shallow copies of any loaded child + properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.TableData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.Table#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.Table;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.Table#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.Table;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.tableborder.yml b/docs/docs-ref-autogen/word_1_9/word/word.tableborder.yml new file mode 100644 index 0000000000..c77eb4a5de --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.tableborder.yml @@ -0,0 +1,335 @@ +### YamlMime:TSType +name: Word.TableBorder +uid: 'word!Word.TableBorder:class' +package: word! +fullName: Word.TableBorder +summary: Specifies the border style. +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets border details about the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + const borderLocation = Word.BorderLocation.top; + const border: Word.TableBorder = firstTable.getBorder(borderLocation); + border.load(["type", "color", "width"]); + await context.sync(); + + console.log(`Details about the ${borderLocation} border of the first table:`, `- Color: ${border.color}`, `- Type: ${border.type}`, `- Width: ${border.width} points`); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: color + uid: 'word!Word.TableBorder#color:member' + package: word! + fullName: color + summary: Specifies the table border color. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets border details about the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + const borderLocation = Word.BorderLocation.top; + const border: Word.TableBorder = firstTable.getBorder(borderLocation); + border.load(["type", "color", "width"]); + await context.sync(); + + console.log(`Details about the ${borderLocation} border of the first table:`, `- Color: ${border.color}`, `- Type: ${border.type}`, `- Width: ${border.width} points`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'color: string;' + return: + type: string + - name: context + uid: 'word!Word.TableBorder#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: type + uid: 'word!Word.TableBorder#type:member' + package: word! + fullName: type + summary: Specifies the type of the table border. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets border details about the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + const borderLocation = Word.BorderLocation.top; + const border: Word.TableBorder = firstTable.getBorder(borderLocation); + border.load(["type", "color", "width"]); + await context.sync(); + + console.log(`Details about the ${borderLocation} border of the first table:`, `- Color: ${border.color}`, `- Type: ${border.type}`, `- Width: ${border.width} points`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + type: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | + "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | + "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | + "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; + return: + type: >- + | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | + "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | + "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | + "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | + "ThreeDEngrave" + - name: width + uid: 'word!Word.TableBorder#width:member' + package: word! + fullName: width + summary: 'Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths.' + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets border details about the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + const borderLocation = Word.BorderLocation.top; + const border: Word.TableBorder = firstTable.getBorder(borderLocation); + border.load(["type", "color", "width"]); + await context.sync(); + + console.log(`Details about the ${borderLocation} border of the first table:`, `- Color: ${border.color}`, `- Type: ${border.type}`, `- Width: ${border.width} points`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'width: number;' + return: + type: number +methods: + - name: load(options) + uid: 'word!Word.TableBorder#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.TableBorderLoadOptions): Word.TableBorder;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.TableBorder#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.TableBorder;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.TableBorder#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.TableBorder; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.TableBorder#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.TableBorderUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.TableBorder#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.TableBorder): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.TableBorder#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.TableBorder` object is an API object, the `toJSON` method returns a + plain JavaScript object (typed as `Word.Interfaces.TableBorderData`) that contains shallow copies of any + loaded child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.TableBorderData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.TableBorder#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.TableBorder;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.TableBorder#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.TableBorder;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.tablecell.yml b/docs/docs-ref-autogen/word_1_9/word/word.tablecell.yml new file mode 100644 index 0000000000..01e4765bd4 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.tablecell.yml @@ -0,0 +1,696 @@ +### YamlMime:TSType +name: Word.TableCell +uid: 'word!Word.TableCell:class' +package: word! +fullName: Word.TableCell +summary: Represents a table cell in a Word document. +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets content alignment details about the first cell of the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + const firstTableRow: Word.TableRow = firstTable.rows.getFirst(); + const firstCell: Word.TableCell = firstTableRow.cells.getFirst(); + firstCell.load(["horizontalAlignment", "verticalAlignment"]); + await context.sync(); + + console.log(`Details about the alignment of the first table's first cell:`, `- Horizontal alignment of the cell's content: ${firstCell.horizontalAlignment}`, `- Vertical alignment of the cell's content: ${firstCell.verticalAlignment}`); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: body + uid: 'word!Word.TableCell#body:member' + package: word! + fullName: body + summary: Gets the body object of the cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly body: Word.Body;' + return: + type: '' + - name: cellIndex + uid: 'word!Word.TableCell#cellIndex:member' + package: word! + fullName: cellIndex + summary: Gets the index of the cell in its row. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly cellIndex: number;' + return: + type: number + - name: columnWidth + uid: 'word!Word.TableCell#columnWidth:member' + package: word! + fullName: columnWidth + summary: Specifies the width of the cell's column in points. This is applicable to uniform tables. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'columnWidth: number;' + return: + type: number + - name: context + uid: 'word!Word.TableCell#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: horizontalAlignment + uid: 'word!Word.TableCell#horizontalAlignment:member' + package: word! + fullName: horizontalAlignment + summary: 'Specifies the horizontal alignment of the cell. The value can be ''Left'', ''Centered'', ''Right'', or ''Justified''.' + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets content alignment details about the first cell of the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + const firstTableRow: Word.TableRow = firstTable.rows.getFirst(); + const firstCell: Word.TableCell = firstTableRow.cells.getFirst(); + firstCell.load(["horizontalAlignment", "verticalAlignment"]); + await context.sync(); + + console.log(`Details about the alignment of the first table's first cell:`, `- Horizontal alignment of the cell's content: ${firstCell.horizontalAlignment}`, `- Vertical alignment of the cell's content: ${firstCell.verticalAlignment}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified";' + return: + type: ' | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"' + - name: parentRow + uid: 'word!Word.TableCell#parentRow:member' + package: word! + fullName: parentRow + summary: Gets the parent row of the cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentRow: Word.TableRow;' + return: + type: '' + - name: parentTable + uid: 'word!Word.TableCell#parentTable:member' + package: word! + fullName: parentTable + summary: Gets the parent table of the cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTable: Word.Table;' + return: + type: '' + - name: rowIndex + uid: 'word!Word.TableCell#rowIndex:member' + package: word! + fullName: rowIndex + summary: Gets the index of the cell's row in the table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly rowIndex: number;' + return: + type: number + - name: shadingColor + uid: 'word!Word.TableCell#shadingColor:member' + package: word! + fullName: shadingColor + summary: 'Specifies the shading color of the cell. Color is specified in "\#RRGGBB" format or by using the color name.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'shadingColor: string;' + return: + type: string + - name: value + uid: 'word!Word.TableCell#value:member' + package: word! + fullName: value + summary: Specifies the text of the cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'value: string;' + return: + type: string + - name: verticalAlignment + uid: 'word!Word.TableCell#verticalAlignment:member' + package: word! + fullName: verticalAlignment + summary: 'Specifies the vertical alignment of the cell. The value can be ''Top'', ''Center'', or ''Bottom''.' + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets content alignment details about the first cell of the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + const firstTableRow: Word.TableRow = firstTable.rows.getFirst(); + const firstCell: Word.TableCell = firstTableRow.cells.getFirst(); + firstCell.load(["horizontalAlignment", "verticalAlignment"]); + await context.sync(); + + console.log(`Details about the alignment of the first table's first cell:`, `- Horizontal alignment of the cell's content: ${firstCell.horizontalAlignment}`, `- Vertical alignment of the cell's content: ${firstCell.verticalAlignment}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom";' + return: + type: ' | "Mixed" | "Top" | "Center" | "Bottom"' + - name: width + uid: 'word!Word.TableCell#width:member' + package: word! + fullName: width + summary: Gets the width of the cell in points. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly width: number;' + return: + type: number +methods: + - name: deleteColumn() + uid: 'word!Word.TableCell#deleteColumn:member(1)' + package: word! + fullName: deleteColumn() + summary: Deletes the column containing this cell. This is applicable to uniform tables. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'deleteColumn(): void;' + return: + type: void + description: '' + - name: deleteRow() + uid: 'word!Word.TableCell#deleteRow:member(1)' + package: word! + fullName: deleteRow() + summary: Deletes the row containing this cell. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'deleteRow(): void;' + return: + type: void + description: '' + - name: getBorder(borderLocation) + uid: 'word!Word.TableCell#getBorder:member(1)' + package: word! + fullName: getBorder(borderLocation) + summary: Gets the border style for the specified border. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getBorder(borderLocation: Word.BorderLocation): Word.TableBorder;' + parameters: + - id: borderLocation + description: Required. The border location. + type: '' + return: + type: '' + description: '' + - name: getBorder(borderLocationString) + uid: 'word!Word.TableCell#getBorder:member(2)' + package: word! + fullName: getBorder(borderLocationString) + summary: Gets the border style for the specified border. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets border details about the first of the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + const firstCell: Word.TableCell = firstTable.getCell(0, 0); + const borderLocation = "Left"; + const border: Word.TableBorder = firstCell.getBorder(borderLocation); + border.load(["type", "color", "width"]); + await context.sync(); + + console.log(`Details about the ${borderLocation} border of the first table's first cell:`, `- Color: ${border.color}`, `- Type: ${border.type}`, `- Width: ${border.width} points`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getBorder(borderLocationString: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | + "Inside" | "Outside" | "All"): Word.TableBorder; + parameters: + - id: borderLocationString + description: Required. The border location. + type: '"Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"' + return: + type: '' + description: '' + - name: getCellPadding(cellPaddingLocation) + uid: 'word!Word.TableCell#getCellPadding:member(1)' + package: word! + fullName: getCellPadding(cellPaddingLocation) + summary: Gets cell padding in points. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult;' + parameters: + - id: cellPaddingLocation + description: 'Required. The cell padding location must be ''Top'', ''Left'', ''Bottom'', or ''Right''.' + type: '' + return: + type: '<number>' + description: '' + - name: getCellPadding(cellPaddingLocationString) + uid: 'word!Word.TableCell#getCellPadding:member(2)' + package: word! + fullName: getCellPadding(cellPaddingLocationString) + summary: Gets cell padding in points. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets cell padding details about the first cell of the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + const firstCell: Word.TableCell = firstTable.getCell(0, 0); + const cellPaddingLocation = "Left"; + const cellPadding = firstCell.getCellPadding(cellPaddingLocation); + await context.sync(); + + console.log( + `Cell padding details about the ${cellPaddingLocation} border of the first table's first cell: ${cellPadding.value} points` + ); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getCellPadding(cellPaddingLocationString: "Top" | "Left" | "Bottom" | "Right"): + OfficeExtension.ClientResult; + parameters: + - id: cellPaddingLocationString + description: 'Required. The cell padding location must be ''Top'', ''Left'', ''Bottom'', or ''Right''.' + type: '"Top" | "Left" | "Bottom" | "Right"' + return: + type: '<number>' + description: '' + - name: getNext() + uid: 'word!Word.TableCell#getNext:member(1)' + package: word! + fullName: getNext() + summary: Gets the next cell. Throws an `ItemNotFound` error if this cell is the last one. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getNext(): Word.TableCell;' + return: + type: '' + description: '' + - name: getNextOrNullObject() + uid: 'word!Word.TableCell#getNextOrNullObject:member(1)' + package: word! + fullName: getNextOrNullObject() + summary: >- + Gets the next cell. If this cell is the last one, then this method will return an object with its `isNullObject` + property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getNextOrNullObject(): Word.TableCell;' + return: + type: '' + description: '' + - name: 'insertColumns(insertLocation, columnCount, values)' + uid: 'word!Word.TableCell#insertColumns:member(1)' + package: word! + fullName: 'insertColumns(insertLocation, columnCount, values)' + summary: >- + Adds columns to the left or right of the cell, using the cell's column as a template. This is applicable to + uniform tables. The string values, if specified, are set in the newly inserted rows. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + insertColumns(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", + columnCount: number, values?: string[][]): void; + parameters: + - id: insertLocation + description: Required. It must be 'Before' or 'After'. + type: >- + | + | "Before" | "After" + - id: columnCount + description: Required. Number of columns to add. + type: number + - id: values + description: Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + type: 'string[][]' + return: + type: void + description: '' + - name: 'insertRows(insertLocation, rowCount, values)' + uid: 'word!Word.TableCell#insertRows:member(1)' + package: word! + fullName: 'insertRows(insertLocation, rowCount, values)' + summary: >- + Inserts rows above or below the cell, using the cell's row as a template. The string values, if specified, are set + in the newly inserted rows. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + insertRows(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", + rowCount: number, values?: string[][]): Word.TableRowCollection; + parameters: + - id: insertLocation + description: Required. It must be 'Before' or 'After'. + type: >- + | + | "Before" | "After" + - id: rowCount + description: Required. Number of rows to add. + type: number + - id: values + description: Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + type: 'string[][]' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.TableCell#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.TableCellLoadOptions): Word.TableCell;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.TableCell#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.TableCell;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.TableCell#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.TableCell; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.TableCell#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.TableCellUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.TableCell#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.TableCell): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: 'setCellPadding(cellPaddingLocation, cellPadding)' + uid: 'word!Word.TableCell#setCellPadding:member(1)' + package: word! + fullName: 'setCellPadding(cellPaddingLocation, cellPadding)' + summary: Sets cell padding in points. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void;' + parameters: + - id: cellPaddingLocation + description: 'Required. The cell padding location must be ''Top'', ''Left'', ''Bottom'', or ''Right''.' + type: '' + - id: cellPadding + description: Required. The cell padding. + type: number + return: + type: void + description: '' + - name: 'setCellPadding(cellPaddingLocationString, cellPadding)' + uid: 'word!Word.TableCell#setCellPadding:member(2)' + package: word! + fullName: 'setCellPadding(cellPaddingLocationString, cellPadding)' + summary: Sets cell padding in points. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'setCellPadding(cellPaddingLocationString: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void;' + parameters: + - id: cellPaddingLocationString + description: 'Required. The cell padding location must be ''Top'', ''Left'', ''Bottom'', or ''Right''.' + type: '"Top" | "Left" | "Bottom" | "Right"' + - id: cellPadding + description: Required. The cell padding. + type: number + return: + type: void + description: '' + - name: 'split(rowCount, columnCount)' + uid: 'word!Word.TableCell#split:member(1)' + package: word! + fullName: 'split(rowCount, columnCount)' + summary: Splits the cell into the specified number of rows and columns. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'split(rowCount: number, columnCount: number): void;' + parameters: + - id: rowCount + description: Required. The number of rows to split into. Must be a divisor of the number of underlying rows. + type: number + - id: columnCount + description: Required. The number of columns to split into. + type: number + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.TableCell#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.TableCell` object is an API object, the `toJSON` method returns a plain + JavaScript object (typed as `Word.Interfaces.TableCellData`) that contains shallow copies of any loaded + child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.TableCellData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.TableCell#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.TableCell;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.TableCell#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.TableCell;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.tablecellcollection.yml b/docs/docs-ref-autogen/word_1_9/word/word.tablecellcollection.yml new file mode 100644 index 0000000000..0c6aa09f7f --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.tablecellcollection.yml @@ -0,0 +1,212 @@ +### YamlMime:TSType +name: Word.TableCellCollection +uid: 'word!Word.TableCellCollection:class' +package: word! +fullName: Word.TableCellCollection +summary: Contains the collection of the document's TableCell objects. +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets content alignment details about the first cell of the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + const firstTableRow: Word.TableRow = firstTable.rows.getFirst(); + const firstCell: Word.TableCell = firstTableRow.cells.getFirst(); + firstCell.load(["horizontalAlignment", "verticalAlignment"]); + await context.sync(); + + console.log(`Details about the alignment of the first table's first cell:`, `- Horizontal alignment of the cell's content: ${firstCell.horizontalAlignment}`, `- Vertical alignment of the cell's content: ${firstCell.verticalAlignment}`); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.TableCellCollection#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: items + uid: 'word!Word.TableCellCollection#items:member' + package: word! + fullName: items + summary: Gets the loaded child items in this collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly items: Word.TableCell[];' + return: + type: '[]' +methods: + - name: getFirst() + uid: 'word!Word.TableCellCollection#getFirst:member(1)' + package: word! + fullName: getFirst() + summary: Gets the first table cell in this collection. Throws an `ItemNotFound` error if this collection is empty. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFirst(): Word.TableCell;' + return: + type: '' + description: '' + - name: getFirstOrNullObject() + uid: 'word!Word.TableCellCollection#getFirstOrNullObject:member(1)' + package: word! + fullName: getFirstOrNullObject() + summary: >- + Gets the first table cell in this collection. If this collection is empty, then this method will return an object + with its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFirstOrNullObject(): Word.TableCell;' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.TableCellCollection#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: >- + load(options?: Word.Interfaces.TableCellCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): + Word.TableCellCollection; + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: >- + & + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.TableCellCollection#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.TableCellCollection;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.TableCellCollection#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableCellCollection;' + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: '' + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.TableCellCollection#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.TableCellCollection` object is an API object, the `toJSON` method + returns a plain JavaScript object (typed as `Word.Interfaces.TableCellCollectionData`) that contains an + "items" array with shallow copies of any loaded properties from the collection's items. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.TableCellCollectionData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.TableCellCollection#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.TableCellCollection;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.TableCellCollection#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.TableCellCollection;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.tablecollection.yml b/docs/docs-ref-autogen/word_1_9/word/word.tablecollection.yml new file mode 100644 index 0000000000..45616b5754 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.tablecollection.yml @@ -0,0 +1,233 @@ +### YamlMime:TSType +name: Word.TableCollection +uid: 'word!Word.TableCollection:class' +package: word! +fullName: Word.TableCollection +summary: Contains the collection of the document's Table objects. +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets alignment details about the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + firstTable.load(["alignment", "horizontalAlignment", "verticalAlignment"]); + await context.sync(); + + console.log(`Details about the alignment of the first table:`, `- Alignment of the table within the containing page column: ${firstTable.alignment}`, `- Horizontal alignment of every cell in the table: ${firstTable.horizontalAlignment}`, `- Vertical alignment of every cell in the table: ${firstTable.verticalAlignment}`); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.TableCollection#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: items + uid: 'word!Word.TableCollection#items:member' + package: word! + fullName: items + summary: Gets the loaded child items in this collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly items: Word.Table[];' + return: + type: '[]' +methods: + - name: getFirst() + uid: 'word!Word.TableCollection#getFirst:member(1)' + package: word! + fullName: getFirst() + summary: Gets the first table in this collection. Throws an `ItemNotFound` error if this collection is empty. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/table-cell-access.yaml + + + // Gets the content of the first cell in the first table. + + await Word.run(async (context) => { + const firstCell: Word.Body = context.document.body.tables.getFirst().getCell(0, 0).body; + firstCell.load("text"); + + await context.sync(); + console.log("First cell's text is: " + firstCell.text); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getFirst(): Word.Table;' + return: + type: '' + description: '' + - name: getFirstOrNullObject() + uid: 'word!Word.TableCollection#getFirstOrNullObject:member(1)' + package: word! + fullName: getFirstOrNullObject() + summary: >- + Gets the first table in this collection. If this collection is empty, then this method will return an object with + its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFirstOrNullObject(): Word.Table;' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.TableCollection#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: >- + load(options?: Word.Interfaces.TableCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): + Word.TableCollection; + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: >- + & + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.TableCollection#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.TableCollection;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.TableCollection#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableCollection;' + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: '' + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.TableCollection#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.TableCollection` object is an API object, the `toJSON` method returns a + plain JavaScript object (typed as `Word.Interfaces.TableCollectionData`) that contains an "items" array + with shallow copies of any loaded properties from the collection's items. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.TableCollectionData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.TableCollection#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.TableCollection;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.TableCollection#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.TableCollection;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.tablerow.yml b/docs/docs-ref-autogen/word_1_9/word/word.tablerow.yml new file mode 100644 index 0000000000..6741d841f9 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.tablerow.yml @@ -0,0 +1,751 @@ +### YamlMime:TSType +name: Word.TableRow +uid: 'word!Word.TableRow:class' +package: word! +fullName: Word.TableRow +summary: Represents a row in a Word document. +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets content alignment details about the first cell of the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + const firstTableRow: Word.TableRow = firstTable.rows.getFirst(); + const firstCell: Word.TableCell = firstTableRow.cells.getFirst(); + firstCell.load(["horizontalAlignment", "verticalAlignment"]); + await context.sync(); + + console.log(`Details about the alignment of the first table's first cell:`, `- Horizontal alignment of the cell's content: ${firstCell.horizontalAlignment}`, `- Vertical alignment of the cell's content: ${firstCell.verticalAlignment}`); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: cellCount + uid: 'word!Word.TableRow#cellCount:member' + package: word! + fullName: cellCount + summary: Gets the number of cells in the row. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly cellCount: number;' + return: + type: number + - name: cells + uid: 'word!Word.TableRow#cells:member' + package: word! + fullName: cells + summary: Gets cells. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets content alignment details about the first cell of the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + const firstTableRow: Word.TableRow = firstTable.rows.getFirst(); + const firstCell: Word.TableCell = firstTableRow.cells.getFirst(); + firstCell.load(["horizontalAlignment", "verticalAlignment"]); + await context.sync(); + + console.log(`Details about the alignment of the first table's first cell:`, `- Horizontal alignment of the cell's content: ${firstCell.horizontalAlignment}`, `- Vertical alignment of the cell's content: ${firstCell.verticalAlignment}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly cells: Word.TableCellCollection;' + return: + type: '' + - name: context + uid: 'word!Word.TableRow#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: endnotes + uid: 'word!Word.TableRow#endnotes:member' + package: word! + fullName: endnotes + summary: Gets the collection of endnotes in the table row. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly endnotes: Word.NoteItemCollection;' + return: + type: '' + - name: fields + uid: 'word!Word.TableRow#fields:member' + package: word! + fullName: fields + summary: Gets the collection of field objects in the table row. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly fields: Word.FieldCollection;' + return: + type: '' + - name: font + uid: 'word!Word.TableRow#font:member' + package: word! + fullName: font + summary: 'Gets the font. Use this to get and set font name, size, color, and other properties.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly font: Word.Font;' + return: + type: '' + - name: footnotes + uid: 'word!Word.TableRow#footnotes:member' + package: word! + fullName: footnotes + summary: Gets the collection of footnotes in the table row. + remarks: '\[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly footnotes: Word.NoteItemCollection;' + return: + type: '' + - name: horizontalAlignment + uid: 'word!Word.TableRow#horizontalAlignment:member' + package: word! + fullName: horizontalAlignment + summary: >- + Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or + 'Justified'. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified";' + return: + type: ' | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"' + - name: isHeader + uid: 'word!Word.TableRow#isHeader:member' + package: word! + fullName: isHeader + summary: >- + Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table + object. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly isHeader: boolean;' + return: + type: boolean + - name: parentTable + uid: 'word!Word.TableRow#parentTable:member' + package: word! + fullName: parentTable + summary: Gets parent table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly parentTable: Word.Table;' + return: + type: '' + - name: preferredHeight + uid: 'word!Word.TableRow#preferredHeight:member' + package: word! + fullName: preferredHeight + summary: Specifies the preferred height of the row in points. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'preferredHeight: number;' + return: + type: number + - name: rowIndex + uid: 'word!Word.TableRow#rowIndex:member' + package: word! + fullName: rowIndex + summary: Gets the index of the row in its parent table. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly rowIndex: number;' + return: + type: number + - name: shadingColor + uid: 'word!Word.TableRow#shadingColor:member' + package: word! + fullName: shadingColor + summary: 'Specifies the shading color. Color is specified in "\#RRGGBB" format or by using the color name.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'shadingColor: string;' + return: + type: string + - name: values + uid: 'word!Word.TableRow#values:member' + package: word! + fullName: values + summary: 'Specifies the text values in the row, as a 2D JavaScript array.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'values: string[][];' + return: + type: 'string[][]' + - name: verticalAlignment + uid: 'word!Word.TableRow#verticalAlignment:member' + package: word! + fullName: verticalAlignment + summary: 'Specifies the vertical alignment of the cells in the row. The value can be ''Top'', ''Center'', or ''Bottom''.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom";' + return: + type: ' | "Mixed" | "Top" | "Center" | "Bottom"' +methods: + - name: clear() + uid: 'word!Word.TableRow#clear:member(1)' + package: word! + fullName: clear() + summary: Clears the contents of the row. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'clear(): void;' + return: + type: void + description: '' + - name: delete() + uid: 'word!Word.TableRow#delete:member(1)' + package: word! + fullName: delete() + summary: Deletes the entire row. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'delete(): void;' + return: + type: void + description: '' + - name: getBorder(borderLocation) + uid: 'word!Word.TableRow#getBorder:member(1)' + package: word! + fullName: getBorder(borderLocation) + summary: Gets the border style of the cells in the row. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets border details about the first row of the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + const firstTableRow: Word.TableRow = firstTable.rows.getFirst(); + const borderLocation = Word.BorderLocation.bottom; + const border: Word.TableBorder = firstTableRow.getBorder(borderLocation); + border.load(["type", "color", "width"]); + await context.sync(); + + console.log(`Details about the ${borderLocation} border of the first table's first row:`, `- Color: ${border.color}`, `- Type: ${border.type}`, `- Width: ${border.width} points`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getBorder(borderLocation: Word.BorderLocation): Word.TableBorder;' + parameters: + - id: borderLocation + description: Required. The border location. + type: '' + return: + type: '' + description: '' + - name: getBorder(borderLocationString) + uid: 'word!Word.TableRow#getBorder:member(2)' + package: word! + fullName: getBorder(borderLocationString) + summary: Gets the border style of the cells in the row. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + getBorder(borderLocationString: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | + "Inside" | "Outside" | "All"): Word.TableBorder; + parameters: + - id: borderLocationString + description: Required. The border location. + type: '"Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"' + return: + type: '' + description: '' + - name: getCellPadding(cellPaddingLocation) + uid: 'word!Word.TableRow#getCellPadding:member(1)' + package: word! + fullName: getCellPadding(cellPaddingLocation) + summary: Gets cell padding in points. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets cell padding details about the first row of the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + const firstTableRow: Word.TableRow = firstTable.rows.getFirst(); + const cellPaddingLocation = Word.CellPaddingLocation.bottom; + const cellPadding = firstTableRow.getCellPadding(cellPaddingLocation); + await context.sync(); + + console.log( + `Cell padding details about the ${cellPaddingLocation} border of the first table's first row: ${cellPadding.value} points` + ); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult;' + parameters: + - id: cellPaddingLocation + description: 'Required. The cell padding location must be ''Top'', ''Left'', ''Bottom'', or ''Right''.' + type: '' + return: + type: '<number>' + description: '' + - name: getCellPadding(cellPaddingLocationString) + uid: 'word!Word.TableRow#getCellPadding:member(2)' + package: word! + fullName: getCellPadding(cellPaddingLocationString) + summary: Gets cell padding in points. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + getCellPadding(cellPaddingLocationString: "Top" | "Left" | "Bottom" | "Right"): + OfficeExtension.ClientResult; + parameters: + - id: cellPaddingLocationString + description: 'Required. The cell padding location must be ''Top'', ''Left'', ''Bottom'', or ''Right''.' + type: '"Top" | "Left" | "Bottom" | "Right"' + return: + type: '<number>' + description: '' + - name: getNext() + uid: 'word!Word.TableRow#getNext:member(1)' + package: word! + fullName: getNext() + summary: Gets the next row. Throws an `ItemNotFound` error if this row is the last one. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getNext(): Word.TableRow;' + return: + type: '' + description: '' + - name: getNextOrNullObject() + uid: 'word!Word.TableRow#getNextOrNullObject:member(1)' + package: word! + fullName: getNextOrNullObject() + summary: >- + Gets the next row. If this row is the last one, then this method will return an object with its `isNullObject` + property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getNextOrNullObject(): Word.TableRow;' + return: + type: '' + description: '' + - name: 'insertRows(insertLocation, rowCount, values)' + uid: 'word!Word.TableRow#insertRows:member(1)' + package: word! + fullName: 'insertRows(insertLocation, rowCount, values)' + summary: 'Inserts rows using this row as a template. If values are specified, inserts the values into the new rows.' + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: >- + insertRows(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", + rowCount: number, values?: string[][]): Word.TableRowCollection; + parameters: + - id: insertLocation + description: >- + Required. Where the new rows should be inserted, relative to the current row. It must be 'Before' or + 'After'. + type: >- + | + | "Before" | "After" + - id: rowCount + description: Required. Number of rows to add + type: number + - id: values + description: >- + Optional. Strings to insert in the new rows, specified as a 2D array. The number of cells in each row must + not exceed the number of cells in the existing row. + type: 'string[][]' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.TableRow#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.TableRowLoadOptions): Word.TableRow;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.TableRow#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.TableRow;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.TableRow#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.TableRow; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: merge() + uid: 'word!Word.TableRow#merge:member(1)' + package: word! + fullName: merge() + summary: Merges the row into one cell. + remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'merge(): Word.TableCell;' + return: + type: '' + description: '' + - name: 'search(searchText, searchOptions)' + uid: 'word!Word.TableRow#search:member(1)' + package: word! + fullName: 'search(searchText, searchOptions)' + summary: >- + Performs a search with the specified SearchOptions on the scope of the row. The search results are a collection of + range objects. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: |- + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + parameters: + - id: searchText + description: Required. The search text. + type: string + - id: searchOptions + description: Optional. Options for the search. + type: |- + | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + } + return: + type: '' + description: '' + - name: select(selectionMode) + uid: 'word!Word.TableRow#select:member(1)' + package: word! + fullName: select(selectionMode) + summary: Selects the row and navigates the Word UI to it. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'select(selectionMode?: Word.SelectionMode): void;' + parameters: + - id: selectionMode + description: 'Optional. The selection mode must be ''Select'', ''Start'', or ''End''. ''Select'' is the default.' + type: '' + return: + type: void + description: '' + - name: select(selectionModeString) + uid: 'word!Word.TableRow#select:member(2)' + package: word! + fullName: select(selectionModeString) + summary: Selects the row and navigates the Word UI to it. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'select(selectionModeString?: "Select" | "Start" | "End"): void;' + parameters: + - id: selectionModeString + description: 'Optional. The selection mode must be ''Select'', ''Start'', or ''End''. ''Select'' is the default.' + type: '"Select" | "Start" | "End"' + return: + type: void + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.TableRow#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.TableRowUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.TableRow#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.TableRow): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: 'setCellPadding(cellPaddingLocation, cellPadding)' + uid: 'word!Word.TableRow#setCellPadding:member(1)' + package: word! + fullName: 'setCellPadding(cellPaddingLocation, cellPadding)' + summary: Sets cell padding in points. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void;' + parameters: + - id: cellPaddingLocation + description: 'Required. The cell padding location must be ''Top'', ''Left'', ''Bottom'', or ''Right''.' + type: '' + - id: cellPadding + description: Required. The cell padding. + type: number + return: + type: void + description: '' + - name: 'setCellPadding(cellPaddingLocationString, cellPadding)' + uid: 'word!Word.TableRow#setCellPadding:member(2)' + package: word! + fullName: 'setCellPadding(cellPaddingLocationString, cellPadding)' + summary: Sets cell padding in points. + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'setCellPadding(cellPaddingLocationString: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void;' + parameters: + - id: cellPaddingLocationString + description: 'Required. The cell padding location must be ''Top'', ''Left'', ''Bottom'', or ''Right''.' + type: '"Top" | "Left" | "Bottom" | "Right"' + - id: cellPadding + description: Required. The cell padding. + type: number + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.TableRow#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.TableRow` object is an API object, the `toJSON` method returns a plain + JavaScript object (typed as `Word.Interfaces.TableRowData`) that contains shallow copies of any loaded + child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.TableRowData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.TableRow#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.TableRow;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.TableRow#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.TableRow;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.tablerowcollection.yml b/docs/docs-ref-autogen/word_1_9/word/word.tablerowcollection.yml new file mode 100644 index 0000000000..2acab0f3fc --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.tablerowcollection.yml @@ -0,0 +1,237 @@ +### YamlMime:TSType +name: Word.TableRowCollection +uid: 'word!Word.TableRowCollection:class' +package: word! +fullName: Word.TableRowCollection +summary: Contains the collection of the document's TableRow objects. +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets content alignment details about the first row of the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + const firstTableRow: Word.TableRow = firstTable.rows.getFirst(); + firstTableRow.load(["horizontalAlignment", "verticalAlignment"]); + await context.sync(); + + console.log(`Details about the alignment of the first table's first row:`, `- Horizontal alignment of every cell in the row: ${firstTableRow.horizontalAlignment}`, `- Vertical alignment of every cell in the row: ${firstTableRow.verticalAlignment}`); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.TableRowCollection#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: items + uid: 'word!Word.TableRowCollection#items:member' + package: word! + fullName: items + summary: Gets the loaded child items in this collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly items: Word.TableRow[];' + return: + type: '[]' +methods: + - name: getFirst() + uid: 'word!Word.TableRowCollection#getFirst:member(1)' + package: word! + fullName: getFirst() + summary: Gets the first row in this collection. Throws an `ItemNotFound` error if this collection is empty. + remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets border details about the first row of the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + const firstTableRow: Word.TableRow = firstTable.rows.getFirst(); + const borderLocation = Word.BorderLocation.bottom; + const border: Word.TableBorder = firstTableRow.getBorder(borderLocation); + border.load(["type", "color", "width"]); + await context.sync(); + + console.log(`Details about the ${borderLocation} border of the first table's first row:`, `- Color: ${border.color}`, `- Type: ${border.type}`, `- Width: ${border.width} points`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getFirst(): Word.TableRow;' + return: + type: '' + description: '' + - name: getFirstOrNullObject() + uid: 'word!Word.TableRowCollection#getFirstOrNullObject:member(1)' + package: word! + fullName: getFirstOrNullObject() + summary: >- + Gets the first row in this collection. If this collection is empty, then this method will return an object with + its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFirstOrNullObject(): Word.TableRow;' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.TableRowCollection#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: >- + load(options?: Word.Interfaces.TableRowCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): + Word.TableRowCollection; + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: >- + & + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.TableRowCollection#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.TableRowCollection;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.TableRowCollection#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableRowCollection;' + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: '' + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.TableRowCollection#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.TableRowCollection` object is an API object, the `toJSON` method returns + a plain JavaScript object (typed as `Word.Interfaces.TableRowCollectionData`) that contains an "items" + array with shallow copies of any loaded properties from the collection's items. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.TableRowCollectionData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.TableRowCollection#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.TableRowCollection;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.TableRowCollection#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.TableRowCollection;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.tablestyle.yml b/docs/docs-ref-autogen/word_1_9/word/word.tablestyle.yml new file mode 100644 index 0000000000..dff3c6f182 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.tablestyle.yml @@ -0,0 +1,294 @@ +### YamlMime:TSType +name: Word.TableStyle +uid: 'word!Word.TableStyle:class' +package: word! +fullName: Word.TableStyle +summary: Represents the TableStyle object. +remarks: >- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-custom-style.yaml + + + // Gets the table style properties and displays them in the form. + + const styleName = $("#style-name") + .val() + .toString(); + if (styleName == "") { + console.warn("Please input a table style name."); + return; + } + + + await Word.run(async (context) => { + const tableStyle: Word.TableStyle = context.document.getStyles().getByName(styleName).tableStyle; + tableStyle.load(); + await context.sync(); + + if (tableStyle.isNullObject) { + console.warn(`There's no existing table style with the name '${styleName}'.`); + return; + } + + console.log(tableStyle); + $("#alignment").val(tableStyle.alignment); + $("#allow-break-across-page").val(tableStyle.allowBreakAcrossPage.toString()); + $("#top-cell-margin").val(tableStyle.topCellMargin); + $("#bottom-cell-margin").val(tableStyle.bottomCellMargin); + $("#left-cell-margin").val(tableStyle.leftCellMargin); + $("#right-cell-margin").val(tableStyle.rightCellMargin); + $("#cell-spacing").val(tableStyle.cellSpacing); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: bottomCellMargin + uid: 'word!Word.TableStyle#bottomCellMargin:member' + package: word! + fullName: bottomCellMargin + summary: Specifies the amount of space to add between the contents and the bottom borders of the cells. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'bottomCellMargin: number;' + return: + type: number + - name: cellSpacing + uid: 'word!Word.TableStyle#cellSpacing:member' + package: word! + fullName: cellSpacing + summary: Specifies the spacing (in points) between the cells in a table style. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'cellSpacing: number;' + return: + type: number + - name: context + uid: 'word!Word.TableStyle#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: leftCellMargin + uid: 'word!Word.TableStyle#leftCellMargin:member' + package: word! + fullName: leftCellMargin + summary: Specifies the amount of space to add between the contents and the left borders of the cells. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'leftCellMargin: number;' + return: + type: number + - name: rightCellMargin + uid: 'word!Word.TableStyle#rightCellMargin:member' + package: word! + fullName: rightCellMargin + summary: Specifies the amount of space to add between the contents and the right borders of the cells. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'rightCellMargin: number;' + return: + type: number + - name: topCellMargin + uid: 'word!Word.TableStyle#topCellMargin:member' + package: word! + fullName: topCellMargin + summary: Specifies the amount of space to add between the contents and the top borders of the cells. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'topCellMargin: number;' + return: + type: number +methods: + - name: load(options) + uid: 'word!Word.TableStyle#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.TableStyleLoadOptions): Word.TableStyle;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.TableStyle#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.TableStyle;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.TableStyle#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.TableStyle; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.TableStyle#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.TableStyleUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.TableStyle#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.TableStyle): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.TableStyle#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.TableStyle` object is an API object, the `toJSON` method returns a plain + JavaScript object (typed as `Word.Interfaces.TableStyleData`) that contains shallow copies of any loaded + child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.TableStyleData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.TableStyle#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.TableStyle;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.TableStyle#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.TableStyle;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.trackedchange.yml b/docs/docs-ref-autogen/word_1_9/word/word.trackedchange.yml new file mode 100644 index 0000000000..f04bb52063 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.trackedchange.yml @@ -0,0 +1,420 @@ +### YamlMime:TSType +name: Word.TrackedChange +uid: 'word!Word.TrackedChange:class' +package: word! +fullName: Word.TrackedChange +summary: Represents a tracked change in a Word document. +remarks: >- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-tracked-changes.yaml + + + // Gets the next (second) tracked change. + + await Word.run(async (context) => { + const body: Word.Body = context.document.body; + const trackedChanges: Word.TrackedChangeCollection = body.getTrackedChanges(); + await context.sync(); + + const trackedChange: Word.TrackedChange = trackedChanges.getFirst(); + await context.sync(); + + const nextTrackedChange: Word.TrackedChange = trackedChange.getNext(); + await context.sync(); + + nextTrackedChange.load(["author", "date", "text", "type"]); + await context.sync(); + + console.log(nextTrackedChange); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: author + uid: 'word!Word.TrackedChange#author:member' + package: word! + fullName: author + summary: Gets the author of the tracked change. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly author: string;' + return: + type: string + - name: context + uid: 'word!Word.TrackedChange#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: date + uid: 'word!Word.TrackedChange#date:member' + package: word! + fullName: date + summary: Gets the date of the tracked change. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly date: Date;' + return: + type: Date + - name: text + uid: 'word!Word.TrackedChange#text:member' + package: word! + fullName: text + summary: Gets the text of the tracked change. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly text: string;' + return: + type: string + - name: type + uid: 'word!Word.TrackedChange#type:member' + package: word! + fullName: type + summary: Gets the type of the tracked change. + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly type: Word.TrackedChangeType | "None" | "Added" | "Deleted" | "Formatted";' + return: + type: ' | "None" | "Added" | "Deleted" | "Formatted"' +methods: + - name: accept() + uid: 'word!Word.TrackedChange#accept:member(1)' + package: word! + fullName: accept() + summary: Accepts the tracked change. + remarks: >- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-tracked-changes.yaml + + + // Accepts the first tracked change. + + await Word.run(async (context) => { + const body: Word.Body = context.document.body; + const trackedChanges: Word.TrackedChangeCollection = body.getTrackedChanges(); + const trackedChange: Word.TrackedChange = trackedChanges.getFirst(); + trackedChange.load(); + await context.sync(); + + console.log("First tracked change:", trackedChange); + trackedChange.accept(); + console.log("Accepted the first tracked change."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'accept(): void;' + return: + type: void + description: '' + - name: getNext() + uid: 'word!Word.TrackedChange#getNext:member(1)' + package: word! + fullName: getNext() + summary: Gets the next tracked change. Throws an `ItemNotFound` error if this tracked change is the last one. + remarks: >- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-tracked-changes.yaml + + + // Gets the next (second) tracked change. + + await Word.run(async (context) => { + const body: Word.Body = context.document.body; + const trackedChanges: Word.TrackedChangeCollection = body.getTrackedChanges(); + await context.sync(); + + const trackedChange: Word.TrackedChange = trackedChanges.getFirst(); + await context.sync(); + + const nextTrackedChange: Word.TrackedChange = trackedChange.getNext(); + await context.sync(); + + nextTrackedChange.load(["author", "date", "text", "type"]); + await context.sync(); + + console.log(nextTrackedChange); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getNext(): Word.TrackedChange;' + return: + type: '' + description: '' + - name: getNextOrNullObject() + uid: 'word!Word.TrackedChange#getNextOrNullObject:member(1)' + package: word! + fullName: getNextOrNullObject() + summary: >- + Gets the next tracked change. If this tracked change is the last one, then this method will return an object with + its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getNextOrNullObject(): Word.TrackedChange;' + return: + type: '' + description: '' + - name: getRange(rangeLocation) + uid: 'word!Word.TrackedChange#getRange:member(1)' + package: word! + fullName: getRange(rangeLocation) + summary: Gets the range of the tracked change. + remarks: >- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-tracked-changes.yaml + + + // Gets the range of the first tracked change. + + await Word.run(async (context) => { + const body: Word.Body = context.document.body; + const trackedChanges: Word.TrackedChangeCollection = body.getTrackedChanges(); + const trackedChange: Word.TrackedChange = trackedChanges.getFirst(); + await context.sync(); + + const range: Word.Range = trackedChange.getRange(); + range.load(); + await context.sync(); + + console.log("range.text: " + range.text); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | "Whole" + | "Start" | "End"): Word.Range; + parameters: + - id: rangeLocation + description: '' + type: >- + | | + | "Whole" | "Start" | "End" + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.TrackedChange#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.TrackedChangeLoadOptions): Word.TrackedChange;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.TrackedChange#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.TrackedChange;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.TrackedChange#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.TrackedChange; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: reject() + uid: 'word!Word.TrackedChange#reject:member(1)' + package: word! + fullName: reject() + summary: Rejects the tracked change. + remarks: >- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-tracked-changes.yaml + + + // Rejects the first tracked change. + + await Word.run(async (context) => { + const body: Word.Body = context.document.body; + const trackedChanges: Word.TrackedChangeCollection = body.getTrackedChanges(); + const trackedChange: Word.TrackedChange = trackedChanges.getFirst(); + trackedChange.load(); + await context.sync(); + + console.log("First tracked change:", trackedChange); + trackedChange.reject(); + console.log("Rejected the first tracked change."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'reject(): void;' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.TrackedChange#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.TrackedChange` object is an API object, the `toJSON` method returns a + plain JavaScript object (typed as `Word.Interfaces.TrackedChangeData`) that contains shallow copies of any + loaded child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.TrackedChangeData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.TrackedChange#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.TrackedChange;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.TrackedChange#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.TrackedChange;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.trackedchangecollection.yml b/docs/docs-ref-autogen/word_1_9/word/word.trackedchangecollection.yml new file mode 100644 index 0000000000..a4bcbe00ef --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.trackedchangecollection.yml @@ -0,0 +1,314 @@ +### YamlMime:TSType +name: Word.TrackedChangeCollection +uid: 'word!Word.TrackedChangeCollection:class' +package: word! +fullName: Word.TrackedChangeCollection +summary: 'Contains a collection of [Word.TrackedChange](xref:word!Word.TrackedChange:class) objects.' +remarks: >- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-tracked-changes.yaml + + + // Gets the range of the first tracked change. + + await Word.run(async (context) => { + const body: Word.Body = context.document.body; + const trackedChanges: Word.TrackedChangeCollection = body.getTrackedChanges(); + const trackedChange: Word.TrackedChange = trackedChanges.getFirst(); + await context.sync(); + + const range: Word.Range = trackedChange.getRange(); + range.load(); + await context.sync(); + + console.log("range.text: " + range.text); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.TrackedChangeCollection#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: items + uid: 'word!Word.TrackedChangeCollection#items:member' + package: word! + fullName: items + summary: Gets the loaded child items in this collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly items: Word.TrackedChange[];' + return: + type: '[]' +methods: + - name: acceptAll() + uid: 'word!Word.TrackedChangeCollection#acceptAll:member(1)' + package: word! + fullName: acceptAll() + summary: Accepts all the tracked changes in the collection. + remarks: >- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-tracked-changes.yaml + + + // Accepts all tracked changes. + + await Word.run(async (context) => { + const body: Word.Body = context.document.body; + const trackedChanges: Word.TrackedChangeCollection = body.getTrackedChanges(); + trackedChanges.acceptAll(); + console.log("Accepted all tracked changes."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'acceptAll(): void;' + return: + type: void + description: '' + - name: getFirst() + uid: 'word!Word.TrackedChangeCollection#getFirst:member(1)' + package: word! + fullName: getFirst() + summary: Gets the first TrackedChange in this collection. Throws an `ItemNotFound` error if this collection is empty. + remarks: >- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-tracked-changes.yaml + + + // Gets the range of the first tracked change. + + await Word.run(async (context) => { + const body: Word.Body = context.document.body; + const trackedChanges: Word.TrackedChangeCollection = body.getTrackedChanges(); + const trackedChange: Word.TrackedChange = trackedChanges.getFirst(); + await context.sync(); + + const range: Word.Range = trackedChange.getRange(); + range.load(); + await context.sync(); + + console.log("range.text: " + range.text); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getFirst(): Word.TrackedChange;' + return: + type: '' + description: '' + - name: getFirstOrNullObject() + uid: 'word!Word.TrackedChangeCollection#getFirstOrNullObject:member(1)' + package: word! + fullName: getFirstOrNullObject() + summary: >- + Gets the first TrackedChange in this collection. If this collection is empty, then this method will return an + object with its `isNullObject` property set to `true`. For further information, see [*OrNullObject + methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFirstOrNullObject(): Word.TrackedChange;' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.TrackedChangeCollection#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: >- + load(options?: Word.Interfaces.TrackedChangeCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): + Word.TrackedChangeCollection; + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: >- + & + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.TrackedChangeCollection#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.TrackedChangeCollection;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.TrackedChangeCollection#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TrackedChangeCollection;' + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: '' + return: + type: '' + description: '' + - name: rejectAll() + uid: 'word!Word.TrackedChangeCollection#rejectAll:member(1)' + package: word! + fullName: rejectAll() + summary: Rejects all the tracked changes in the collection. + remarks: >- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-tracked-changes.yaml + + + // Rejects all tracked changes. + + await Word.run(async (context) => { + const body: Word.Body = context.document.body; + const trackedChanges: Word.TrackedChangeCollection = body.getTrackedChanges(); + trackedChanges.rejectAll(); + console.log("Rejected all tracked changes."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'rejectAll(): void;' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.TrackedChangeCollection#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's + passed to it.) Whereas the original `Word.TrackedChangeCollection` object is an API object, the `toJSON` method + returns a plain JavaScript object (typed as `Word.Interfaces.TrackedChangeCollectionData`) that contains + an "items" array with shallow copies of any loaded properties from the collection's items. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.TrackedChangeCollectionData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.TrackedChangeCollection#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.TrackedChangeCollection;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.TrackedChangeCollection#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.TrackedChangeCollection;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.trackedchangetype.yml b/docs/docs-ref-autogen/word_1_9/word/word.trackedchangetype.yml new file mode 100644 index 0000000000..6cd49ea18a --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.trackedchangetype.yml @@ -0,0 +1,74 @@ +### YamlMime:TSEnum +name: Word.TrackedChangeType +uid: 'word!Word.TrackedChangeType:enum' +package: word! +fullName: Word.TrackedChangeType +summary: TrackedChange type. +remarks: >- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-tracked-changes.yaml + + + // Gets the next (second) tracked change. + + await Word.run(async (context) => { + const body: Word.Body = context.document.body; + const trackedChanges: Word.TrackedChangeCollection = body.getTrackedChanges(); + await context.sync(); + + const trackedChange: Word.TrackedChange = trackedChanges.getFirst(); + await context.sync(); + + const nextTrackedChange: Word.TrackedChange = trackedChange.getNext(); + await context.sync(); + + nextTrackedChange.load(["author", "date", "text", "type"]); + await context.sync(); + + console.log(nextTrackedChange); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: added + uid: 'word!Word.TrackedChangeType.added:member' + package: word! + summary: |- + Add change. + + * \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Added"' + - name: deleted + uid: 'word!Word.TrackedChangeType.deleted:member' + package: word! + summary: |- + Delete change. + + * \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Deleted"' + - name: formatted + uid: 'word!Word.TrackedChangeType.formatted:member' + package: word! + summary: |- + Format change. + + * \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Formatted"' + - name: none + uid: 'word!Word.TrackedChangeType.none:member' + package: word! + summary: |- + No revision. + + * \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"None"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.underlinetype.yml b/docs/docs-ref-autogen/word_1_9/word/word.underlinetype.yml new file mode 100644 index 0000000000..94310ac336 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.underlinetype.yml @@ -0,0 +1,172 @@ +### YamlMime:TSEnum +name: Word.UnderlineType +uid: 'word!Word.UnderlineType:enum' +package: word! +fullName: Word.UnderlineType +summary: The supported styles for underline format. +remarks: |- + \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Underline format text + // Run a batch operation against the Word object model. + await Word.run(async (context) => { + + // Create a range proxy object for the current selection. + const selection = context.document.getSelection(); + + // Queue a command to underline the current selection. + selection.font.underline = Word.UnderlineType.single; + + // Synchronize the document state by executing the queued commands, + // and return a promise to indicate task completion. + await context.sync(); + console.log('The selection now has an underline style.'); + }); + ``` +isPreview: false +isDeprecated: false +fields: + - name: dashLine + uid: 'word!Word.UnderlineType.dashLine:member' + package: word! + summary: |- + A single dash underline. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"DashLine"' + - name: dashLineHeavy + uid: 'word!Word.UnderlineType.dashLineHeavy:member' + package: word! + summary: '* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"DashLineHeavy"' + - name: dashLineLong + uid: 'word!Word.UnderlineType.dashLineLong:member' + package: word! + summary: '* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"DashLineLong"' + - name: dashLineLongHeavy + uid: 'word!Word.UnderlineType.dashLineLongHeavy:member' + package: word! + summary: '* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"DashLineLongHeavy"' + - name: dotDashLine + uid: 'word!Word.UnderlineType.dotDashLine:member' + package: word! + summary: |- + An alternating dot-dash underline. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"DotDashLine"' + - name: dotDashLineHeavy + uid: 'word!Word.UnderlineType.dotDashLineHeavy:member' + package: word! + summary: '* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"DotDashLineHeavy"' + - name: dotLine + uid: 'word!Word.UnderlineType.dotLine:member' + package: word! + summary: |- + Warning: dotLine has been deprecated. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"DotLine"' + - name: dotted + uid: 'word!Word.UnderlineType.dotted:member' + package: word! + summary: |- + A dotted underline. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Dotted"' + - name: dottedHeavy + uid: 'word!Word.UnderlineType.dottedHeavy:member' + package: word! + summary: '* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"DottedHeavy"' + - name: double + uid: 'word!Word.UnderlineType.double:member' + package: word! + summary: |- + A double underline. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Double"' + - name: hidden + uid: 'word!Word.UnderlineType.hidden:member' + package: word! + summary: |- + Warning: hidden has been deprecated. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Hidden"' + - name: mixed + uid: 'word!Word.UnderlineType.mixed:member' + package: word! + summary: '* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Mixed"' + - name: none + uid: 'word!Word.UnderlineType.none:member' + package: word! + summary: |- + No underline. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"None"' + - name: single + uid: 'word!Word.UnderlineType.single:member' + package: word! + summary: |- + A single underline. This is the default value. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Single"' + - name: thick + uid: 'word!Word.UnderlineType.thick:member' + package: word! + summary: |- + A single thick underline. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Thick"' + - name: twoDotDashLine + uid: 'word!Word.UnderlineType.twoDotDashLine:member' + package: word! + summary: |- + An alternating dot-dot-dash underline. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"TwoDotDashLine"' + - name: twoDotDashLineHeavy + uid: 'word!Word.UnderlineType.twoDotDashLineHeavy:member' + package: word! + summary: '* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"TwoDotDashLineHeavy"' + - name: wave + uid: 'word!Word.UnderlineType.wave:member' + package: word! + summary: |- + A single wavy underline. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Wave"' + - name: waveDouble + uid: 'word!Word.UnderlineType.waveDouble:member' + package: word! + summary: '* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"WaveDouble"' + - name: waveHeavy + uid: 'word!Word.UnderlineType.waveHeavy:member' + package: word! + summary: '* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"WaveHeavy"' + - name: word + uid: 'word!Word.UnderlineType.word:member' + package: word! + summary: |- + Only underline individual words. + + * \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Word"' diff --git a/docs/docs-ref-autogen/word_1_9/word/word.verticalalignment.yml b/docs/docs-ref-autogen/word_1_9/word/word.verticalalignment.yml new file mode 100644 index 0000000000..a62898eda7 --- /dev/null +++ b/docs/docs-ref-autogen/word_1_9/word/word.verticalalignment.yml @@ -0,0 +1,54 @@ +### YamlMime:TSEnum +name: Word.VerticalAlignment +uid: 'word!Word.VerticalAlignment:enum' +package: word! +fullName: Word.VerticalAlignment +summary: '' +remarks: >- + \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml + + + // Gets content alignment details about the first row of the first table in the document. + + await Word.run(async (context) => { + const firstTable: Word.Table = context.document.body.tables.getFirst(); + const firstTableRow: Word.TableRow = firstTable.rows.getFirst(); + firstTableRow.load(["horizontalAlignment", "verticalAlignment"]); + await context.sync(); + + console.log(`Details about the alignment of the first table's first row:`, `- Horizontal alignment of every cell in the row: ${firstTableRow.horizontalAlignment}`, `- Vertical alignment of every cell in the row: ${firstTableRow.verticalAlignment}`); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: bottom + uid: 'word!Word.VerticalAlignment.bottom:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Bottom"' + - name: center + uid: 'word!Word.VerticalAlignment.center:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Center"' + - name: mixed + uid: 'word!Word.VerticalAlignment.mixed:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Mixed"' + - name: top + uid: 'word!Word.VerticalAlignment.top:member' + package: word! + summary: '* \[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + value: '"Top"' diff --git a/docs/docs-ref-autogen/word_desktop_1_1/toc.yml b/docs/docs-ref-autogen/word_desktop_1_1/toc.yml index b74057bfe4..b43462e0e1 100644 --- a/docs/docs-ref-autogen/word_desktop_1_1/toc.yml +++ b/docs/docs-ref-autogen/word_desktop_1_1/toc.yml @@ -69,6 +69,8 @@ items: uid: 'word!Word.HeaderFooterType:enum' - name: ImageFormat uid: 'word!Word.ImageFormat:enum' + - name: ImportedStylesConflictBehavior + uid: 'word!Word.ImportedStylesConflictBehavior:enum' - name: InsertLocation uid: 'word!Word.InsertLocation:enum' - name: ListBuiltInNumberStyle @@ -1095,6 +1097,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/word_desktop_1_1/word.yml b/docs/docs-ref-autogen/word_desktop_1_1/word.yml index 7b91774846..b50d2b02c4 100644 --- a/docs/docs-ref-autogen/word_desktop_1_1/word.yml +++ b/docs/docs-ref-autogen/word_desktop_1_1/word.yml @@ -29,6 +29,7 @@ enums: - 'word!Word.FieldType:enum' - 'word!Word.HeaderFooterType:enum' - 'word!Word.ImageFormat:enum' + - 'word!Word.ImportedStylesConflictBehavior:enum' - 'word!Word.InsertLocation:enum' - 'word!Word.ListBuiltInNumberStyle:enum' - 'word!Word.ListBullet:enum' @@ -144,6 +145,7 @@ interfaces: - 'word!Word.Interfaces.CheckboxContentControlLoadOptions:interface' - 'word!Word.Interfaces.CheckboxContentControlUpdateData:interface' - 'word!Word.Interfaces.CollectionLoadOptions:interface' + - 'word!Word.Interfaces.ComboBoxContentControlData:interface' - 'word!Word.Interfaces.CommentCollectionData:interface' - 'word!Word.Interfaces.CommentCollectionLoadOptions:interface' - 'word!Word.Interfaces.CommentCollectionUpdateData:interface' @@ -163,6 +165,10 @@ interfaces: - 'word!Word.Interfaces.ContentControlCollectionLoadOptions:interface' - 'word!Word.Interfaces.ContentControlCollectionUpdateData:interface' - 'word!Word.Interfaces.ContentControlData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' + - 'word!Word.Interfaces.ContentControlListItemData:interface' + - 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' - 'word!Word.Interfaces.ContentControlLoadOptions:interface' - 'word!Word.Interfaces.ContentControlUpdateData:interface' - 'word!Word.Interfaces.CritiqueAnnotationData:interface' @@ -190,6 +196,7 @@ interfaces: - 'word!Word.Interfaces.DocumentPropertiesLoadOptions:interface' - 'word!Word.Interfaces.DocumentPropertiesUpdateData:interface' - 'word!Word.Interfaces.DocumentUpdateData:interface' + - 'word!Word.Interfaces.DropDownListContentControlData:interface' - 'word!Word.Interfaces.FieldCollectionData:interface' - 'word!Word.Interfaces.FieldCollectionLoadOptions:interface' - 'word!Word.Interfaces.FieldCollectionUpdateData:interface' diff --git a/docs/docs-ref-autogen/word_desktop_1_1/word/word.body.yml b/docs/docs-ref-autogen/word_desktop_1_1/word/word.body.yml index da8819a964..f47a299085 100644 --- a/docs/docs-ref-autogen/word_desktop_1_1/word/word.body.yml +++ b/docs/docs-ref-autogen/word_desktop_1_1/word/word.body.yml @@ -1037,7 +1037,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1072,16 +1072,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_desktop_1_1/word/word.contentcontrol.yml b/docs/docs-ref-autogen/word_desktop_1_1/word/word.contentcontrol.yml index c060655104..abef410a0f 100644 --- a/docs/docs-ref-autogen/word_desktop_1_1/word/word.contentcontrol.yml +++ b/docs/docs-ref-autogen/word_desktop_1_1/word/word.contentcontrol.yml @@ -114,7 +114,7 @@ properties: uid: 'word!Word.ContentControl#checkboxContentControl:member' package: word! fullName: checkboxContentControl - summary: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + summary: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. remarks: >- \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] diff --git a/docs/docs-ref-autogen/word_desktop_1_1/word/word.contentcontroloptions.yml b/docs/docs-ref-autogen/word_desktop_1_1/word/word.contentcontroloptions.yml index 6378ac8d30..d7b0a8acd7 100644 --- a/docs/docs-ref-autogen/word_desktop_1_1/word/word.contentcontroloptions.yml +++ b/docs/docs-ref-autogen/word_desktop_1_1/word/word.contentcontroloptions.yml @@ -64,11 +64,15 @@ properties: uid: 'word!Word.ContentControlOptions#types:member' package: word! fullName: types - summary: 'An array of content control types, item must be ''RichText'', ''PlainText'', or ''CheckBox''.' - remarks: |- + summary: >- + An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. + remarks: >- \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] - Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + + Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. 'DropDownList' + and 'ComboBox' support was added in WordApi 1.9. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/word_desktop_1_1/word/word.document.yml b/docs/docs-ref-autogen/word_desktop_1_1/word/word.document.yml index c0247519d9..3ca06b211a 100644 --- a/docs/docs-ref-autogen/word_desktop_1_1/word/word.document.yml +++ b/docs/docs-ref-autogen/word_desktop_1_1/word/word.document.yml @@ -731,15 +731,18 @@ methods: return: type: '' description: '' - - name: importStylesFromJson(stylesJson) + - name: 'importStylesFromJson(stylesJson, importedStylesConflictBehavior)' uid: 'word!Word.Document#importStylesFromJson:member(1)' package: word! - fullName: importStylesFromJson(stylesJson) + fullName: 'importStylesFromJson(stylesJson, importedStylesConflictBehavior)' summary: Import styles from a JSON-formatted string. remarks: >- \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + + #### Examples @@ -763,11 +766,45 @@ methods: isPreview: false isDeprecated: false syntax: - content: 'importStylesFromJson(stylesJson: string): OfficeExtension.ClientResult;' + content: >- + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): + OfficeExtension.ClientResult; parameters: - id: stylesJson description: Required. A JSON-formatted string representing the styles. type: string + - id: importedStylesConflictBehavior + description: >- + Optional. Specifies how to handle any imported styles with the same name as existing styles in the current + document. + type: '' + return: + type: '<string[]>' + description: '' + - name: 'importStylesFromJson(stylesJson, importedStylesConflictBehaviorString)' + uid: 'word!Word.Document#importStylesFromJson:member(2)' + package: word! + fullName: 'importStylesFromJson(stylesJson, importedStylesConflictBehaviorString)' + summary: Import styles from a JSON-formatted string. + remarks: |- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + isPreview: false + isDeprecated: false + syntax: + content: >- + importStylesFromJson(stylesJson: string, importedStylesConflictBehaviorString?: "Ignore" | "Overwrite" | + "CreateNew"): OfficeExtension.ClientResult; + parameters: + - id: stylesJson + description: Required. A JSON-formatted string representing the styles. + type: string + - id: importedStylesConflictBehaviorString + description: >- + Optional. Specifies how to handle any imported styles with the same name as existing styles in the current + document. + type: '"Ignore" | "Overwrite" | "CreateNew"' return: type: '<string[]>' description: '' diff --git a/docs/docs-ref-autogen/word_desktop_1_1/word/word.importedstylesconflictbehavior.yml b/docs/docs-ref-autogen/word_desktop_1_1/word/word.importedstylesconflictbehavior.yml new file mode 100644 index 0000000000..82c90238f7 --- /dev/null +++ b/docs/docs-ref-autogen/word_desktop_1_1/word/word.importedstylesconflictbehavior.yml @@ -0,0 +1,38 @@ +### YamlMime:TSEnum +name: Word.ImportedStylesConflictBehavior +uid: 'word!Word.ImportedStylesConflictBehavior:enum' +package: word! +fullName: Word.ImportedStylesConflictBehavior +summary: >- + Specifies how to handle any conflicts, that is, when imported styles have the same name as existing styles in the + current document. +remarks: '\[ [API set: WordApiDesktop 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +fields: + - name: createNew + uid: 'word!Word.ImportedStylesConflictBehavior.createNew:member' + package: word! + summary: >- + Rename conflicting imported styles so that both versions are kept in the current document. For example, if MyStyle + already exists in the document, then the imported version could be added as MyStyle1. + + + * \[ [API set: WordApiDesktop 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"CreateNew"' + - name: ignore + uid: 'word!Word.ImportedStylesConflictBehavior.ignore:member' + package: word! + summary: |- + Ignore conflicting imported styles and keep the existing version of those styles in the current document. + + * \[ [API set: WordApiDesktop 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Ignore"' + - name: overwrite + uid: 'word!Word.ImportedStylesConflictBehavior.overwrite:member' + package: word! + summary: |- + Overwrite the existing styles in the current document. + + * \[ [API set: WordApiDesktop 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + value: '"Overwrite"' diff --git a/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.comboboxcontentcontroldata.yml b/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.comboboxcontentcontroldata.yml new file mode 100644 index 0000000000..6032dbb944 --- /dev/null +++ b/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.comboboxcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ComboBoxContentControlData +uid: 'word!Word.Interfaces.ComboBoxContentControlData:interface' +package: word! +fullName: Word.Interfaces.ComboBoxContentControlData +summary: An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrolcollectionloadoptions.yml b/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrolcollectionloadoptions.yml index e4d5e7eb32..91ad1b9984 100644 --- a/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrolcollectionloadoptions.yml +++ b/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrolcollectionloadoptions.yml @@ -74,8 +74,8 @@ properties: package: word! fullName: checkboxContentControl summary: >- - For EACH ITEM in the collection: Specifies the checkbox-related data if the content control's type is 'CheckBox'. - It's `null` otherwise. + For EACH ITEM in the collection: Gets the data of the content control when its type is 'CheckBox'. It's `null` + otherwise. remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontroldata.yml b/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontroldata.yml index 70ba44c6e0..dc4b96ea8d 100644 --- a/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontroldata.yml +++ b/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontroldata.yml @@ -51,7 +51,7 @@ properties: uid: 'word!Word.Interfaces.ContentControlData#checkboxContentControl:member' package: word! fullName: checkboxContentControl - summary: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + summary: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrollistitemcollectiondata.yml b/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrollistitemcollectiondata.yml new file mode 100644 index 0000000000..75af720340 --- /dev/null +++ b/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrollistitemcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionData +summary: An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml b/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml new file mode 100644 index 0000000000..e22526b0d5 --- /dev/null +++ b/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionUpdateData +summary: >- + An interface for updating data on the `ContentControlListItemCollection` object, for use in + `contentControlListItemCollection.set({ ... })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrollistitemdata.yml b/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrollistitemdata.yml new file mode 100644 index 0000000000..b14d4ec6c2 --- /dev/null +++ b/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrollistitemdata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemData +uid: 'word!Word.Interfaces.ContentControlListItemData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemData +summary: An interface describing the data returned by calling `contentControlListItem.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrollistitemupdatedata.yml b/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrollistitemupdatedata.yml new file mode 100644 index 0000000000..94e73591c6 --- /dev/null +++ b/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrollistitemupdatedata.yml @@ -0,0 +1,12 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemUpdateData +summary: >- + An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... + })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrolloadoptions.yml b/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrolloadoptions.yml index 781dc0c5f9..2b497a9074 100644 --- a/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrolloadoptions.yml +++ b/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrolloadoptions.yml @@ -68,7 +68,7 @@ properties: uid: 'word!Word.Interfaces.ContentControlLoadOptions#checkboxContentControl:member' package: word! fullName: checkboxContentControl - summary: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + summary: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrolupdatedata.yml b/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrolupdatedata.yml index cb78a93109..001ea1bf3d 100644 --- a/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrolupdatedata.yml +++ b/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.contentcontrolupdatedata.yml @@ -51,7 +51,7 @@ properties: uid: 'word!Word.Interfaces.ContentControlUpdateData#checkboxContentControl:member' package: word! fullName: checkboxContentControl - summary: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + summary: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.dropdownlistcontentcontroldata.yml b/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.dropdownlistcontentcontroldata.yml new file mode 100644 index 0000000000..0802e15d92 --- /dev/null +++ b/docs/docs-ref-autogen/word_desktop_1_1/word/word.interfaces.dropdownlistcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.DropDownListContentControlData +uid: 'word!Word.Interfaces.DropDownListContentControlData:interface' +package: word! +fullName: Word.Interfaces.DropDownListContentControlData +summary: An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_desktop_1_1/word/word.paragraph.yml b/docs/docs-ref-autogen/word_desktop_1_1/word/word.paragraph.yml index f9ef7a17be..e4b6d672c6 100644 --- a/docs/docs-ref-autogen/word_desktop_1_1/word/word.paragraph.yml +++ b/docs/docs-ref-autogen/word_desktop_1_1/word/word.paragraph.yml @@ -1509,7 +1509,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1580,16 +1580,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_desktop_1_1/word/word.range.yml b/docs/docs-ref-autogen/word_desktop_1_1/word/word.range.yml index 2e34aeb8b1..bc9e7dfb54 100644 --- a/docs/docs-ref-autogen/word_desktop_1_1/word/word.range.yml +++ b/docs/docs-ref-autogen/word_desktop_1_1/word/word.range.yml @@ -998,7 +998,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Places a dropdown list content control at the end of the selection. @@ -1307,7 +1307,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1353,16 +1353,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_online/toc.yml b/docs/docs-ref-autogen/word_online/toc.yml index 915b8d6a1e..ffece68a0f 100644 --- a/docs/docs-ref-autogen/word_online/toc.yml +++ b/docs/docs-ref-autogen/word_online/toc.yml @@ -113,6 +113,8 @@ items: uid: 'word!Word.Body:class' - name: CheckboxContentControl uid: 'word!Word.CheckboxContentControl:class' + - name: ComboBoxContentControl + uid: 'word!Word.ComboBoxContentControl:class' - name: Comment uid: 'word!Word.Comment:class' - name: CommentCollection @@ -137,6 +139,10 @@ items: uid: 'word!Word.ContentControlEnteredEventArgs:interface' - name: ContentControlExitedEventArgs uid: 'word!Word.ContentControlExitedEventArgs:interface' + - name: ContentControlListItem + uid: 'word!Word.ContentControlListItem:class' + - name: ContentControlListItemCollection + uid: 'word!Word.ContentControlListItemCollection:class' - name: ContentControlOptions uid: 'word!Word.ContentControlOptions:interface' - name: ContentControlSelectionChangedEventArgs @@ -163,6 +169,8 @@ items: uid: 'word!Word.DocumentCreated:class' - name: DocumentProperties uid: 'word!Word.DocumentProperties:class' + - name: DropDownListContentControl + uid: 'word!Word.DropDownListContentControl:class' - name: Field uid: 'word!Word.Field:class' - name: FieldCollection @@ -1071,6 +1079,9 @@ items: href: >- ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/docs-ref-autogen/word_online/word.yml b/docs/docs-ref-autogen/word_online/word.yml index 8459d72509..ed3b1b45e3 100644 --- a/docs/docs-ref-autogen/word_online/word.yml +++ b/docs/docs-ref-autogen/word_online/word.yml @@ -46,6 +46,7 @@ classes: - 'word!Word.Application:class' - 'word!Word.Body:class' - 'word!Word.CheckboxContentControl:class' + - 'word!Word.ComboBoxContentControl:class' - 'word!Word.Comment:class' - 'word!Word.CommentCollection:class' - 'word!Word.CommentContentRange:class' @@ -53,6 +54,8 @@ classes: - 'word!Word.CommentReplyCollection:class' - 'word!Word.ContentControl:class' - 'word!Word.ContentControlCollection:class' + - 'word!Word.ContentControlListItem:class' + - 'word!Word.ContentControlListItemCollection:class' - 'word!Word.CritiqueAnnotation:class' - 'word!Word.CustomProperty:class' - 'word!Word.CustomPropertyCollection:class' @@ -62,6 +65,7 @@ classes: - 'word!Word.Document:class' - 'word!Word.DocumentCreated:class' - 'word!Word.DocumentProperties:class' + - 'word!Word.DropDownListContentControl:class' - 'word!Word.Field:class' - 'word!Word.FieldCollection:class' - 'word!Word.Font:class' @@ -130,6 +134,7 @@ interfaces: - 'word!Word.Interfaces.CheckboxContentControlLoadOptions:interface' - 'word!Word.Interfaces.CheckboxContentControlUpdateData:interface' - 'word!Word.Interfaces.CollectionLoadOptions:interface' + - 'word!Word.Interfaces.ComboBoxContentControlData:interface' - 'word!Word.Interfaces.CommentCollectionData:interface' - 'word!Word.Interfaces.CommentCollectionLoadOptions:interface' - 'word!Word.Interfaces.CommentCollectionUpdateData:interface' @@ -149,6 +154,12 @@ interfaces: - 'word!Word.Interfaces.ContentControlCollectionLoadOptions:interface' - 'word!Word.Interfaces.ContentControlCollectionUpdateData:interface' - 'word!Word.Interfaces.ContentControlData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionLoadOptions:interface' + - 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' + - 'word!Word.Interfaces.ContentControlListItemData:interface' + - 'word!Word.Interfaces.ContentControlListItemLoadOptions:interface' + - 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' - 'word!Word.Interfaces.ContentControlLoadOptions:interface' - 'word!Word.Interfaces.ContentControlUpdateData:interface' - 'word!Word.Interfaces.CritiqueAnnotationData:interface' @@ -176,6 +187,7 @@ interfaces: - 'word!Word.Interfaces.DocumentPropertiesLoadOptions:interface' - 'word!Word.Interfaces.DocumentPropertiesUpdateData:interface' - 'word!Word.Interfaces.DocumentUpdateData:interface' + - 'word!Word.Interfaces.DropDownListContentControlData:interface' - 'word!Word.Interfaces.FieldCollectionData:interface' - 'word!Word.Interfaces.FieldCollectionLoadOptions:interface' - 'word!Word.Interfaces.FieldCollectionUpdateData:interface' diff --git a/docs/docs-ref-autogen/word_online/word/word.body.yml b/docs/docs-ref-autogen/word_online/word/word.body.yml index da8819a964..f47a299085 100644 --- a/docs/docs-ref-autogen/word_online/word/word.body.yml +++ b/docs/docs-ref-autogen/word_online/word/word.body.yml @@ -1037,7 +1037,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1072,16 +1072,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_online/word/word.comboboxcontentcontrol.yml b/docs/docs-ref-autogen/word_online/word/word.comboboxcontentcontrol.yml new file mode 100644 index 0000000000..0424349a8c --- /dev/null +++ b/docs/docs-ref-autogen/word_online/word/word.comboboxcontentcontrol.yml @@ -0,0 +1,357 @@ +### YamlMime:TSType +name: Word.ComboBoxContentControl +uid: 'word!Word.ComboBoxContentControl:class' +package: word! +fullName: Word.ComboBoxContentControl +summary: The data specific to content controls of type 'ComboBox'. +remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml + + + // Places a combo box content control at the end of the selection. + + await Word.run(async (context) => { + let selection = context.document.getSelection(); + selection.getRange(Word.RangeLocation.end).insertContentControl(Word.ContentControlType.comboBox); + await context.sync(); + + console.log("Combo box content control inserted at the end of the selection."); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.ComboBoxContentControl#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: listItems + uid: 'word!Word.ComboBoxContentControl#listItems:member' + package: word! + fullName: listItems + summary: Gets the collection of list items in the combo box content control. + remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml + + + // Deletes the provided list item from the first combo box content control in the selection. + + await Word.run(async (context) => { + const listItemText = $("#item-to-delete") + .val() + .toString() + .trim(); + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.comboBox] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,comboBoxContentControl"); + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,comboBoxContentControl"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.comboBox) { + console.warn("No combo box content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + let selectedComboBox: Word.ComboBoxContentControl = selectedContentControl.comboBoxContentControl; + selectedComboBox.listItems.load("items/*"); + await context.sync(); + + let listItems: Word.ContentControlListItemCollection = selectedContentControl.comboBoxContentControl.listItems; + let itemToDelete: Word.ContentControlListItem = listItems.items.find((item) => item.displayText === listItemText); + if (!itemToDelete) { + console.warn(`List item doesn't exist in control with ID ${selectedContentControl.id}: ${listItemText}`); + return; + } + + itemToDelete.delete(); + await context.sync(); + + console.log(`List item deleted from control with ID ${selectedContentControl.id}: ${listItemText}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly listItems: Word.ContentControlListItemCollection;' + return: + type: '' +methods: + - name: 'addListItem(displayText, value, index)' + uid: 'word!Word.ComboBoxContentControl#addListItem:member(1)' + package: word! + fullName: 'addListItem(displayText, value, index)' + summary: >- + Adds a new list item to this combo box content control and returns a + [Word.ContentControlListItem](xref:word!Word.ContentControlListItem:class) object. + remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml + + + // Adds the provided list item to the first combo box content control in the selection. + + await Word.run(async (context) => { + const listItemText = $("#item-to-add") + .val() + .toString() + .trim(); + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.comboBox] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,comboBoxContentControl"); + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,comboBoxContentControl"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.comboBox) { + console.warn("No combo box content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + selectedContentControl.comboBoxContentControl.addListItem(listItemText); + await context.sync(); + + console.log(`List item added to control with ID ${selectedContentControl.id}: ${listItemText}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem;' + parameters: + - id: displayText + description: Required. Display text of the list item. + type: string + - id: value + description: Optional. Value of the list item. + type: string + - id: index + description: >- + Optional. Index location of the new item in the list. If an item exists at the position specified, the + existing item is pushed down in the list. If omitted, the new item is added to the end of the list. + type: number + return: + type: '' + description: '' + - name: deleteAllListItems() + uid: 'word!Word.ComboBoxContentControl#deleteAllListItems:member(1)' + package: word! + fullName: deleteAllListItems() + summary: Deletes all list items in this combo box content control. + remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml + + + // Deletes the list items from first combo box content control found in the selection. + + await Word.run(async (context) => { + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.comboBox] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,comboBoxContentControl"); + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,comboBoxContentControl"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.comboBox) { + console.warn("No combo box content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + console.log(`About to delete the list from the combo box content control with ID ${selectedContentControl.id}`); + selectedContentControl.comboBoxContentControl.deleteAllListItems(); + await context.sync(); + + console.log("Deleted the list from the combo box content control."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'deleteAllListItems(): void;' + return: + type: void + description: '' + - name: load(propertyNames) + uid: 'word!Word.ComboBoxContentControl#load:member(1)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.ComboBoxContentControl;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.ComboBoxContentControl#load:member(2)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ComboBoxContentControl; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.ComboBoxContentControl#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is + passed to it.) Whereas the original `Word.ComboBoxContentControl` object is an API object, the `toJSON` method + returns a plain JavaScript object (typed as `Word.Interfaces.ComboBoxContentControlData`) that contains + shallow copies of any loaded child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.ComboBoxContentControlData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.ComboBoxContentControl#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.ComboBoxContentControl;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.ComboBoxContentControl#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.ComboBoxContentControl;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_online/word/word.contentcontrol.yml b/docs/docs-ref-autogen/word_online/word/word.contentcontrol.yml index c060655104..a77f0aa299 100644 --- a/docs/docs-ref-autogen/word_online/word/word.contentcontrol.yml +++ b/docs/docs-ref-autogen/word_online/word/word.contentcontrol.yml @@ -114,7 +114,7 @@ properties: uid: 'word!Word.ContentControl#checkboxContentControl:member' package: word! fullName: checkboxContentControl - summary: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + summary: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. remarks: >- \[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] @@ -185,6 +185,66 @@ properties: content: 'color: string;' return: type: string + - name: comboBoxContentControl + uid: 'word!Word.ContentControl#comboBoxContentControl:member' + package: word! + fullName: comboBoxContentControl + summary: Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. + remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml + + + // Adds the provided list item to the first combo box content control in the selection. + + await Word.run(async (context) => { + const listItemText = $("#item-to-add") + .val() + .toString() + .trim(); + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.comboBox] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,comboBoxContentControl"); + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,comboBoxContentControl"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.comboBox) { + console.warn("No combo box content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + selectedContentControl.comboBoxContentControl.addListItem(listItemText); + await context.sync(); + + console.log(`List item added to control with ID ${selectedContentControl.id}: ${listItemText}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly comboBoxContentControl: Word.ComboBoxContentControl;' + return: + type: '' - name: contentControls uid: 'word!Word.ContentControl#contentControls:member' package: word! @@ -211,6 +271,66 @@ properties: content: 'context: RequestContext;' return: type: '' + - name: dropDownListContentControl + uid: 'word!Word.ContentControl#dropDownListContentControl:member' + package: word! + fullName: dropDownListContentControl + summary: Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. + remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml + + + // Adds the provided list item to the first dropdown list content control in the selection. + + await Word.run(async (context) => { + const listItemText = $("#item-to-add") + .val() + .toString() + .trim(); + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.dropDownList] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,dropDownListContentControl"); + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,dropDownListContentControl"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.dropDownList) { + console.warn("No dropdown list content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + selectedContentControl.dropDownListContentControl.addListItem(listItemText); + await context.sync(); + + console.log(`List item added to control with ID ${selectedContentControl.id}: ${listItemText}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly dropDownListContentControl: Word.DropDownListContentControl;' + return: + type: '' - name: endnotes uid: 'word!Word.ContentControl#endnotes:member' package: word! diff --git a/docs/docs-ref-autogen/word_online/word/word.contentcontrollistitem.yml b/docs/docs-ref-autogen/word_online/word/word.contentcontrollistitem.yml new file mode 100644 index 0000000000..167fd38ad8 --- /dev/null +++ b/docs/docs-ref-autogen/word_online/word/word.contentcontrollistitem.yml @@ -0,0 +1,429 @@ +### YamlMime:TSType +name: Word.ContentControlListItem +uid: 'word!Word.ContentControlListItem:class' +package: word! +fullName: Word.ContentControlListItem +summary: Represents a list item in a dropdown list or combo box content control. +remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml + + + // Deletes the provided list item from the first dropdown list content control in the selection. + + await Word.run(async (context) => { + const listItemText = $("#item-to-delete") + .val() + .toString() + .trim(); + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.dropDownList] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,dropDownListContentControl"); + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,dropDownListContentControl"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.dropDownList) { + console.warn("No dropdown list content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + let selectedDropdownList: Word.DropDownListContentControl = selectedContentControl.dropDownListContentControl; + selectedDropdownList.listItems.load("items/*"); + await context.sync(); + + let listItems: Word.ContentControlListItemCollection = selectedContentControl.dropDownListContentControl.listItems; + let itemToDelete: Word.ContentControlListItem = listItems.items.find((item) => item.displayText === listItemText); + if (!itemToDelete) { + console.warn(`List item doesn't exist in control with ID ${selectedContentControl.id}: ${listItemText}`) + return; + } + + itemToDelete.delete(); + await context.sync(); + + console.log(`List item deleted from control with ID ${selectedContentControl.id}: ${listItemText}`); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.ContentControlListItem#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: displayText + uid: 'word!Word.ContentControlListItem#displayText:member' + package: word! + fullName: displayText + summary: Specifies the display text of a list item for a dropdown list or combo box content control. + remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml + + + // Deletes the provided list item from the first dropdown list content control in the selection. + + await Word.run(async (context) => { + const listItemText = $("#item-to-delete") + .val() + .toString() + .trim(); + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.dropDownList] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,dropDownListContentControl"); + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,dropDownListContentControl"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.dropDownList) { + console.warn("No dropdown list content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + let selectedDropdownList: Word.DropDownListContentControl = selectedContentControl.dropDownListContentControl; + selectedDropdownList.listItems.load("items/*"); + await context.sync(); + + let listItems: Word.ContentControlListItemCollection = selectedContentControl.dropDownListContentControl.listItems; + let itemToDelete: Word.ContentControlListItem = listItems.items.find((item) => item.displayText === listItemText); + if (!itemToDelete) { + console.warn(`List item doesn't exist in control with ID ${selectedContentControl.id}: ${listItemText}`) + return; + } + + itemToDelete.delete(); + await context.sync(); + + console.log(`List item deleted from control with ID ${selectedContentControl.id}: ${listItemText}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'displayText: string;' + return: + type: string + - name: index + uid: 'word!Word.ContentControlListItem#index:member' + package: word! + fullName: index + summary: Specifies the index location of a content control list item in the collection of list items. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'index: number;' + return: + type: number + - name: value + uid: 'word!Word.ContentControlListItem#value:member' + package: word! + fullName: value + summary: Specifies the programmatic value of a list item for a dropdown list or combo box content control. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'value: string;' + return: + type: string +methods: + - name: delete() + uid: 'word!Word.ContentControlListItem#delete:member(1)' + package: word! + fullName: delete() + summary: Deletes the list item. + remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml + + + // Deletes the provided list item from the first combo box content control in the selection. + + await Word.run(async (context) => { + const listItemText = $("#item-to-delete") + .val() + .toString() + .trim(); + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.comboBox] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,comboBoxContentControl"); + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,comboBoxContentControl"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.comboBox) { + console.warn("No combo box content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + let selectedComboBox: Word.ComboBoxContentControl = selectedContentControl.comboBoxContentControl; + selectedComboBox.listItems.load("items/*"); + await context.sync(); + + let listItems: Word.ContentControlListItemCollection = selectedContentControl.comboBoxContentControl.listItems; + let itemToDelete: Word.ContentControlListItem = listItems.items.find((item) => item.displayText === listItemText); + if (!itemToDelete) { + console.warn(`List item doesn't exist in control with ID ${selectedContentControl.id}: ${listItemText}`); + return; + } + + itemToDelete.delete(); + await context.sync(); + + console.log(`List item deleted from control with ID ${selectedContentControl.id}: ${listItemText}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'delete(): void;' + return: + type: void + description: '' + - name: load(options) + uid: 'word!Word.ContentControlListItem#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(options?: Word.Interfaces.ContentControlListItemLoadOptions): Word.ContentControlListItem;' + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: '' + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.ContentControlListItem#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.ContentControlListItem;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.ContentControlListItem#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ContentControlListItem; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: select() + uid: 'word!Word.ContentControlListItem#select:member(1)' + package: word! + fullName: select() + summary: Selects the list item and sets the text of the content control to the value of the list item. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'select(): void;' + return: + type: void + description: '' + - name: 'set(properties, options)' + uid: 'word!Word.ContentControlListItem#set:member(1)' + package: word! + fullName: 'set(properties, options)' + summary: >- + Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate + properties, or another API object of the same type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Interfaces.ContentControlListItemUpdateData, options?: OfficeExtension.UpdateOptions): void;' + parameters: + - id: properties + description: >- + A JavaScript object with properties that are structured isomorphically to the properties of the object on + which the method is called. + type: '' + - id: options + description: Provides an option to suppress errors if the properties object tries to set any read-only properties. + type: '' + return: + type: void + description: '' + - name: set(properties) + uid: 'word!Word.ContentControlListItem#set:member(2)' + package: word! + fullName: set(properties) + summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'set(properties: Word.ContentControlListItem): void;' + parameters: + - id: properties + description: '' + type: '' + return: + type: void + description: '' + - name: toJSON() + uid: 'word!Word.ContentControlListItem#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is + passed to it.) Whereas the original `Word.ContentControlListItem` object is an API object, the `toJSON` method + returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemData`) that contains + shallow copies of any loaded child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.ContentControlListItemData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.ContentControlListItem#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.ContentControlListItem;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.ContentControlListItem#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.ContentControlListItem;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_online/word/word.contentcontrollistitemcollection.yml b/docs/docs-ref-autogen/word_online/word/word.contentcontrollistitemcollection.yml new file mode 100644 index 0000000000..ac62531a31 --- /dev/null +++ b/docs/docs-ref-autogen/word_online/word/word.contentcontrollistitemcollection.yml @@ -0,0 +1,235 @@ +### YamlMime:TSType +name: Word.ContentControlListItemCollection +uid: 'word!Word.ContentControlListItemCollection:class' +package: word! +fullName: Word.ContentControlListItemCollection +summary: >- + Contains a collection of [Word.ContentControlListItem](xref:word!Word.ContentControlListItem:class) objects that + represent the items in a dropdown list or combo box content control. +remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml + + + // Gets the list items from the first combo box content control found in the selection. + + await Word.run(async (context) => { + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.comboBox] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,comboBoxContentControl"); + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,comboBoxContentControl"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.comboBox) { + console.warn("No combo box content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + let selectedComboBox: Word.ComboBoxContentControl = selectedContentControl.comboBoxContentControl; + selectedComboBox.listItems.load("items"); + await context.sync(); + + const currentItems: Word.ContentControlListItemCollection = selectedComboBox.listItems; + console.log(`The list from the combo box content control with ID ${selectedContentControl.id}:`, currentItems); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.ContentControlListItemCollection#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: items + uid: 'word!Word.ContentControlListItemCollection#items:member' + package: word! + fullName: items + summary: Gets the loaded child items in this collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'readonly items: Word.ContentControlListItem[];' + return: + type: '[]' +methods: + - name: getFirst() + uid: 'word!Word.ContentControlListItemCollection#getFirst:member(1)' + package: word! + fullName: getFirst() + summary: Gets the first list item in this collection. Throws an `ItemNotFound` error if this collection is empty. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFirst(): Word.ContentControlListItem;' + return: + type: '' + description: '' + - name: getFirstOrNullObject() + uid: 'word!Word.ContentControlListItemCollection#getFirstOrNullObject:member(1)' + package: word! + fullName: getFirstOrNullObject() + summary: >- + Gets the first list item in this collection. If this collection is empty, then this method will return an object + with its `isNullObject` property set to `true`. For further information, see [*OrNullObject methods and + properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties). + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'getFirstOrNullObject(): Word.ContentControlListItem;' + return: + type: '' + description: '' + - name: load(options) + uid: 'word!Word.ContentControlListItemCollection#load:member(1)' + package: word! + fullName: load(options) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: >- + load(options?: Word.Interfaces.ContentControlListItemCollectionLoadOptions & + Word.Interfaces.CollectionLoadOptions): Word.ContentControlListItemCollection; + parameters: + - id: options + description: Provides options for which properties of the object to load. + type: >- + & + return: + type: '' + description: '' + - name: load(propertyNames) + uid: 'word!Word.ContentControlListItemCollection#load:member(2)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.ContentControlListItemCollection;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.ContentControlListItemCollection#load:member(3)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ContentControlListItemCollection;' + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: '' + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.ContentControlListItemCollection#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is + passed to it.) Whereas the original `Word.ContentControlListItemCollection` object is an API object, the `toJSON` + method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemCollectionData`) + that contains an "items" array with shallow copies of any loaded properties from the collection's items. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.ContentControlListItemCollectionData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.ContentControlListItemCollection#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.ContentControlListItemCollection;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.ContentControlListItemCollection#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.ContentControlListItemCollection;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_online/word/word.contentcontroloptions.yml b/docs/docs-ref-autogen/word_online/word/word.contentcontroloptions.yml index 6378ac8d30..d7b0a8acd7 100644 --- a/docs/docs-ref-autogen/word_online/word/word.contentcontroloptions.yml +++ b/docs/docs-ref-autogen/word_online/word/word.contentcontroloptions.yml @@ -64,11 +64,15 @@ properties: uid: 'word!Word.ContentControlOptions#types:member' package: word! fullName: types - summary: 'An array of content control types, item must be ''RichText'', ''PlainText'', or ''CheckBox''.' - remarks: |- + summary: >- + An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. + remarks: >- \[ [API set: WordApi 1.5](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] - Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + + Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. 'DropDownList' + and 'ComboBox' support was added in WordApi 1.9. isPreview: false isDeprecated: false syntax: diff --git a/docs/docs-ref-autogen/word_online/word/word.document.yml b/docs/docs-ref-autogen/word_online/word/word.document.yml index 58ca71af8e..cad19f3ca9 100644 --- a/docs/docs-ref-autogen/word_online/word/word.document.yml +++ b/docs/docs-ref-autogen/word_online/word/word.document.yml @@ -678,15 +678,18 @@ methods: return: type: '' description: '' - - name: importStylesFromJson(stylesJson) + - name: 'importStylesFromJson(stylesJson, importedStylesConflictBehavior)' uid: 'word!Word.Document#importStylesFromJson:member(1)' package: word! - fullName: importStylesFromJson(stylesJson) + fullName: 'importStylesFromJson(stylesJson, importedStylesConflictBehavior)' summary: Import styles from a JSON-formatted string. remarks: >- \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + + #### Examples @@ -710,11 +713,45 @@ methods: isPreview: false isDeprecated: false syntax: - content: 'importStylesFromJson(stylesJson: string): OfficeExtension.ClientResult;' + content: >- + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): + OfficeExtension.ClientResult; parameters: - id: stylesJson description: Required. A JSON-formatted string representing the styles. type: string + - id: importedStylesConflictBehavior + description: >- + Optional. Specifies how to handle any imported styles with the same name as existing styles in the current + document. + type: Word.ImportedStylesConflictBehavior + return: + type: '<string[]>' + description: '' + - name: 'importStylesFromJson(stylesJson, importedStylesConflictBehaviorString)' + uid: 'word!Word.Document#importStylesFromJson:member(2)' + package: word! + fullName: 'importStylesFromJson(stylesJson, importedStylesConflictBehaviorString)' + summary: Import styles from a JSON-formatted string. + remarks: |- + \[ [API set: WordApi 1.6](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + isPreview: false + isDeprecated: false + syntax: + content: >- + importStylesFromJson(stylesJson: string, importedStylesConflictBehaviorString?: "Ignore" | "Overwrite" | + "CreateNew"): OfficeExtension.ClientResult; + parameters: + - id: stylesJson + description: Required. A JSON-formatted string representing the styles. + type: string + - id: importedStylesConflictBehaviorString + description: >- + Optional. Specifies how to handle any imported styles with the same name as existing styles in the current + document. + type: '"Ignore" | "Overwrite" | "CreateNew"' return: type: '<string[]>' description: '' diff --git a/docs/docs-ref-autogen/word_online/word/word.dropdownlistcontentcontrol.yml b/docs/docs-ref-autogen/word_online/word/word.dropdownlistcontentcontrol.yml new file mode 100644 index 0000000000..903908d8a9 --- /dev/null +++ b/docs/docs-ref-autogen/word_online/word/word.dropdownlistcontentcontrol.yml @@ -0,0 +1,359 @@ +### YamlMime:TSType +name: Word.DropDownListContentControl +uid: 'word!Word.DropDownListContentControl:class' +package: word! +fullName: Word.DropDownListContentControl +summary: The data specific to content controls of type DropDownList. +remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml + + + // Places a dropdown list content control at the end of the selection. + + await Word.run(async (context) => { + let selection = context.document.getSelection(); + selection.getRange(Word.RangeLocation.end).insertContentControl(Word.ContentControlType.dropDownList); + await context.sync(); + + console.log("Dropdown list content control inserted at the end of the selection."); + }); + + ``` +isPreview: false +isDeprecated: false +type: class +properties: + - name: context + uid: 'word!Word.DropDownListContentControl#context:member' + package: word! + fullName: context + summary: >- + The request context associated with the object. This connects the add-in's process to the Office host + application's process. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'context: RequestContext;' + return: + type: '' + - name: listItems + uid: 'word!Word.DropDownListContentControl#listItems:member' + package: word! + fullName: listItems + summary: Gets the collection of list items in the dropdown list content control. + remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml + + + // Deletes the provided list item from the first dropdown list content control in the selection. + + await Word.run(async (context) => { + const listItemText = $("#item-to-delete") + .val() + .toString() + .trim(); + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.dropDownList] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,dropDownListContentControl"); + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,dropDownListContentControl"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.dropDownList) { + console.warn("No dropdown list content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + let selectedDropdownList: Word.DropDownListContentControl = selectedContentControl.dropDownListContentControl; + selectedDropdownList.listItems.load("items/*"); + await context.sync(); + + let listItems: Word.ContentControlListItemCollection = selectedContentControl.dropDownListContentControl.listItems; + let itemToDelete: Word.ContentControlListItem = listItems.items.find((item) => item.displayText === listItemText); + if (!itemToDelete) { + console.warn(`List item doesn't exist in control with ID ${selectedContentControl.id}: ${listItemText}`) + return; + } + + itemToDelete.delete(); + await context.sync(); + + console.log(`List item deleted from control with ID ${selectedContentControl.id}: ${listItemText}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'readonly listItems: Word.ContentControlListItemCollection;' + return: + type: '' +methods: + - name: 'addListItem(displayText, value, index)' + uid: 'word!Word.DropDownListContentControl#addListItem:member(1)' + package: word! + fullName: 'addListItem(displayText, value, index)' + summary: >- + Adds a new list item to this dropdown list content control and returns a + [Word.ContentControlListItem](xref:word!Word.ContentControlListItem:class) object. + remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml + + + // Adds the provided list item to the first dropdown list content control in the selection. + + await Word.run(async (context) => { + const listItemText = $("#item-to-add") + .val() + .toString() + .trim(); + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.dropDownList] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,dropDownListContentControl"); + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,dropDownListContentControl"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.dropDownList) { + console.warn("No dropdown list content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + selectedContentControl.dropDownListContentControl.addListItem(listItemText); + await context.sync(); + + console.log(`List item added to control with ID ${selectedContentControl.id}: ${listItemText}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem;' + parameters: + - id: displayText + description: Required. Display text of the list item. + type: string + - id: value + description: Optional. Value of the list item. + type: string + - id: index + description: >- + Optional. Index location of the new item in the list. If an item exists at the position specified, the + existing item is pushed down in the list. If omitted, the new item is added to the end of the list. + type: number + return: + type: '' + description: '' + - name: deleteAllListItems() + uid: 'word!Word.DropDownListContentControl#deleteAllListItems:member(1)' + package: word! + fullName: deleteAllListItems() + summary: Deletes all list items in this dropdown list content control. + remarks: >- + \[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml + + + // Deletes the list items from first dropdown list content control found in the selection. + + await Word.run(async (context) => { + const selectedRange: Word.Range = context.document.getSelection(); + let selectedContentControl = selectedRange + .getContentControls({ + types: [Word.ContentControlType.dropDownList] + }) + .getFirstOrNullObject(); + selectedContentControl.load("id,dropDownListContentControl"); + await context.sync(); + + if (selectedContentControl.isNullObject) { + const parentContentControl: Word.ContentControl = selectedRange.parentContentControl; + parentContentControl.load("id,type,dropDownListContentControl"); + await context.sync(); + + if (parentContentControl.isNullObject || parentContentControl.type !== Word.ContentControlType.dropDownList) { + console.warn("No dropdown list content control is currently selected."); + return; + } else { + selectedContentControl = parentContentControl; + } + } + + console.log( + `About to delete the list from the dropdown list content control with ID ${selectedContentControl.id}` + ); + selectedContentControl.dropDownListContentControl.deleteAllListItems(); + await context.sync(); + + console.log("Deleted the list from the dropdown list content control."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'deleteAllListItems(): void;' + return: + type: void + description: '' + - name: load(propertyNames) + uid: 'word!Word.DropDownListContentControl#load:member(1)' + package: word! + fullName: load(propertyNames) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'load(propertyNames?: string | string[]): Word.DropDownListContentControl;' + parameters: + - id: propertyNames + description: A comma-delimited string or an array of strings that specify the properties to load. + type: 'string | string[]' + return: + type: '' + description: '' + - name: load(propertyNamesAndPaths) + uid: 'word!Word.DropDownListContentControl#load:member(2)' + package: word! + fullName: load(propertyNamesAndPaths) + summary: >- + Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading + the properties. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: |- + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.DropDownListContentControl; + parameters: + - id: propertyNamesAndPaths + description: >- + `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and + `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + type: |- + { + select?: string; + expand?: string; + } + return: + type: '' + description: '' + - name: toJSON() + uid: 'word!Word.DropDownListContentControl#toJSON:member(1)' + package: word! + fullName: toJSON() + summary: >- + Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to + `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is + passed to it.) Whereas the original `Word.DropDownListContentControl` object is an API object, the `toJSON` method + returns a plain JavaScript object (typed as `Word.Interfaces.DropDownListContentControlData`) that + contains shallow copies of any loaded child properties from the original object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'toJSON(): Word.Interfaces.DropDownListContentControlData;' + return: + type: '' + description: '' + - name: track() + uid: 'word!Word.DropDownListContentControl#track:member(1)' + package: word! + fullName: track() + summary: >- + Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand + for + [context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and + get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the + object to the tracked object collection when the object was first created. If this object is part of a collection, + you should also track the parent collection. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'track(): Word.DropDownListContentControl;' + return: + type: '' + description: '' + - name: untrack() + uid: 'word!Word.DropDownListContentControl#untrack:member(1)' + package: word! + fullName: untrack() + summary: >- + Release the memory associated with this object, if it has previously been tracked. This call is shorthand for + [context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member). Having many tracked objects slows down the host application, so please remember to free any objects you add, + once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'untrack(): Word.DropDownListContentControl;' + return: + type: '' + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/word_online/word/word.interfaces.comboboxcontentcontroldata.yml b/docs/docs-ref-autogen/word_online/word/word.interfaces.comboboxcontentcontroldata.yml new file mode 100644 index 0000000000..6032dbb944 --- /dev/null +++ b/docs/docs-ref-autogen/word_online/word/word.interfaces.comboboxcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.ComboBoxContentControlData +uid: 'word!Word.Interfaces.ComboBoxContentControlData:interface' +package: word! +fullName: Word.Interfaces.ComboBoxContentControlData +summary: An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrolcollectionloadoptions.yml b/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrolcollectionloadoptions.yml index e4d5e7eb32..91ad1b9984 100644 --- a/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrolcollectionloadoptions.yml +++ b/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrolcollectionloadoptions.yml @@ -74,8 +74,8 @@ properties: package: word! fullName: checkboxContentControl summary: >- - For EACH ITEM in the collection: Specifies the checkbox-related data if the content control's type is 'CheckBox'. - It's `null` otherwise. + For EACH ITEM in the collection: Gets the data of the content control when its type is 'CheckBox'. It's `null` + otherwise. remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontroldata.yml b/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontroldata.yml index 70ba44c6e0..c0549d0c74 100644 --- a/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontroldata.yml +++ b/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontroldata.yml @@ -51,7 +51,7 @@ properties: uid: 'word!Word.Interfaces.ContentControlData#checkboxContentControl:member' package: word! fullName: checkboxContentControl - summary: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + summary: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' isPreview: false isDeprecated: false @@ -71,6 +71,18 @@ properties: content: 'color?: string;' return: type: string + - name: comboBoxContentControl + uid: 'word!Word.Interfaces.ContentControlData#comboBoxContentControl:member' + package: word! + fullName: comboBoxContentControl + summary: Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'comboBoxContentControl?: Word.Interfaces.ComboBoxContentControlData;' + return: + type: '' - name: contentControls uid: 'word!Word.Interfaces.ContentControlData#contentControls:member' package: word! @@ -83,6 +95,18 @@ properties: content: 'contentControls?: Word.Interfaces.ContentControlData[];' return: type: '[]' + - name: dropDownListContentControl + uid: 'word!Word.Interfaces.ContentControlData#dropDownListContentControl:member' + package: word! + fullName: dropDownListContentControl + summary: Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'dropDownListContentControl?: Word.Interfaces.DropDownListContentControlData;' + return: + type: '' - name: fields uid: 'word!Word.Interfaces.ContentControlData#fields:member' package: word! diff --git a/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrollistitemcollectiondata.yml b/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrollistitemcollectiondata.yml new file mode 100644 index 0000000000..75af720340 --- /dev/null +++ b/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrollistitemcollectiondata.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionData +summary: An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrollistitemcollectionloadoptions.yml b/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrollistitemcollectionloadoptions.yml new file mode 100644 index 0000000000..007570b4e8 --- /dev/null +++ b/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrollistitemcollectionloadoptions.yml @@ -0,0 +1,69 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionLoadOptions +uid: 'word!Word.Interfaces.ContentControlListItemCollectionLoadOptions:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionLoadOptions +summary: >- + Contains a collection of [Word.ContentControlListItem](xref:word!Word.ContentControlListItem:class) objects that + represent the items in a dropdown list or combo box content control. +remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.ContentControlListItemCollectionLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: displayText + uid: 'word!Word.Interfaces.ContentControlListItemCollectionLoadOptions#displayText:member' + package: word! + fullName: displayText + summary: >- + For EACH ITEM in the collection: Specifies the display text of a list item for a dropdown list or combo box + content control. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'displayText?: boolean;' + return: + type: boolean + - name: index + uid: 'word!Word.Interfaces.ContentControlListItemCollectionLoadOptions#index:member' + package: word! + fullName: index + summary: >- + For EACH ITEM in the collection: Specifies the index location of a content control list item in the collection of + list items. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'index?: boolean;' + return: + type: boolean + - name: value + uid: 'word!Word.Interfaces.ContentControlListItemCollectionLoadOptions#value:member' + package: word! + fullName: value + summary: >- + For EACH ITEM in the collection: Specifies the programmatic value of a list item for a dropdown list or combo box + content control. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'value?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml b/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml new file mode 100644 index 0000000000..e22526b0d5 --- /dev/null +++ b/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrollistitemcollectionupdatedata.yml @@ -0,0 +1,25 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemCollectionUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemCollectionUpdateData +summary: >- + An interface for updating data on the `ContentControlListItemCollection` object, for use in + `contentControlListItemCollection.set({ ... })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: items + uid: 'word!Word.Interfaces.ContentControlListItemCollectionUpdateData#items:member' + package: word! + fullName: items + summary: '' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'items?: Word.Interfaces.ContentControlListItemData[];' + return: + type: '[]' diff --git a/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrollistitemdata.yml b/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrollistitemdata.yml new file mode 100644 index 0000000000..69ef8934f1 --- /dev/null +++ b/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrollistitemdata.yml @@ -0,0 +1,47 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemData +uid: 'word!Word.Interfaces.ContentControlListItemData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemData +summary: An interface describing the data returned by calling `contentControlListItem.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: displayText + uid: 'word!Word.Interfaces.ContentControlListItemData#displayText:member' + package: word! + fullName: displayText + summary: Specifies the display text of a list item for a dropdown list or combo box content control. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'displayText?: string;' + return: + type: string + - name: index + uid: 'word!Word.Interfaces.ContentControlListItemData#index:member' + package: word! + fullName: index + summary: Specifies the index location of a content control list item in the collection of list items. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'index?: number;' + return: + type: number + - name: value + uid: 'word!Word.Interfaces.ContentControlListItemData#value:member' + package: word! + fullName: value + summary: Specifies the programmatic value of a list item for a dropdown list or combo box content control. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'value?: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrollistitemloadoptions.yml b/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrollistitemloadoptions.yml new file mode 100644 index 0000000000..3961f99bcc --- /dev/null +++ b/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrollistitemloadoptions.yml @@ -0,0 +1,61 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemLoadOptions +uid: 'word!Word.Interfaces.ContentControlListItemLoadOptions:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemLoadOptions +summary: Represents a list item in a dropdown list or combo box content control. +remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: $all + uid: 'word!Word.Interfaces.ContentControlListItemLoadOptions#$all:member' + package: word! + fullName: $all + summary: >- + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not + the navigational properties (such as `Range.format.fill.color`). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: '$all?: boolean;' + return: + type: boolean + - name: displayText + uid: 'word!Word.Interfaces.ContentControlListItemLoadOptions#displayText:member' + package: word! + fullName: displayText + summary: Specifies the display text of a list item for a dropdown list or combo box content control. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'displayText?: boolean;' + return: + type: boolean + - name: index + uid: 'word!Word.Interfaces.ContentControlListItemLoadOptions#index:member' + package: word! + fullName: index + summary: Specifies the index location of a content control list item in the collection of list items. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'index?: boolean;' + return: + type: boolean + - name: value + uid: 'word!Word.Interfaces.ContentControlListItemLoadOptions#value:member' + package: word! + fullName: value + summary: Specifies the programmatic value of a list item for a dropdown list or combo box content control. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'value?: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrollistitemupdatedata.yml b/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrollistitemupdatedata.yml new file mode 100644 index 0000000000..278599b7da --- /dev/null +++ b/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrollistitemupdatedata.yml @@ -0,0 +1,49 @@ +### YamlMime:TSType +name: Word.Interfaces.ContentControlListItemUpdateData +uid: 'word!Word.Interfaces.ContentControlListItemUpdateData:interface' +package: word! +fullName: Word.Interfaces.ContentControlListItemUpdateData +summary: >- + An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... + })`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: displayText + uid: 'word!Word.Interfaces.ContentControlListItemUpdateData#displayText:member' + package: word! + fullName: displayText + summary: Specifies the display text of a list item for a dropdown list or combo box content control. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'displayText?: string;' + return: + type: string + - name: index + uid: 'word!Word.Interfaces.ContentControlListItemUpdateData#index:member' + package: word! + fullName: index + summary: Specifies the index location of a content control list item in the collection of list items. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'index?: number;' + return: + type: number + - name: value + uid: 'word!Word.Interfaces.ContentControlListItemUpdateData#value:member' + package: word! + fullName: value + summary: Specifies the programmatic value of a list item for a dropdown list or combo box content control. + remarks: '\[ [API set: WordApi 1.9](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'value?: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrolloadoptions.yml b/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrolloadoptions.yml index 781dc0c5f9..2b497a9074 100644 --- a/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrolloadoptions.yml +++ b/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrolloadoptions.yml @@ -68,7 +68,7 @@ properties: uid: 'word!Word.Interfaces.ContentControlLoadOptions#checkboxContentControl:member' package: word! fullName: checkboxContentControl - summary: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + summary: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrolupdatedata.yml b/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrolupdatedata.yml index cb78a93109..001ea1bf3d 100644 --- a/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrolupdatedata.yml +++ b/docs/docs-ref-autogen/word_online/word/word.interfaces.contentcontrolupdatedata.yml @@ -51,7 +51,7 @@ properties: uid: 'word!Word.Interfaces.ContentControlUpdateData#checkboxContentControl:member' package: word! fullName: checkboxContentControl - summary: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + summary: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. remarks: '\[ [API set: WordApi 1.7](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]' isPreview: false isDeprecated: false diff --git a/docs/docs-ref-autogen/word_online/word/word.interfaces.dropdownlistcontentcontroldata.yml b/docs/docs-ref-autogen/word_online/word/word.interfaces.dropdownlistcontentcontroldata.yml new file mode 100644 index 0000000000..0802e15d92 --- /dev/null +++ b/docs/docs-ref-autogen/word_online/word/word.interfaces.dropdownlistcontentcontroldata.yml @@ -0,0 +1,10 @@ +### YamlMime:TSType +name: Word.Interfaces.DropDownListContentControlData +uid: 'word!Word.Interfaces.DropDownListContentControlData:interface' +package: word! +fullName: Word.Interfaces.DropDownListContentControlData +summary: An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. +remarks: '' +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/word_online/word/word.paragraph.yml b/docs/docs-ref-autogen/word_online/word/word.paragraph.yml index f9ef7a17be..e4b6d672c6 100644 --- a/docs/docs-ref-autogen/word_online/word/word.paragraph.yml +++ b/docs/docs-ref-autogen/word_online/word/word.paragraph.yml @@ -1509,7 +1509,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1580,16 +1580,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/docs-ref-autogen/word_online/word/word.range.yml b/docs/docs-ref-autogen/word_online/word/word.range.yml index 2e34aeb8b1..bc9e7dfb54 100644 --- a/docs/docs-ref-autogen/word_online/word/word.range.yml +++ b/docs/docs-ref-autogen/word_online/word/word.range.yml @@ -998,7 +998,7 @@ methods: ```TypeScript // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Places a dropdown list content control at the end of the selection. @@ -1307,7 +1307,7 @@ methods: Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi - 1.5. `CheckBox` support was added in WordApi 1.7. + 1.5. `CheckBox` support was added in WordApi 1.7. `DropDownList` and `ComboBox` support was added in WordApi 1.9. #### Examples @@ -1353,16 +1353,20 @@ methods: syntax: content: >- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | - Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | + "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; parameters: - id: contentControlType description: >- - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is - 'RichText'. + Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or + 'ComboBox'. The default is 'RichText'. type: >- | | | "RichText" | "PlainText" | "CheckBox" + uid="word!Word.ContentControlType.checkBox:member" /> | | | "RichText" | "PlainText" | "CheckBox" | + "DropDownList" | "ComboBox" return: type: '' description: '' diff --git a/docs/includes/word-1_1.md b/docs/includes/word-1_1.md index f05c9e1e53..9e8dda311c 100644 --- a/docs/includes/word-1_1.md +++ b/docs/includes/word-1_1.md @@ -7,7 +7,7 @@ ||[getOoxml()](/javascript/api/word/word.body#word-word-body-getooxml-member(1))|Gets the OOXML (Office Open XML) representation of the body object.| ||[inlinePictures](/javascript/api/word/word.body#word-word-body-inlinepictures-member)|Gets the collection of InlinePicture objects in the body.| ||[insertBreak(breakType: Word.BreakType \| "Page" \| "Next" \| "SectionNext" \| "SectionContinuous" \| "SectionEven" \| "SectionOdd" \| "Line", insertLocation: Word.InsertLocation.start \| Word.InsertLocation.end \| "Start" \| "End")](/javascript/api/word/word.body#word-word-body-insertbreak-member(1))|Inserts a break at the specified location in the main document.| -||[insertContentControl(contentControlType?: Word.ContentControlType.richText \| Word.ContentControlType.plainText \| Word.ContentControlType.checkBox \| "RichText" \| "PlainText" \| "CheckBox")](/javascript/api/word/word.body#word-word-body-insertcontentcontrol-member(1))|Wraps the Body object with a content control.| +||[insertContentControl(contentControlType?: Word.ContentControlType.richText \| Word.ContentControlType.plainText \| Word.ContentControlType.checkBox \| Word.ContentControlType.dropDownList \| Word.ContentControlType.comboBox \| "RichText" \| "PlainText" \| "CheckBox" \| "DropDownList" \| "ComboBox")](/javascript/api/word/word.body#word-word-body-insertcontentcontrol-member(1))|Wraps the Body object with a content control.| ||[insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace \| Word.InsertLocation.start \| Word.InsertLocation.end \| "Replace" \| "Start" \| "End")](/javascript/api/word/word.body#word-word-body-insertfilefrombase64-member(1))|Inserts a document into the body at the specified location.| ||[insertHtml(html: string, insertLocation: Word.InsertLocation.replace \| Word.InsertLocation.start \| Word.InsertLocation.end \| "Replace" \| "Start" \| "End")](/javascript/api/word/word.body#word-word-body-inserthtml-member(1))|Inserts HTML at the specified location.| ||[insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace \| Word.InsertLocation.start \| Word.InsertLocation.end \| "Replace" \| "Start" \| "End")](/javascript/api/word/word.body#word-word-body-insertooxml-member(1))|Inserts OOXML at the specified location.| @@ -90,7 +90,7 @@ ||[getOoxml()](/javascript/api/word/word.paragraph#word-word-paragraph-getooxml-member(1))|Gets the Office Open XML (OOXML) representation of the paragraph object.| ||[inlinePictures](/javascript/api/word/word.paragraph#word-word-paragraph-inlinepictures-member)|Gets the collection of InlinePicture objects in the paragraph.| ||[insertBreak(breakType: Word.BreakType \| "Page" \| "Next" \| "SectionNext" \| "SectionContinuous" \| "SectionEven" \| "SectionOdd" \| "Line", insertLocation: Word.InsertLocation.before \| Word.InsertLocation.after \| "Before" \| "After")](/javascript/api/word/word.paragraph#word-word-paragraph-insertbreak-member(1))|Inserts a break at the specified location in the main document.| -||[insertContentControl(contentControlType?: Word.ContentControlType.richText \| Word.ContentControlType.plainText \| Word.ContentControlType.checkBox \| "RichText" \| "PlainText" \| "CheckBox")](/javascript/api/word/word.paragraph#word-word-paragraph-insertcontentcontrol-member(1))|Wraps the Paragraph object with a content control.| +||[insertContentControl(contentControlType?: Word.ContentControlType.richText \| Word.ContentControlType.plainText \| Word.ContentControlType.checkBox \| Word.ContentControlType.dropDownList \| Word.ContentControlType.comboBox \| "RichText" \| "PlainText" \| "CheckBox" \| "DropDownList" \| "ComboBox")](/javascript/api/word/word.paragraph#word-word-paragraph-insertcontentcontrol-member(1))|Wraps the Paragraph object with a content control.| ||[insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace \| Word.InsertLocation.start \| Word.InsertLocation.end \| "Replace" \| "Start" \| "End")](/javascript/api/word/word.paragraph#word-word-paragraph-insertfilefrombase64-member(1))|Inserts a document into the paragraph at the specified location.| ||[insertHtml(html: string, insertLocation: Word.InsertLocation.replace \| Word.InsertLocation.start \| Word.InsertLocation.end \| "Replace" \| "Start" \| "End")](/javascript/api/word/word.paragraph#word-word-paragraph-inserthtml-member(1))|Inserts HTML into the paragraph at the specified location.| ||[insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace \| Word.InsertLocation.start \| Word.InsertLocation.end \| "Replace" \| "Start" \| "End")](/javascript/api/word/word.paragraph#word-word-paragraph-insertinlinepicturefrombase64-member(1))|Inserts a picture into the paragraph at the specified location.| @@ -118,7 +118,7 @@ ||[getHtml()](/javascript/api/word/word.range#word-word-range-gethtml-member(1))|Gets an HTML representation of the range object.| ||[getOoxml()](/javascript/api/word/word.range#word-word-range-getooxml-member(1))|Gets the OOXML representation of the range object.| ||[insertBreak(breakType: Word.BreakType \| "Page" \| "Next" \| "SectionNext" \| "SectionContinuous" \| "SectionEven" \| "SectionOdd" \| "Line", insertLocation: Word.InsertLocation.before \| Word.InsertLocation.after \| "Before" \| "After")](/javascript/api/word/word.range#word-word-range-insertbreak-member(1))|Inserts a break at the specified location in the main document.| -||[insertContentControl(contentControlType?: Word.ContentControlType.richText \| Word.ContentControlType.plainText \| Word.ContentControlType.checkBox \| "RichText" \| "PlainText" \| "CheckBox")](/javascript/api/word/word.range#word-word-range-insertcontentcontrol-member(1))|Wraps the Range object with a content control.| +||[insertContentControl(contentControlType?: Word.ContentControlType.richText \| Word.ContentControlType.plainText \| Word.ContentControlType.checkBox \| Word.ContentControlType.dropDownList \| Word.ContentControlType.comboBox \| "RichText" \| "PlainText" \| "CheckBox" \| "DropDownList" \| "ComboBox")](/javascript/api/word/word.range#word-word-range-insertcontentcontrol-member(1))|Wraps the Range object with a content control.| ||[insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation \| "Replace" \| "Start" \| "End" \| "Before" \| "After")](/javascript/api/word/word.range#word-word-range-insertfilefrombase64-member(1))|Inserts a document at the specified location.| ||[insertHtml(html: string, insertLocation: Word.InsertLocation \| "Replace" \| "Start" \| "End" \| "Before" \| "After")](/javascript/api/word/word.range#word-word-range-inserthtml-member(1))|Inserts HTML at the specified location.| ||[insertOoxml(ooxml: string, insertLocation: Word.InsertLocation \| "Replace" \| "Start" \| "End" \| "Before" \| "After")](/javascript/api/word/word.range#word-word-range-insertooxml-member(1))|Inserts OOXML at the specified location.| diff --git a/docs/includes/word-1_5.md b/docs/includes/word-1_5.md index ce0a0ea364..84fa765f4c 100644 --- a/docs/includes/word-1_5.md +++ b/docs/includes/word-1_5.md @@ -28,7 +28,7 @@ |[ContentControlExitedEventArgs](/javascript/api/word/word.contentcontrolexitedeventargs)|[eventType](/javascript/api/word/word.contentcontrolexitedeventargs#word-word-contentcontrolexitedeventargs-eventtype-member)|The event type.| ||[ids](/javascript/api/word/word.contentcontrolexitedeventargs#word-word-contentcontrolexitedeventargs-ids-member)|Gets the content control IDs.| ||[source](/javascript/api/word/word.contentcontrolexitedeventargs#word-word-contentcontrolexitedeventargs-source-member)|The source of the event.| -|[ContentControlOptions](/javascript/api/word/word.contentcontroloptions)|[types](/javascript/api/word/word.contentcontroloptions#word-word-contentcontroloptions-types-member)|An array of content control types, item must be 'RichText', 'PlainText', or 'CheckBox'.| +|[ContentControlOptions](/javascript/api/word/word.contentcontroloptions)|[types](/javascript/api/word/word.contentcontroloptions#word-word-contentcontroloptions-types-member)|An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'.| |[ContentControlSelectionChangedEventArgs](/javascript/api/word/word.contentcontrolselectionchangedeventargs)|[eventType](/javascript/api/word/word.contentcontrolselectionchangedeventargs#word-word-contentcontrolselectionchangedeventargs-eventtype-member)|The event type.| ||[ids](/javascript/api/word/word.contentcontrolselectionchangedeventargs#word-word-contentcontrolselectionchangedeventargs-ids-member)|Gets the content control IDs.| ||[source](/javascript/api/word/word.contentcontrolselectionchangedeventargs#word-word-contentcontrolselectionchangedeventargs-source-member)|The source of the event.| diff --git a/docs/includes/word-1_6.md b/docs/includes/word-1_6.md index cc6879765c..96e7bceabf 100644 --- a/docs/includes/word-1_6.md +++ b/docs/includes/word-1_6.md @@ -4,7 +4,7 @@ |[Body](/javascript/api/word/word.body)|[getTrackedChanges()](/javascript/api/word/word.body#word-word-body-gettrackedchanges-member(1))|Gets the collection of the TrackedChange objects in the body.| |[ContentControl](/javascript/api/word/word.contentcontrol)|[getTrackedChanges()](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-gettrackedchanges-member(1))|Gets the collection of the TrackedChange objects in the content control.| |[Document](/javascript/api/word/word.document)|[getParagraphByUniqueLocalId(id: string)](/javascript/api/word/word.document#word-word-document-getparagraphbyuniquelocalid-member(1))|Gets the paragraph by its unique local ID.| -||[importStylesFromJson(stylesJson: string)](/javascript/api/word/word.document#word-word-document-importstylesfromjson-member(1))|Import styles from a JSON-formatted string.| +||[importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior)](/javascript/api/word/word.document#word-word-document-importstylesfromjson-member(1))|Import styles from a JSON-formatted string.| ||[onParagraphAdded](/javascript/api/word/word.document#word-word-document-onparagraphadded-member)|Occurs when the user adds new paragraphs.| ||[onParagraphChanged](/javascript/api/word/word.document#word-word-document-onparagraphchanged-member)|Occurs when the user changes paragraphs.| ||[onParagraphDeleted](/javascript/api/word/word.document#word-word-document-onparagraphdeleted-member)|Occurs when the user deletes paragraphs.| diff --git a/docs/includes/word-1_7.md b/docs/includes/word-1_7.md index 4b1141162d..70cbf84431 100644 --- a/docs/includes/word-1_7.md +++ b/docs/includes/word-1_7.md @@ -13,7 +13,7 @@ |[AnnotationRemovedEventArgs](/javascript/api/word/word.annotationremovedeventargs)|[ids](/javascript/api/word/word.annotationremovedeventargs#word-word-annotationremovedeventargs-ids-member)|Specifies the annotation IDs for which the event was fired.| |[AnnotationSet](/javascript/api/word/word.annotationset)|[critiques](/javascript/api/word/word.annotationset#word-word-annotationset-critiques-member)|Critiques.| |[CheckboxContentControl](/javascript/api/word/word.checkboxcontentcontrol)|[isChecked](/javascript/api/word/word.checkboxcontentcontrol#word-word-checkboxcontentcontrol-ischecked-member)|Specifies the current state of the checkbox.| -|[ContentControl](/javascript/api/word/word.contentcontrol)|[checkboxContentControl](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-checkboxcontentcontrol-member)|Specifies the checkbox-related data if the content control's type is 'CheckBox'.| +|[ContentControl](/javascript/api/word/word.contentcontrol)|[checkboxContentControl](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-checkboxcontentcontrol-member)|Gets the data of the content control when its type is 'CheckBox'.| |[Critique](/javascript/api/word/word.critique)|[colorScheme](/javascript/api/word/word.critique#word-word-critique-colorscheme-member)|Specifies the color scheme of the critique.| ||[length](/javascript/api/word/word.critique#word-word-critique-length-member)|Specifies the length of the critique inside paragraph.| ||[start](/javascript/api/word/word.critique#word-word-critique-start-member)|Specifies the start index of the critique inside paragraph.| diff --git a/docs/includes/word-1_9.md b/docs/includes/word-1_9.md new file mode 100644 index 0000000000..05acc02a72 --- /dev/null +++ b/docs/includes/word-1_9.md @@ -0,0 +1,18 @@ +| Class | Fields | Description | +|:---|:---|:---| +|[ComboBoxContentControl](/javascript/api/word/word.comboboxcontentcontrol)|[addListItem(displayText: string, value?: string, index?: number)](/javascript/api/word/word.comboboxcontentcontrol#word-word-comboboxcontentcontrol-addlistitem-member(1))|Adds a new list item to this combo box content control and returns a Word.ContentControlListItem object.| +||[deleteAllListItems()](/javascript/api/word/word.comboboxcontentcontrol#word-word-comboboxcontentcontrol-deletealllistitems-member(1))|Deletes all list items in this combo box content control.| +||[listItems](/javascript/api/word/word.comboboxcontentcontrol#word-word-comboboxcontentcontrol-listitems-member)|Gets the collection of list items in the combo box content control.| +|[ContentControl](/javascript/api/word/word.contentcontrol)|[comboBoxContentControl](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-comboboxcontentcontrol-member)|Gets the data of the content control when its type is 'ComboBox'.| +||[dropDownListContentControl](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-dropdownlistcontentcontrol-member)|Gets the data of the content control when its type is 'DropDownList'.| +|[ContentControlListItem](/javascript/api/word/word.contentcontrollistitem)|[delete()](/javascript/api/word/word.contentcontrollistitem#word-word-contentcontrollistitem-delete-member(1))|Deletes the list item.| +||[displayText](/javascript/api/word/word.contentcontrollistitem#word-word-contentcontrollistitem-displaytext-member)|Specifies the display text of a list item for a dropdown list or combo box content control.| +||[index](/javascript/api/word/word.contentcontrollistitem#word-word-contentcontrollistitem-index-member)|Specifies the index location of a content control list item in the collection of list items.| +||[select()](/javascript/api/word/word.contentcontrollistitem#word-word-contentcontrollistitem-select-member(1))|Selects the list item and sets the text of the content control to the value of the list item.| +||[value](/javascript/api/word/word.contentcontrollistitem#word-word-contentcontrollistitem-value-member)|Specifies the programmatic value of a list item for a dropdown list or combo box content control.| +|[ContentControlListItemCollection](/javascript/api/word/word.contentcontrollistitemcollection)|[getFirst()](/javascript/api/word/word.contentcontrollistitemcollection#word-word-contentcontrollistitemcollection-getfirst-member(1))|Gets the first list item in this collection.| +||[getFirstOrNullObject()](/javascript/api/word/word.contentcontrollistitemcollection#word-word-contentcontrollistitemcollection-getfirstornullobject-member(1))|Gets the first list item in this collection.| +||[items](/javascript/api/word/word.contentcontrollistitemcollection#word-word-contentcontrollistitemcollection-items-member)|Gets the loaded child items in this collection.| +|[DropDownListContentControl](/javascript/api/word/word.dropdownlistcontentcontrol)|[addListItem(displayText: string, value?: string, index?: number)](/javascript/api/word/word.dropdownlistcontentcontrol#word-word-dropdownlistcontentcontrol-addlistitem-member(1))|Adds a new list item to this dropdown list content control and returns a Word.ContentControlListItem object.| +||[deleteAllListItems()](/javascript/api/word/word.dropdownlistcontentcontrol#word-word-dropdownlistcontentcontrol-deletealllistitems-member(1))|Deletes all list items in this dropdown list content control.| +||[listItems](/javascript/api/word/word.dropdownlistcontentcontrol#word-word-dropdownlistcontentcontrol-listitems-member)|Gets the collection of list items in the dropdown list content control.| diff --git a/docs/includes/word-preview.md b/docs/includes/word-preview.md index b43d7b238b..23b7cb5237 100644 --- a/docs/includes/word-preview.md +++ b/docs/includes/word-preview.md @@ -1,23 +1,17 @@ | Class | Fields | Description | |:---|:---|:---| -|[Body](/javascript/api/word/word.body)|[insertContentControl(contentControlType?: Word.ContentControlType.richText \| Word.ContentControlType.plainText \| Word.ContentControlType.checkBox \| Word.ContentControlType.dropDownList \| Word.ContentControlType.comboBox \| "RichText" \| "PlainText" \| "CheckBox" \| "DropDownList" \| "ComboBox")](/javascript/api/word/word.body#word-word-body-insertcontentcontrol-member(1))|Wraps the Body object with a content control.| -||[onCommentAdded](/javascript/api/word/word.body#word-word-body-oncommentadded-member)|Occurs when new comments are added.| +|[Body](/javascript/api/word/word.body)|[onCommentAdded](/javascript/api/word/word.body#word-word-body-oncommentadded-member)|Occurs when new comments are added.| ||[onCommentChanged](/javascript/api/word/word.body#word-word-body-oncommentchanged-member)|Occurs when a comment or its reply is changed.| ||[onCommentDeleted](/javascript/api/word/word.body#word-word-body-oncommentdeleted-member)|Occurs when comments are deleted.| ||[onCommentDeselected](/javascript/api/word/word.body#word-word-body-oncommentdeselected-member)|Occurs when a comment is deselected.| ||[onCommentSelected](/javascript/api/word/word.body#word-word-body-oncommentselected-member)|Occurs when a comment is selected.| -|[ComboBoxContentControl](/javascript/api/word/word.comboboxcontentcontrol)|[addListItem(displayText: string, value?: string, index?: number)](/javascript/api/word/word.comboboxcontentcontrol#word-word-comboboxcontentcontrol-addlistitem-member(1))|Adds a new list item to this combo box content control and returns a Word.ContentControlListItem object.| -||[deleteAllListItems()](/javascript/api/word/word.comboboxcontentcontrol#word-word-comboboxcontentcontrol-deletealllistitems-member(1))|Deletes all list items in this combo box content control.| -||[listItems](/javascript/api/word/word.comboboxcontentcontrol#word-word-comboboxcontentcontrol-listitems-member)|Gets the collection of list items in the combo box content control.| |[CommentDetail](/javascript/api/word/word.commentdetail)|[id](/javascript/api/word/word.commentdetail#word-word-commentdetail-id-member)|Represents the ID of this comment.| ||[replyIds](/javascript/api/word/word.commentdetail#word-word-commentdetail-replyids-member)|Represents the IDs of the replies to this comment.| |[CommentEventArgs](/javascript/api/word/word.commenteventargs)|[changeType](/javascript/api/word/word.commenteventargs#word-word-commenteventargs-changetype-member)|Represents how the comment changed event is triggered.| ||[commentDetails](/javascript/api/word/word.commenteventargs#word-word-commenteventargs-commentdetails-member)|Gets the CommentDetail array which contains the IDs and reply IDs of the involved comments.| ||[source](/javascript/api/word/word.commenteventargs#word-word-commenteventargs-source-member)|The source of the event.| ||[type](/javascript/api/word/word.commenteventargs#word-word-commenteventargs-type-member)|The event type.| -|[ContentControl](/javascript/api/word/word.contentcontrol)|[comboBoxContentControl](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-comboboxcontentcontrol-member)|Specifies the combo box-related data if the content control's type is 'ComboBox'.| -||[dropDownListContentControl](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-dropdownlistcontentcontrol-member)|Specifies the dropdown list-related data if the content control's type is 'DropDownList'.| -||[onCommentAdded](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-oncommentadded-member)|Occurs when new comments are added.| +|[ContentControl](/javascript/api/word/word.contentcontrol)|[onCommentAdded](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-oncommentadded-member)|Occurs when new comments are added.| ||[onCommentChanged](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-oncommentchanged-member)|Occurs when a comment or its reply is changed.| ||[onCommentDeselected](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-oncommentdeselected-member)|Occurs when a comment is deselected.| ||[onCommentSelected](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-oncommentselected-member)|Occurs when a comment is selected.| @@ -28,22 +22,10 @@ |[ContentControlDeletedEventArgs](/javascript/api/word/word.contentcontroldeletedeventargs)|[eventType](/javascript/api/word/word.contentcontroldeletedeventargs#word-word-contentcontroldeletedeventargs-eventtype-member)|The event type.| |[ContentControlEnteredEventArgs](/javascript/api/word/word.contentcontrolenteredeventargs)|[eventType](/javascript/api/word/word.contentcontrolenteredeventargs#word-word-contentcontrolenteredeventargs-eventtype-member)|The event type.| |[ContentControlExitedEventArgs](/javascript/api/word/word.contentcontrolexitedeventargs)|[eventType](/javascript/api/word/word.contentcontrolexitedeventargs#word-word-contentcontrolexitedeventargs-eventtype-member)|The event type.| -|[ContentControlListItem](/javascript/api/word/word.contentcontrollistitem)|[delete()](/javascript/api/word/word.contentcontrollistitem#word-word-contentcontrollistitem-delete-member(1))|Deletes the list item.| -||[displayText](/javascript/api/word/word.contentcontrollistitem#word-word-contentcontrollistitem-displaytext-member)|Specifies the display text of a list item for a dropdown list or combo box content control.| -||[index](/javascript/api/word/word.contentcontrollistitem#word-word-contentcontrollistitem-index-member)|Specifies the index location of a content control list item in the collection of list items.| -||[select()](/javascript/api/word/word.contentcontrollistitem#word-word-contentcontrollistitem-select-member(1))|Selects the list item and sets the text of the content control to the value of the list item.| -||[value](/javascript/api/word/word.contentcontrollistitem#word-word-contentcontrollistitem-value-member)|Specifies the programmatic value of a list item for a dropdown list or combo box content control.| -|[ContentControlListItemCollection](/javascript/api/word/word.contentcontrollistitemcollection)|[getFirst()](/javascript/api/word/word.contentcontrollistitemcollection#word-word-contentcontrollistitemcollection-getfirst-member(1))|Gets the first list item in this collection.| -||[getFirstOrNullObject()](/javascript/api/word/word.contentcontrollistitemcollection#word-word-contentcontrollistitemcollection-getfirstornullobject-member(1))|Gets the first list item in this collection.| -||[items](/javascript/api/word/word.contentcontrollistitemcollection#word-word-contentcontrollistitemcollection-items-member)|Gets the loaded child items in this collection.| |[ContentControlSelectionChangedEventArgs](/javascript/api/word/word.contentcontrolselectionchangedeventargs)|[eventType](/javascript/api/word/word.contentcontrolselectionchangedeventargs#word-word-contentcontrolselectionchangedeventargs-eventtype-member)|The event type.| |[Document](/javascript/api/word/word.document)|[compareFromBase64(base64File: string, documentCompareOptions?: Word.DocumentCompareOptions)](/javascript/api/word/word.document#word-word-document-comparefrombase64-member(1))|Displays revision marks that indicate where the specified document differs from another document.| -|[DropDownListContentControl](/javascript/api/word/word.dropdownlistcontentcontrol)|[addListItem(displayText: string, value?: string, index?: number)](/javascript/api/word/word.dropdownlistcontentcontrol#word-word-dropdownlistcontentcontrol-addlistitem-member(1))|Adds a new list item to this dropdown list content control and returns a Word.ContentControlListItem object.| -||[deleteAllListItems()](/javascript/api/word/word.dropdownlistcontentcontrol#word-word-dropdownlistcontentcontrol-deletealllistitems-member(1))|Deletes all list items in this dropdown list content control.| -||[listItems](/javascript/api/word/word.dropdownlistcontentcontrol#word-word-dropdownlistcontentcontrol-listitems-member)|Gets the collection of list items in the dropdown list content control.| |[Font](/javascript/api/word/word.font)|[hidden](/javascript/api/word/word.font#word-word-font-hidden-member)|Specifies a value that indicates whether the font is tagged as hidden.| -|[Paragraph](/javascript/api/word/word.paragraph)|[insertContentControl(contentControlType?: Word.ContentControlType.richText \| Word.ContentControlType.plainText \| Word.ContentControlType.checkBox \| Word.ContentControlType.dropDownList \| Word.ContentControlType.comboBox \| "RichText" \| "PlainText" \| "CheckBox" \| "DropDownList" \| "ComboBox")](/javascript/api/word/word.paragraph#word-word-paragraph-insertcontentcontrol-member(1))|Wraps the Paragraph object with a content control.| -||[onCommentAdded](/javascript/api/word/word.paragraph#word-word-paragraph-oncommentadded-member)|Occurs when new comments are added.| +|[Paragraph](/javascript/api/word/word.paragraph)|[onCommentAdded](/javascript/api/word/word.paragraph#word-word-paragraph-oncommentadded-member)|Occurs when new comments are added.| ||[onCommentChanged](/javascript/api/word/word.paragraph#word-word-paragraph-oncommentchanged-member)|Occurs when a comment or its reply is changed.| ||[onCommentDeleted](/javascript/api/word/word.paragraph#word-word-paragraph-oncommentdeleted-member)|Occurs when comments are deleted.| ||[onCommentDeselected](/javascript/api/word/word.paragraph#word-word-paragraph-oncommentdeselected-member)|Occurs when a comment is deselected.| @@ -51,8 +33,7 @@ |[ParagraphAddedEventArgs](/javascript/api/word/word.paragraphaddedeventargs)|[type](/javascript/api/word/word.paragraphaddedeventargs#word-word-paragraphaddedeventargs-type-member)|The event type.| |[ParagraphChangedEventArgs](/javascript/api/word/word.paragraphchangedeventargs)|[type](/javascript/api/word/word.paragraphchangedeventargs#word-word-paragraphchangedeventargs-type-member)|The event type.| |[ParagraphDeletedEventArgs](/javascript/api/word/word.paragraphdeletedeventargs)|[type](/javascript/api/word/word.paragraphdeletedeventargs#word-word-paragraphdeletedeventargs-type-member)|The event type.| -|[Range](/javascript/api/word/word.range)|[insertContentControl(contentControlType?: Word.ContentControlType.richText \| Word.ContentControlType.plainText \| Word.ContentControlType.checkBox \| Word.ContentControlType.dropDownList \| Word.ContentControlType.comboBox \| "RichText" \| "PlainText" \| "CheckBox" \| "DropDownList" \| "ComboBox")](/javascript/api/word/word.range#word-word-range-insertcontentcontrol-member(1))|Wraps the Range object with a content control.| -||[onCommentAdded](/javascript/api/word/word.range#word-word-range-oncommentadded-member)|Occurs when new comments are added.| +|[Range](/javascript/api/word/word.range)|[onCommentAdded](/javascript/api/word/word.range#word-word-range-oncommentadded-member)|Occurs when new comments are added.| ||[onCommentChanged](/javascript/api/word/word.range#word-word-range-oncommentchanged-member)|Occurs when a comment or its reply is changed.| ||[onCommentDeselected](/javascript/api/word/word.range#word-word-range-oncommentdeselected-member)|Occurs when a comment is deselected.| ||[onCommentSelected](/javascript/api/word/word.range#word-word-range-oncommentselected-member)|Occurs when a comment is selected.| diff --git a/docs/requirement-sets/requirement-sets.md b/docs/requirement-sets/requirement-sets.md index c6c0c57e6a..a0750dc9c6 100644 --- a/docs/requirement-sets/requirement-sets.md +++ b/docs/requirement-sets/requirement-sets.md @@ -1,7 +1,7 @@ --- title: Office client application and platform availability for Office Add-ins description: Supported requirement sets for Excel, OneNote, Outlook, PowerPoint, Project, and Word. -ms.date: 10/31/2024 +ms.date: 11/18/2024 ms.topic: overview ms.localizationpriority: high --- @@ -82,15 +82,15 @@ To work as expected, your Office Add-in might depend on a specific Office applic |Platform|Extension points|Application-specific API requirement sets|[Common API requirement sets](common/office-add-in-requirement-sets.md)| |---|---|---|---| -|Office on the web|
    • TaskPane
    • [Add-in Commands](common/add-in-commands-requirement-sets.md)
    |
    • [WordApi 1.1](word/word-api-1-1-requirement-set.md)
    • [WordApi 1.2](word/word-api-1-2-requirement-set.md)
    • [WordApi 1.3](word/word-api-1-3-requirement-set.md)
    • [WordApi 1.4](word/word-api-1-4-requirement-set.md)
    • [WordApi 1.5](word/word-api-1-5-requirement-set.md)
    • [WordApi 1.6](word/word-api-1-6-requirement-set.md)
    • [WordApi 1.7](word/word-api-1-7-requirement-set.md)
    • [WordApi 1.8](word/word-api-1-8-requirement-set.md)
    • [WordApiOnline 1.1](word/word-api-online-requirement-set.md)
    |
    • [BindingEvents](common/office-add-in-requirement-sets.md#bindingevents)
    • [CustomXmlParts](common/office-add-in-requirement-sets.md#customxmlparts)
    • [DevicePermissionService 1.1](common/device-permission-service-requirement-sets.md)
    • [DialogApi 1.1](common/dialog-api-requirement-sets.md)
    • [DialogApi 1.2](common/dialog-api-requirement-sets.md)
    • [DialogOrigin 1.1](common/dialog-origin-requirement-sets.md)
    • [DocumentEvents](common/office-add-in-requirement-sets.md#documentevents)
    • [File](common/office-add-in-requirement-sets.md#file)
    • [HtmlCoercion](common/office-add-in-requirement-sets.md#htmlcoercion)
    • [IdentityAPI 1.3](common/identity-api-requirement-sets.md)
    • [ImageCoercion 1.1](common/image-coercion-requirement-sets.md#imagecoercion-11)
    • [KeyboardShortcuts 1.1](common/keyboard-shortcuts-requirement-sets.md)
    • [MatrixBindings](common/office-add-in-requirement-sets.md#matrixbindings)
    • [MatrixCoercion](common/office-add-in-requirement-sets.md#matrixcoercion)
    • [NestedAppAuth 1.1](common/nested-app-auth-requirement-sets.md) (preview)
    • [OoxmlCoercion](common/office-add-in-requirement-sets.md#ooxmlcoercion)
    • [PdfFile](common/office-add-in-requirement-sets.md#pdffile)
    • [RibbonApi 1.1](common/ribbon-api-requirement-sets.md)
    • [Selection](common/office-add-in-requirement-sets.md#selection)
    • [Settings](common/office-add-in-requirement-sets.md#settings)
    • [TableBindings](common/office-add-in-requirement-sets.md#tablebindings)
    • [TableCoercion](common/office-add-in-requirement-sets.md#tablecoercion)
    • [TextBindings](common/office-add-in-requirement-sets.md#textbindings)
    • [TextCoercion](common/office-add-in-requirement-sets.md#textcoercion)
    • [TextFile](common/office-add-in-requirement-sets.md#textfile)
    | -|Office on Windows
    (Microsoft 365 subscription)|
    • TaskPane
    • [Add-in Commands](common/add-in-commands-requirement-sets.md)
    |
    • [WordApi 1.1](word/word-api-1-1-requirement-set.md)
    • [WordApi 1.2](word/word-api-1-2-requirement-set.md)
    • [WordApi 1.3](word/word-api-1-3-requirement-set.md)
    • [WordApi 1.4](word/word-api-1-4-requirement-set.md)
    • [WordApi 1.5](word/word-api-1-5-requirement-set.md)
    • [WordApi 1.6](word/word-api-1-6-requirement-set.md)
    • [WordApi 1.7](word/word-api-1-7-requirement-set.md)
    • [WordApi 1.8](word/word-api-1-8-requirement-set.md)
    • [WordApiHiddenDocument 1.3](word/word-api-1.3-hidden-document-requirement-set.md)
    • [WordApiHiddenDocument 1.4](word/word-api-1.4-hidden-document-requirement-set.md)
    • [WordApiHiddenDocument 1.5](word/word-api-1.5-hidden-document-requirement-set.md)
    • [WordApiDesktop 1.1](word/word-api-desktop-1.1-requirement-set.md)
    |
    • [BindingEvents](common/office-add-in-requirement-sets.md#bindingevents)
    • [CompressedFile](common/office-add-in-requirement-sets.md#compressedfile)
    • [CustomXmlParts](common/office-add-in-requirement-sets.md#customxmlparts)
    • [DialogApi 1.1](common/dialog-api-requirement-sets.md)
    • [DialogApi 1.2](common/dialog-api-requirement-sets.md)
    • [DialogOrigin 1.1](common/dialog-origin-requirement-sets.md)
    • [DocumentEvents](common/office-add-in-requirement-sets.md#documentevents)
    • [File](common/office-add-in-requirement-sets.md#file)
    • [HtmlCoercion](common/office-add-in-requirement-sets.md#htmlcoercion)
    • [IdentityAPI 1.3](common/identity-api-requirement-sets.md)
    • [ImageCoercion 1.1](common/image-coercion-requirement-sets.md#imagecoercion-11)
    • [ImageCoercion 1.2](common/image-coercion-requirement-sets.md#imagecoercion-12)
    • [KeyboardShortcuts 1.1](common/keyboard-shortcuts-requirement-sets.md)
    • [MatrixBindings](common/office-add-in-requirement-sets.md#matrixbindings)
    • [MatrixCoercion](common/office-add-in-requirement-sets.md#matrixcoercion)
    • [NestedAppAuth 1.1](common/nested-app-auth-requirement-sets.md) (preview)
    • [OoxmlCoercion](common/office-add-in-requirement-sets.md#ooxmlcoercion)
    • [OpenBrowserWindowApi 1.1](common/open-browser-window-api-requirement-sets.md)
    • [PdfFile](common/office-add-in-requirement-sets.md#pdffile)
    • [RibbonApi 1.1](common/ribbon-api-requirement-sets.md)
    • [Selection](common/office-add-in-requirement-sets.md#selection)
    • [Settings](common/office-add-in-requirement-sets.md#settings)
    • [TableBindings](common/office-add-in-requirement-sets.md#tablebindings)
    • [TableCoercion](common/office-add-in-requirement-sets.md#tablecoercion)
    • [TextBindings](common/office-add-in-requirement-sets.md#textbindings)
    • [TextCoercion](common/office-add-in-requirement-sets.md#textcoercion)
    • [TextFile](common/office-add-in-requirement-sets.md#textfile)
    | -|Office on Windows
    (retail perpetual Office 2016 and later)|
    • TaskPane
    • [Add-in Commands](common/add-in-commands-requirement-sets.md)
    |
    • [WordApi 1.1](word/word-api-1-1-requirement-set.md)
    • [WordApi 1.2](word/word-api-1-2-requirement-set.md)
    • [WordApi 1.3](word/word-api-1-3-requirement-set.md)
    • [WordApi 1.4](word/word-api-1-4-requirement-set.md)
    • [WordApi 1.5](word/word-api-1-5-requirement-set.md)
    • [WordApi 1.6](word/word-api-1-6-requirement-set.md)
    • [WordApi 1.7](word/word-api-1-7-requirement-set.md)
    • [WordApi 1.8](word/word-api-1-8-requirement-set.md)
    • [WordApiHiddenDocument 1.3](word/word-api-1.3-hidden-document-requirement-set.md)
    • [WordApiHiddenDocument 1.4](word/word-api-1.4-hidden-document-requirement-set.md)
    • [WordApiHiddenDocument 1.5](word/word-api-1.5-hidden-document-requirement-set.md)
    • [WordApiDesktop 1.1](word/word-api-desktop-1.1-requirement-set.md)
    |
    • [BindingEvents](common/office-add-in-requirement-sets.md#bindingevents)
    • [CompressedFile](common/office-add-in-requirement-sets.md#compressedfile)
    • [CustomXmlParts](common/office-add-in-requirement-sets.md#customxmlparts)
    • [DialogApi 1.1](common/dialog-api-requirement-sets.md)
    • [DialogApi 1.2](common/dialog-api-requirement-sets.md)
    • [DialogOrigin 1.1](common/dialog-origin-requirement-sets.md)
    • [DocumentEvents](common/office-add-in-requirement-sets.md#documentevents)
    • [File](common/office-add-in-requirement-sets.md#file)
    • [HtmlCoercion](common/office-add-in-requirement-sets.md#htmlcoercion)
    • [IdentityAPI 1.3](common/identity-api-requirement-sets.md)
    • [ImageCoercion 1.1](common/image-coercion-requirement-sets.md#imagecoercion-11)
    • [ImageCoercion 1.2](common/image-coercion-requirement-sets.md#imagecoercion-12)
    • [KeyboardShortcuts 1.1](common/keyboard-shortcuts-requirement-sets.md)
    • [MatrixBindings](common/office-add-in-requirement-sets.md#matrixbindings)
    • [MatrixCoercion](common/office-add-in-requirement-sets.md#matrixcoercion)
    • [OoxmlCoercion](common/office-add-in-requirement-sets.md#ooxmlcoercion)
    • [OpenBrowserWindowApi 1.1](common/open-browser-window-api-requirement-sets.md)
    • [PdfFile](common/office-add-in-requirement-sets.md#pdffile)
    • [RibbonApi 1.1](common/ribbon-api-requirement-sets.md)
    • [Selection](common/office-add-in-requirement-sets.md#selection)
    • [Settings](common/office-add-in-requirement-sets.md#settings)
    • [TableBindings](common/office-add-in-requirement-sets.md#tablebindings)
    • [TableCoercion](common/office-add-in-requirement-sets.md#tablecoercion)
    • [TextBindings](common/office-add-in-requirement-sets.md#textbindings)
    • [TextCoercion](common/office-add-in-requirement-sets.md#textcoercion)
    • [TextFile](common/office-add-in-requirement-sets.md#textfile)
    | +|Office on the web|
    • TaskPane
    • [Add-in Commands](common/add-in-commands-requirement-sets.md)
    |
    • [WordApi 1.1](word/word-api-1-1-requirement-set.md)
    • [WordApi 1.2](word/word-api-1-2-requirement-set.md)
    • [WordApi 1.3](word/word-api-1-3-requirement-set.md)
    • [WordApi 1.4](word/word-api-1-4-requirement-set.md)
    • [WordApi 1.5](word/word-api-1-5-requirement-set.md)
    • [WordApi 1.6](word/word-api-1-6-requirement-set.md)
    • [WordApi 1.7](word/word-api-1-7-requirement-set.md)
    • [WordApi 1.8](word/word-api-1-8-requirement-set.md)
    • [WordApi 1.9](word/word-api-1-9-requirement-set.md)
    • [WordApiOnline 1.1](word/word-api-online-requirement-set.md)
    |
    • [BindingEvents](common/office-add-in-requirement-sets.md#bindingevents)
    • [CustomXmlParts](common/office-add-in-requirement-sets.md#customxmlparts)
    • [DevicePermissionService 1.1](common/device-permission-service-requirement-sets.md)
    • [DialogApi 1.1](common/dialog-api-requirement-sets.md)
    • [DialogApi 1.2](common/dialog-api-requirement-sets.md)
    • [DialogOrigin 1.1](common/dialog-origin-requirement-sets.md)
    • [DocumentEvents](common/office-add-in-requirement-sets.md#documentevents)
    • [File](common/office-add-in-requirement-sets.md#file)
    • [HtmlCoercion](common/office-add-in-requirement-sets.md#htmlcoercion)
    • [IdentityAPI 1.3](common/identity-api-requirement-sets.md)
    • [ImageCoercion 1.1](common/image-coercion-requirement-sets.md#imagecoercion-11)
    • [KeyboardShortcuts 1.1](common/keyboard-shortcuts-requirement-sets.md)
    • [MatrixBindings](common/office-add-in-requirement-sets.md#matrixbindings)
    • [MatrixCoercion](common/office-add-in-requirement-sets.md#matrixcoercion)
    • [NestedAppAuth 1.1](common/nested-app-auth-requirement-sets.md) (preview)
    • [OoxmlCoercion](common/office-add-in-requirement-sets.md#ooxmlcoercion)
    • [PdfFile](common/office-add-in-requirement-sets.md#pdffile)
    • [RibbonApi 1.1](common/ribbon-api-requirement-sets.md)
    • [Selection](common/office-add-in-requirement-sets.md#selection)
    • [Settings](common/office-add-in-requirement-sets.md#settings)
    • [TableBindings](common/office-add-in-requirement-sets.md#tablebindings)
    • [TableCoercion](common/office-add-in-requirement-sets.md#tablecoercion)
    • [TextBindings](common/office-add-in-requirement-sets.md#textbindings)
    • [TextCoercion](common/office-add-in-requirement-sets.md#textcoercion)
    • [TextFile](common/office-add-in-requirement-sets.md#textfile)
    | +|Office on Windows
    (Microsoft 365 subscription)|
    • TaskPane
    • [Add-in Commands](common/add-in-commands-requirement-sets.md)
    |
    • [WordApi 1.1](word/word-api-1-1-requirement-set.md)
    • [WordApi 1.2](word/word-api-1-2-requirement-set.md)
    • [WordApi 1.3](word/word-api-1-3-requirement-set.md)
    • [WordApi 1.4](word/word-api-1-4-requirement-set.md)
    • [WordApi 1.5](word/word-api-1-5-requirement-set.md)
    • [WordApi 1.6](word/word-api-1-6-requirement-set.md)
    • [WordApi 1.7](word/word-api-1-7-requirement-set.md)
    • [WordApi 1.8](word/word-api-1-8-requirement-set.md)
    • [WordApi 1.9](word/word-api-1-9-requirement-set.md)
    • [WordApiHiddenDocument 1.3](word/word-api-1.3-hidden-document-requirement-set.md)
    • [WordApiHiddenDocument 1.4](word/word-api-1.4-hidden-document-requirement-set.md)
    • [WordApiHiddenDocument 1.5](word/word-api-1.5-hidden-document-requirement-set.md)
    • [WordApiDesktop 1.1](word/word-api-desktop-1.1-requirement-set.md)
    |
    • [BindingEvents](common/office-add-in-requirement-sets.md#bindingevents)
    • [CompressedFile](common/office-add-in-requirement-sets.md#compressedfile)
    • [CustomXmlParts](common/office-add-in-requirement-sets.md#customxmlparts)
    • [DialogApi 1.1](common/dialog-api-requirement-sets.md)
    • [DialogApi 1.2](common/dialog-api-requirement-sets.md)
    • [DialogOrigin 1.1](common/dialog-origin-requirement-sets.md)
    • [DocumentEvents](common/office-add-in-requirement-sets.md#documentevents)
    • [File](common/office-add-in-requirement-sets.md#file)
    • [HtmlCoercion](common/office-add-in-requirement-sets.md#htmlcoercion)
    • [IdentityAPI 1.3](common/identity-api-requirement-sets.md)
    • [ImageCoercion 1.1](common/image-coercion-requirement-sets.md#imagecoercion-11)
    • [ImageCoercion 1.2](common/image-coercion-requirement-sets.md#imagecoercion-12)
    • [KeyboardShortcuts 1.1](common/keyboard-shortcuts-requirement-sets.md)
    • [MatrixBindings](common/office-add-in-requirement-sets.md#matrixbindings)
    • [MatrixCoercion](common/office-add-in-requirement-sets.md#matrixcoercion)
    • [NestedAppAuth 1.1](common/nested-app-auth-requirement-sets.md) (preview)
    • [OoxmlCoercion](common/office-add-in-requirement-sets.md#ooxmlcoercion)
    • [OpenBrowserWindowApi 1.1](common/open-browser-window-api-requirement-sets.md)
    • [PdfFile](common/office-add-in-requirement-sets.md#pdffile)
    • [RibbonApi 1.1](common/ribbon-api-requirement-sets.md)
    • [Selection](common/office-add-in-requirement-sets.md#selection)
    • [Settings](common/office-add-in-requirement-sets.md#settings)
    • [TableBindings](common/office-add-in-requirement-sets.md#tablebindings)
    • [TableCoercion](common/office-add-in-requirement-sets.md#tablecoercion)
    • [TextBindings](common/office-add-in-requirement-sets.md#textbindings)
    • [TextCoercion](common/office-add-in-requirement-sets.md#textcoercion)
    • [TextFile](common/office-add-in-requirement-sets.md#textfile)
    | +|Office on Windows
    (retail perpetual Office 2016 and later)|
    • TaskPane
    • [Add-in Commands](common/add-in-commands-requirement-sets.md)
    |
    • [WordApi 1.1](word/word-api-1-1-requirement-set.md)
    • [WordApi 1.2](word/word-api-1-2-requirement-set.md)
    • [WordApi 1.3](word/word-api-1-3-requirement-set.md)
    • [WordApi 1.4](word/word-api-1-4-requirement-set.md)
    • [WordApi 1.5](word/word-api-1-5-requirement-set.md)
    • [WordApi 1.6](word/word-api-1-6-requirement-set.md)
    • [WordApi 1.7](word/word-api-1-7-requirement-set.md)
    • [WordApi 1.8](word/word-api-1-8-requirement-set.md)
    • [WordApi 1.9](word/word-api-1-9-requirement-set.md)
    • [WordApiHiddenDocument 1.3](word/word-api-1.3-hidden-document-requirement-set.md)
    • [WordApiHiddenDocument 1.4](word/word-api-1.4-hidden-document-requirement-set.md)
    • [WordApiHiddenDocument 1.5](word/word-api-1.5-hidden-document-requirement-set.md)
    • [WordApiDesktop 1.1](word/word-api-desktop-1.1-requirement-set.md)
    |
    • [BindingEvents](common/office-add-in-requirement-sets.md#bindingevents)
    • [CompressedFile](common/office-add-in-requirement-sets.md#compressedfile)
    • [CustomXmlParts](common/office-add-in-requirement-sets.md#customxmlparts)
    • [DialogApi 1.1](common/dialog-api-requirement-sets.md)
    • [DialogApi 1.2](common/dialog-api-requirement-sets.md)
    • [DialogOrigin 1.1](common/dialog-origin-requirement-sets.md)
    • [DocumentEvents](common/office-add-in-requirement-sets.md#documentevents)
    • [File](common/office-add-in-requirement-sets.md#file)
    • [HtmlCoercion](common/office-add-in-requirement-sets.md#htmlcoercion)
    • [IdentityAPI 1.3](common/identity-api-requirement-sets.md)
    • [ImageCoercion 1.1](common/image-coercion-requirement-sets.md#imagecoercion-11)
    • [ImageCoercion 1.2](common/image-coercion-requirement-sets.md#imagecoercion-12)
    • [KeyboardShortcuts 1.1](common/keyboard-shortcuts-requirement-sets.md)
    • [MatrixBindings](common/office-add-in-requirement-sets.md#matrixbindings)
    • [MatrixCoercion](common/office-add-in-requirement-sets.md#matrixcoercion)
    • [OoxmlCoercion](common/office-add-in-requirement-sets.md#ooxmlcoercion)
    • [OpenBrowserWindowApi 1.1](common/open-browser-window-api-requirement-sets.md)
    • [PdfFile](common/office-add-in-requirement-sets.md#pdffile)
    • [RibbonApi 1.1](common/ribbon-api-requirement-sets.md)
    • [Selection](common/office-add-in-requirement-sets.md#selection)
    • [Settings](common/office-add-in-requirement-sets.md#settings)
    • [TableBindings](common/office-add-in-requirement-sets.md#tablebindings)
    • [TableCoercion](common/office-add-in-requirement-sets.md#tablecoercion)
    • [TextBindings](common/office-add-in-requirement-sets.md#textbindings)
    • [TextCoercion](common/office-add-in-requirement-sets.md#textcoercion)
    • [TextFile](common/office-add-in-requirement-sets.md#textfile)
    | |Office 2024 on Windows
    (volume-licensed perpetual)|
    • TaskPane
    • [Add-in Commands](common/add-in-commands-requirement-sets.md)
    |
    • [WordApi 1.1](word/word-api-1-1-requirement-set.md)
    • [WordApi 1.2](word/word-api-1-2-requirement-set.md)
    • [WordApi 1.3](word/word-api-1-3-requirement-set.md)
    • [WordApi 1.4](word/word-api-1-4-requirement-set.md)
    • [WordApi 1.5](word/word-api-1-5-requirement-set.md)
    • [WordApi 1.6](word/word-api-1-6-requirement-set.md)
    • [WordApi 1.7](word/word-api-1-7-requirement-set.md)
    • [WordApi 1.8](word/word-api-1-8-requirement-set.md)
    • [WordApiDesktop 1.1](word/word-api-desktop-1.1-requirement-set.md)
    |
    • [BindingEvents](common/office-add-in-requirement-sets.md#bindingevents)
    • [CompressedFile](common/office-add-in-requirement-sets.md#compressedfile)
    • [CustomXmlParts](common/office-add-in-requirement-sets.md#customxmlparts)
    • [DialogApi 1.1](common/dialog-api-requirement-sets.md)
    • [DialogApi 1.2](common/dialog-api-requirement-sets.md)
    • [DialogOrigin 1.1](common/dialog-origin-requirement-sets.md)
    • [DocumentEvents](common/office-add-in-requirement-sets.md#documentevents)
    • [File](common/office-add-in-requirement-sets.md#file)
    • [HtmlCoercion](common/office-add-in-requirement-sets.md#htmlcoercion)
    • [IdentityAPI 1.3](common/identity-api-requirement-sets.md)
    • [ImageCoercion 1.1](common/image-coercion-requirement-sets.md#imagecoercion-11)
    • [ImageCoercion 1.2](common/image-coercion-requirement-sets.md#imagecoercion-12)
    • [MatrixBindings](common/office-add-in-requirement-sets.md#matrixbindings)
    • [MatrixCoercion](common/office-add-in-requirement-sets.md#matrixcoercion)
    • [OoxmlCoercion](common/office-add-in-requirement-sets.md#ooxmlcoercion)
    • [OpenBrowserWindowApi 1.1](common/open-browser-window-api-requirement-sets.md)
    • [PdfFile](common/office-add-in-requirement-sets.md#pdffile)
    • [RibbonApi 1.1](common/ribbon-api-requirement-sets.md)
    • [Selection](common/office-add-in-requirement-sets.md#selection)
    • [Settings](common/office-add-in-requirement-sets.md#settings)
    • [TableBindings](common/office-add-in-requirement-sets.md#tablebindings)
    • [TableCoercion](common/office-add-in-requirement-sets.md#tablecoercion)
    • [TextBindings](common/office-add-in-requirement-sets.md#textbindings)
    • [TextCoercion](common/office-add-in-requirement-sets.md#textcoercion)
    • [TextFile](common/office-add-in-requirement-sets.md#textfile)
    | |Office 2021 on Windows
    (volume-licensed perpetual)|
    • TaskPane
    • [Add-in Commands](common/add-in-commands-requirement-sets.md)
    |
    • [WordApi 1.1](word/word-api-1-1-requirement-set.md)
    • [WordApi 1.2](word/word-api-1-2-requirement-set.md)
    • [WordApi 1.3](word/word-api-1-3-requirement-set.md)
    • [WordApiHiddenDocument 1.3](word/word-api-1.3-hidden-document-requirement-set.md)
    |
    • [BindingEvents](common/office-add-in-requirement-sets.md#bindingevents)
    • [CompressedFile](common/office-add-in-requirement-sets.md#compressedfile)
    • [CustomXmlParts](common/office-add-in-requirement-sets.md#customxmlparts)
    • [DialogApi 1.1](common/dialog-api-requirement-sets.md)
    • [DialogApi 1.2](common/dialog-api-requirement-sets.md)
    • [DialogOrigin 1.1](common/dialog-origin-requirement-sets.md)
    • [DocumentEvents](common/office-add-in-requirement-sets.md#documentevents)
    • [File](common/office-add-in-requirement-sets.md#file)
    • [HtmlCoercion](common/office-add-in-requirement-sets.md#htmlcoercion)
    • [IdentityAPI 1.3](common/identity-api-requirement-sets.md)
    • [ImageCoercion 1.1](common/image-coercion-requirement-sets.md#imagecoercion-11)
    • [ImageCoercion 1.2](common/image-coercion-requirement-sets.md#imagecoercion-12)
    • [MatrixBindings](common/office-add-in-requirement-sets.md#matrixbindings)
    • [MatrixCoercion](common/office-add-in-requirement-sets.md#matrixcoercion)
    • [OoxmlCoercion](common/office-add-in-requirement-sets.md#ooxmlcoercion)
    • [OpenBrowserWindowApi 1.1](common/open-browser-window-api-requirement-sets.md)
    • [PdfFile](common/office-add-in-requirement-sets.md#pdffile)
    • [RibbonApi 1.1](common/ribbon-api-requirement-sets.md)
    • [Selection](common/office-add-in-requirement-sets.md#selection)
    • [Settings](common/office-add-in-requirement-sets.md#settings)
    • [TableBindings](common/office-add-in-requirement-sets.md#tablebindings)
    • [TableCoercion](common/office-add-in-requirement-sets.md#tablecoercion)
    • [TextBindings](common/office-add-in-requirement-sets.md#textbindings)
    • [TextCoercion](common/office-add-in-requirement-sets.md#textcoercion)
    • [TextFile](common/office-add-in-requirement-sets.md#textfile)
    | |Office 2019 on Windows
    (volume-licensed perpetual)|
    • TaskPane
    • [Add-in Commands](common/add-in-commands-requirement-sets.md)
    |
    • [WordApi 1.1](word/word-api-1-1-requirement-set.md)
    • [WordApi 1.2](word/word-api-1-2-requirement-set.md)
    • [WordApi 1.3](word/word-api-1-3-requirement-set.md)
    • [WordApiHiddenDocument 1.3](word/word-api-1.3-hidden-document-requirement-set.md)
    |
    • [BindingEvents](common/office-add-in-requirement-sets.md#bindingevents)
    • [CompressedFile](common/office-add-in-requirement-sets.md#compressedfile)
    • [CustomXmlParts](common/office-add-in-requirement-sets.md#customxmlparts)
    • [DialogApi 1.1](common/dialog-api-requirement-sets.md)
    • [DocumentEvents](common/office-add-in-requirement-sets.md#documentevents)
    • [File](common/office-add-in-requirement-sets.md#file)
    • [DialogOrigin 1.1](common/dialog-origin-requirement-sets.md)
    • [HtmlCoercion](common/office-add-in-requirement-sets.md#htmlcoercion)
    • [ImageCoercion 1.1](common/image-coercion-requirement-sets.md#imagecoercion-11)
    • [MatrixBindings](common/office-add-in-requirement-sets.md#matrixbindings)
    • [MatrixCoercion](common/office-add-in-requirement-sets.md#matrixcoercion)
    • [OoxmlCoercion](common/office-add-in-requirement-sets.md#ooxmlcoercion)
    • [PdfFile](common/office-add-in-requirement-sets.md#pdffile)
    • [Selection](common/office-add-in-requirement-sets.md#selection)
    • [Settings](common/office-add-in-requirement-sets.md#settings)
    • [TableBindings](common/office-add-in-requirement-sets.md#tablebindings)
    • [TableCoercion](common/office-add-in-requirement-sets.md#tablecoercion)
    • [TextBindings](common/office-add-in-requirement-sets.md#textbindings)
    • [TextCoercion](common/office-add-in-requirement-sets.md#textcoercion)
    • [TextFile](common/office-add-in-requirement-sets.md#textfile)
    | |Office 2016 on Windows
    (volume-licensed perpetual)|
    • TaskPane
    |
    • [WordApi 1.1](word/word-api-1-1-requirement-set.md)
    |
    • [BindingEvents](common/office-add-in-requirement-sets.md#bindingevents)
    • [CompressedFile](common/office-add-in-requirement-sets.md#compressedfile)
    • [CustomXmlParts](common/office-add-in-requirement-sets.md#customxmlparts)
    • [DialogApi 1.1](common/dialog-api-requirement-sets.md)\*
    • [DialogOrigin 1.1](common/dialog-origin-requirement-sets.md)
    • [DocumentEvents](common/office-add-in-requirement-sets.md#documentevents)
    • [File](common/office-add-in-requirement-sets.md#file)
    • [HtmlCoercion](common/office-add-in-requirement-sets.md#htmlcoercion)
    • [ImageCoercion 1.1](common/image-coercion-requirement-sets.md#imagecoercion-11)
    • [MatrixBindings](common/office-add-in-requirement-sets.md#matrixbindings)
    • [MatrixCoercion](common/office-add-in-requirement-sets.md#matrixcoercion)
    • [OoxmlCoercion](common/office-add-in-requirement-sets.md#ooxmlcoercion)
    • [PdfFile](common/office-add-in-requirement-sets.md#pdffile)
    • [Selection](common/office-add-in-requirement-sets.md#selection)
    • [Settings](common/office-add-in-requirement-sets.md#settings)
    • [TableBindings](common/office-add-in-requirement-sets.md#tablebindings)
    • [TableCoercion](common/office-add-in-requirement-sets.md#tablecoercion)
    • [TextBindings](common/office-add-in-requirement-sets.md#textbindings)
    • [TextCoercion](common/office-add-in-requirement-sets.md#textcoercion)
    • [TextFile](common/office-add-in-requirement-sets.md#textfile)
    | -|Office on Mac|
    • TaskPane
    • [Add-in Commands](common/add-in-commands-requirement-sets.md)
    |
    • [WordApi 1.1](word/word-api-1-1-requirement-set.md)
    • [WordApi 1.2](word/word-api-1-2-requirement-set.md)
    • [WordApi 1.3](word/word-api-1-3-requirement-set.md)
    • [WordApi 1.4](word/word-api-1-4-requirement-set.md)
    • [WordApi 1.5](word/word-api-1-5-requirement-set.md)
    • [WordApi 1.6](word/word-api-1-6-requirement-set.md)
    • [WordApi 1.7](word/word-api-1-7-requirement-set.md)
    • [WordApi 1.8](word/word-api-1-8-requirement-set.md)
    • [WordApiHiddenDocument 1.3](word/word-api-1.3-hidden-document-requirement-set.md)
    • [WordApiHiddenDocument 1.4](word/word-api-1.4-hidden-document-requirement-set.md)
    • [WordApiHiddenDocument 1.5](word/word-api-1.5-hidden-document-requirement-set.md)
    • [WordApiDesktop 1.1](word/word-api-desktop-1.1-requirement-set.md)
    |
    • [BindingEvents](common/office-add-in-requirement-sets.md#bindingevents)
    • [CompressedFile](common/office-add-in-requirement-sets.md#compressedfile)
    • [CustomXmlParts](common/office-add-in-requirement-sets.md#customxmlparts)
    • [DialogApi 1.1](common/dialog-api-requirement-sets.md)
    • [DialogApi 1.2](common/dialog-api-requirement-sets.md)
    • [DialogOrigin 1.1](common/dialog-origin-requirement-sets.md)
    • [DocumentEvents](common/office-add-in-requirement-sets.md#documentevents)
    • [File](common/office-add-in-requirement-sets.md#file)
    • [HtmlCoercion](common/office-add-in-requirement-sets.md#htmlcoercion)
    • [IdentityAPI 1.3](common/identity-api-requirement-sets.md)
    • [ImageCoercion 1.1](common/image-coercion-requirement-sets.md#imagecoercion-11)
    • [ImageCoercion 1.2](common/image-coercion-requirement-sets.md#imagecoercion-12)
    • [KeyboardShortcuts 1.1](common/keyboard-shortcuts-requirement-sets.md)
    • [MatrixBindings](common/office-add-in-requirement-sets.md#matrixbindings)
    • [MatrixCoercion](common/office-add-in-requirement-sets.md#matrixcoercion)
    • [NestedAppAuth 1.1](common/nested-app-auth-requirement-sets.md) (preview)
    • [OoxmlCoercion](common/office-add-in-requirement-sets.md#ooxmlcoercion)
    • [OpenBrowserWindowApi 1.1](common/open-browser-window-api-requirement-sets.md)
    • [PdfFile](common/office-add-in-requirement-sets.md#pdffile)
    • [RibbonApi 1.1](common/ribbon-api-requirement-sets.md)
    • [Selection](common/office-add-in-requirement-sets.md#selection)
    • [Settings](common/office-add-in-requirement-sets.md#settings)
    • [TableBindings](common/office-add-in-requirement-sets.md#tablebindings)
    • [TableCoercion](common/office-add-in-requirement-sets.md#tablecoercion)
    • [TextBindings](common/office-add-in-requirement-sets.md#textbindings)
    • [TextCoercion](common/office-add-in-requirement-sets.md#textcoercion)
    • [TextFile](common/office-add-in-requirement-sets.md#textfile)
    | -|Office on iPad
    (Microsoft 365 subscription)|
    • TaskPane
    |
    • [WordApi 1.1](word/word-api-1-1-requirement-set.md)
    • [WordApi 1.2](word/word-api-1-2-requirement-set.md)
    • [WordApi 1.3](word/word-api-1-3-requirement-set.md)
    • [WordApi 1.4](word/word-api-1-4-requirement-set.md)
    • [WordApi 1.5](word/word-api-1-5-requirement-set.md)
    • [WordApi 1.6](word/word-api-1-6-requirement-set.md)
    • [WordApi 1.7](word/word-api-1-7-requirement-set.md)
    • [WordApi 1.8](word/word-api-1-8-requirement-set.md)
    • [WordApiDesktop 1.1](word/word-api-desktop-1.1-requirement-set.md)
    |
    • [BindingEvents](common/office-add-in-requirement-sets.md#bindingevents)
    • [CompressedFile](common/office-add-in-requirement-sets.md#compressedfile)
    • [CustomXmlParts](common/office-add-in-requirement-sets.md#customxmlparts)
    • [DialogApi 1.1](common/dialog-api-requirement-sets.md)
    • [DialogApi 1.2](common/dialog-api-requirement-sets.md)
    • [DialogOrigin 1.1](common/dialog-origin-requirement-sets.md)
    • [DocumentEvents](common/office-add-in-requirement-sets.md#documentevents)
    • [File](common/office-add-in-requirement-sets.md#file)
    • [HtmlCoercion](common/office-add-in-requirement-sets.md#htmlcoercion)
    • [ImageCoercion 1.1](common/image-coercion-requirement-sets.md#imagecoercion-11)
    • [MatrixBindings](common/office-add-in-requirement-sets.md#matrixbindings)
    • [MatrixCoercion](common/office-add-in-requirement-sets.md#matrixcoercion)
    • [NestedAppAuth 1.1](common/nested-app-auth-requirement-sets.md) (preview)
    • [OoxmlCoercion](common/office-add-in-requirement-sets.md#ooxmlcoercion)
    • [OpenBrowserWindowApi 1.1](common/open-browser-window-api-requirement-sets.md)
    • [PdfFile](common/office-add-in-requirement-sets.md#pdffile)
    • [Selection](common/office-add-in-requirement-sets.md#selection)
    • [Settings](common/office-add-in-requirement-sets.md#settings)
    • [TableBindings](common/office-add-in-requirement-sets.md#tablebindings)
    • [TableCoercion](common/office-add-in-requirement-sets.md#tablecoercion)
    • [TextBindings](common/office-add-in-requirement-sets.md#textbindings)
    • [TextCoercion](common/office-add-in-requirement-sets.md#textcoercion)
    • [TextFile](common/office-add-in-requirement-sets.md#textfile)
    | +|Office on Mac|
    • TaskPane
    • [Add-in Commands](common/add-in-commands-requirement-sets.md)
    |
    • [WordApi 1.1](word/word-api-1-1-requirement-set.md)
    • [WordApi 1.2](word/word-api-1-2-requirement-set.md)
    • [WordApi 1.3](word/word-api-1-3-requirement-set.md)
    • [WordApi 1.4](word/word-api-1-4-requirement-set.md)
    • [WordApi 1.5](word/word-api-1-5-requirement-set.md)
    • [WordApi 1.6](word/word-api-1-6-requirement-set.md)
    • [WordApi 1.7](word/word-api-1-7-requirement-set.md)
    • [WordApi 1.8](word/word-api-1-8-requirement-set.md)
    • [WordApi 1.9](word/word-api-1-9-requirement-set.md)
    • [WordApiHiddenDocument 1.3](word/word-api-1.3-hidden-document-requirement-set.md)
    • [WordApiHiddenDocument 1.4](word/word-api-1.4-hidden-document-requirement-set.md)
    • [WordApiHiddenDocument 1.5](word/word-api-1.5-hidden-document-requirement-set.md)
    • [WordApiDesktop 1.1](word/word-api-desktop-1.1-requirement-set.md)
    |
    • [BindingEvents](common/office-add-in-requirement-sets.md#bindingevents)
    • [CompressedFile](common/office-add-in-requirement-sets.md#compressedfile)
    • [CustomXmlParts](common/office-add-in-requirement-sets.md#customxmlparts)
    • [DialogApi 1.1](common/dialog-api-requirement-sets.md)
    • [DialogApi 1.2](common/dialog-api-requirement-sets.md)
    • [DialogOrigin 1.1](common/dialog-origin-requirement-sets.md)
    • [DocumentEvents](common/office-add-in-requirement-sets.md#documentevents)
    • [File](common/office-add-in-requirement-sets.md#file)
    • [HtmlCoercion](common/office-add-in-requirement-sets.md#htmlcoercion)
    • [IdentityAPI 1.3](common/identity-api-requirement-sets.md)
    • [ImageCoercion 1.1](common/image-coercion-requirement-sets.md#imagecoercion-11)
    • [ImageCoercion 1.2](common/image-coercion-requirement-sets.md#imagecoercion-12)
    • [KeyboardShortcuts 1.1](common/keyboard-shortcuts-requirement-sets.md)
    • [MatrixBindings](common/office-add-in-requirement-sets.md#matrixbindings)
    • [MatrixCoercion](common/office-add-in-requirement-sets.md#matrixcoercion)
    • [NestedAppAuth 1.1](common/nested-app-auth-requirement-sets.md) (preview)
    • [OoxmlCoercion](common/office-add-in-requirement-sets.md#ooxmlcoercion)
    • [OpenBrowserWindowApi 1.1](common/open-browser-window-api-requirement-sets.md)
    • [PdfFile](common/office-add-in-requirement-sets.md#pdffile)
    • [RibbonApi 1.1](common/ribbon-api-requirement-sets.md)
    • [Selection](common/office-add-in-requirement-sets.md#selection)
    • [Settings](common/office-add-in-requirement-sets.md#settings)
    • [TableBindings](common/office-add-in-requirement-sets.md#tablebindings)
    • [TableCoercion](common/office-add-in-requirement-sets.md#tablecoercion)
    • [TextBindings](common/office-add-in-requirement-sets.md#textbindings)
    • [TextCoercion](common/office-add-in-requirement-sets.md#textcoercion)
    • [TextFile](common/office-add-in-requirement-sets.md#textfile)
    | +|Office on iPad
    (Microsoft 365 subscription)|
    • TaskPane
    |
    • [WordApi 1.1](word/word-api-1-1-requirement-set.md)
    • [WordApi 1.2](word/word-api-1-2-requirement-set.md)
    • [WordApi 1.3](word/word-api-1-3-requirement-set.md)
    • [WordApi 1.4](word/word-api-1-4-requirement-set.md)
    • [WordApi 1.5](word/word-api-1-5-requirement-set.md)
    • [WordApi 1.6](word/word-api-1-6-requirement-set.md)
    • [WordApi 1.7](word/word-api-1-7-requirement-set.md)
    • [WordApi 1.8](word/word-api-1-8-requirement-set.md)
    • [WordApi 1.9](word/word-api-1-9-requirement-set.md)
    • [WordApiDesktop 1.1](word/word-api-desktop-1.1-requirement-set.md)
    |
    • [BindingEvents](common/office-add-in-requirement-sets.md#bindingevents)
    • [CompressedFile](common/office-add-in-requirement-sets.md#compressedfile)
    • [CustomXmlParts](common/office-add-in-requirement-sets.md#customxmlparts)
    • [DialogApi 1.1](common/dialog-api-requirement-sets.md)
    • [DialogApi 1.2](common/dialog-api-requirement-sets.md)
    • [DialogOrigin 1.1](common/dialog-origin-requirement-sets.md)
    • [DocumentEvents](common/office-add-in-requirement-sets.md#documentevents)
    • [File](common/office-add-in-requirement-sets.md#file)
    • [HtmlCoercion](common/office-add-in-requirement-sets.md#htmlcoercion)
    • [ImageCoercion 1.1](common/image-coercion-requirement-sets.md#imagecoercion-11)
    • [MatrixBindings](common/office-add-in-requirement-sets.md#matrixbindings)
    • [MatrixCoercion](common/office-add-in-requirement-sets.md#matrixcoercion)
    • [NestedAppAuth 1.1](common/nested-app-auth-requirement-sets.md) (preview)
    • [OoxmlCoercion](common/office-add-in-requirement-sets.md#ooxmlcoercion)
    • [OpenBrowserWindowApi 1.1](common/open-browser-window-api-requirement-sets.md)
    • [PdfFile](common/office-add-in-requirement-sets.md#pdffile)
    • [Selection](common/office-add-in-requirement-sets.md#selection)
    • [Settings](common/office-add-in-requirement-sets.md#settings)
    • [TableBindings](common/office-add-in-requirement-sets.md#tablebindings)
    • [TableCoercion](common/office-add-in-requirement-sets.md#tablecoercion)
    • [TextBindings](common/office-add-in-requirement-sets.md#textbindings)
    • [TextCoercion](common/office-add-in-requirement-sets.md#textcoercion)
    • [TextFile](common/office-add-in-requirement-sets.md#textfile)
    | ** Added with post-release updates.* diff --git a/docs/requirement-sets/toc.yml b/docs/requirement-sets/toc.yml index 1535909474..87627a8d92 100644 --- a/docs/requirement-sets/toc.yml +++ b/docs/requirement-sets/toc.yml @@ -301,6 +301,9 @@ - name: WordApiDesktop 1.1 requirement set href: ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word - name: WordApi 1.8 requirement set href: ../../requirement-sets/word/word-api-1-8-requirement-set.md displayName: Word diff --git a/docs/requirement-sets/word/word-api-1-1-requirement-set.md b/docs/requirement-sets/word/word-api-1-1-requirement-set.md index 08b0808a57..39ea9979ca 100644 --- a/docs/requirement-sets/word/word-api-1-1-requirement-set.md +++ b/docs/requirement-sets/word/word-api-1-1-requirement-set.md @@ -14,150 +14,7 @@ WordApi 1.1 is the first requirement set of the Word JavaScript API. It's the on The following table lists the APIs in Word JavaScript API requirement set 1.1. To view API reference documentation for all APIs supported by Word JavaScript API requirement set 1.1, see [Word APIs in requirement set 1.1](/javascript/api/word?view=word-js-1.1&preserve-view=true). -| Class | Fields | Description | -|:---|:---|:---| -|[Body](/javascript/api/word/word.body)|[clear()](/javascript/api/word/word.body#word-word-body-clear-member(1))|Clears the contents of the body object.| -||[contentControls](/javascript/api/word/word.body#word-word-body-contentcontrols-member)|Gets the collection of rich text content control objects in the body.| -||[font](/javascript/api/word/word.body#word-word-body-font-member)|Gets the text format of the body.| -||[getHtml()](/javascript/api/word/word.body#word-word-body-gethtml-member(1))|Gets an HTML representation of the body object.| -||[getOoxml()](/javascript/api/word/word.body#word-word-body-getooxml-member(1))|Gets the OOXML (Office Open XML) representation of the body object.| -||[inlinePictures](/javascript/api/word/word.body#word-word-body-inlinepictures-member)|Gets the collection of InlinePicture objects in the body.| -||[insertBreak(breakType: Word.BreakType \| "Page" \| "Next" \| "SectionNext" \| "SectionContinuous" \| "SectionEven" \| "SectionOdd" \| "Line", insertLocation: Word.InsertLocation.start \| Word.InsertLocation.end \| "Start" \| "End")](/javascript/api/word/word.body#word-word-body-insertbreak-member(1))|Inserts a break at the specified location in the main document.| -||[insertContentControl()](/javascript/api/word/word.body#word-word-body-insertcontentcontrol-member(1))|Wraps the Body object with a Rich Text content control.| -||[insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace \| Word.InsertLocation.start \| Word.InsertLocation.end \| "Replace" \| "Start" \| "End")](/javascript/api/word/word.body#word-word-body-insertfilefrombase64-member(1))|Inserts a document into the body at the specified location.| -||[insertHtml(html: string, insertLocation: Word.InsertLocation.replace \| Word.InsertLocation.start \| Word.InsertLocation.end \| "Replace" \| "Start" \| "End")](/javascript/api/word/word.body#word-word-body-inserthtml-member(1))|Inserts HTML at the specified location.| -||[insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace \| Word.InsertLocation.start \| Word.InsertLocation.end \| "Replace" \| "Start" \| "End")](/javascript/api/word/word.body#word-word-body-insertooxml-member(1))|Inserts OOXML at the specified location.| -||[insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start \| Word.InsertLocation.end \| "Start" \| "End")](/javascript/api/word/word.body#word-word-body-insertparagraph-member(1))|Inserts a paragraph at the specified location.| -||[insertText(text: string, insertLocation: Word.InsertLocation.replace \| Word.InsertLocation.start \| Word.InsertLocation.end \| "Replace" \| "Start" \| "End")](/javascript/api/word/word.body#word-word-body-inserttext-member(1))|Inserts text into the body at the specified location.| -||[paragraphs](/javascript/api/word/word.body#word-word-body-paragraphs-member)|Gets the collection of paragraph objects in the body.| -||[parentContentControl](/javascript/api/word/word.body#word-word-body-parentcontentcontrol-member)|Gets the content control that contains the body.| -||[search(searchText: string, searchOptions?: Word.SearchOptions \| { ignorePunct?: boolean ignoreSpace?: boolean matchCase?: boolean matchPrefix?: boolean matchSuffix?: boolean matchWholeWord?: boolean matchWildcards?: boolean })](/javascript/api/word/word.body#word-word-body-search-member(1))|Performs a search with the specified SearchOptions on the scope of the body object.| -||[select(selectionMode?: Word.SelectionMode)](/javascript/api/word/word.body#word-word-body-select-member(1))|Selects the body and navigates the Word UI to it.| -||[style](/javascript/api/word/word.body#word-word-body-style-member)|Specifies the style name for the body.| -||[text](/javascript/api/word/word.body#word-word-body-text-member)|Gets the text of the body.| -|[ContentControl](/javascript/api/word/word.contentcontrol)|[appearance](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-appearance-member)|Specifies the appearance of the content control.| -||[cannotDelete](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-cannotdelete-member)|Specifies a value that indicates whether the user can delete the content control.| -||[cannotEdit](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-cannotedit-member)|Specifies a value that indicates whether the user can edit the contents of the content control.| -||[clear()](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-clear-member(1))|Clears the contents of the content control.| -||[color](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-color-member)|Specifies the color of the content control.| -||[contentControls](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-contentcontrols-member)|Gets the collection of content control objects in the content control.| -||[delete(keepContent: boolean)](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-delete-member(1))|Deletes the content control and its content.| -||[font](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-font-member)|Gets the text format of the content control.| -||[getHtml()](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-gethtml-member(1))|Gets an HTML representation of the content control object.| -||[getOoxml()](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-getooxml-member(1))|Gets the Office Open XML (OOXML) representation of the content control object.| -||[id](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-id-member)|Gets an integer that represents the content control identifier.| -||[inlinePictures](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-inlinepictures-member)|Gets the collection of InlinePicture objects in the content control.| -||[insertBreak(breakType: Word.BreakType \| "Page" \| "Next" \| "SectionNext" \| "SectionContinuous" \| "SectionEven" \| "SectionOdd" \| "Line", insertLocation: Word.InsertLocation.start \| Word.InsertLocation.end \| Word.InsertLocation.before \| Word.InsertLocation.after \| "Start" \| "End" \| "Before" \| "After")](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-insertbreak-member(1))|Inserts a break at the specified location in the main document.| -||[insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace \| Word.InsertLocation.start \| Word.InsertLocation.end \| "Replace" \| "Start" \| "End")](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-insertfilefrombase64-member(1))|Inserts a document into the content control at the specified location.| -||[insertHtml(html: string, insertLocation: Word.InsertLocation.replace \| Word.InsertLocation.start \| Word.InsertLocation.end \| "Replace" \| "Start" \| "End")](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-inserthtml-member(1))|Inserts HTML into the content control at the specified location.| -||[insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace \| Word.InsertLocation.start \| Word.InsertLocation.end \| "Replace" \| "Start" \| "End")](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-insertooxml-member(1))|Inserts OOXML into the content control at the specified location.| -||[insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start \| Word.InsertLocation.end \| Word.InsertLocation.before \| Word.InsertLocation.after \| "Start" \| "End" \| "Before" \| "After")](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-insertparagraph-member(1))|Inserts a paragraph at the specified location.| -||[insertText(text: string, insertLocation: Word.InsertLocation.replace \| Word.InsertLocation.start \| Word.InsertLocation.end \| "Replace" \| "Start" \| "End")](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-inserttext-member(1))|Inserts text into the content control at the specified location.| -||[paragraphs](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-paragraphs-member)|Gets the collection of paragraph objects in the content control.| -||[parentContentControl](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-parentcontentcontrol-member)|Gets the content control that contains the content control.| -||[placeholderText](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-placeholdertext-member)|Specifies the placeholder text of the content control.| -||[removeWhenEdited](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-removewhenedited-member)|Specifies a value that indicates whether the content control is removed after it is edited.| -||[search(searchText: string, searchOptions?: Word.SearchOptions \| { ignorePunct?: boolean ignoreSpace?: boolean matchCase?: boolean matchPrefix?: boolean matchSuffix?: boolean matchWholeWord?: boolean matchWildcards?: boolean })](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-search-member(1))|Performs a search with the specified SearchOptions on the scope of the content control object.| -||[select(selectionMode?: Word.SelectionMode)](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-select-member(1))|Selects the content control.| -||[style](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-style-member)|Specifies the style name for the content control.| -||[tag](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-tag-member)|Specifies a tag to identify a content control.| -||[text](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-text-member)|Gets the text of the content control.| -||[title](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-title-member)|Specifies the title for a content control.| -||[type](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-type-member)|Gets the content control type.| -|[ContentControlCollection](/javascript/api/word/word.contentcontrolcollection)|[getById(id: number)](/javascript/api/word/word.contentcontrolcollection#word-word-contentcontrolcollection-getbyid-member(1))|Gets a content control by its identifier.| -||[getByTag(tag: string)](/javascript/api/word/word.contentcontrolcollection#word-word-contentcontrolcollection-getbytag-member(1))|Gets the content controls that have the specified tag.| -||[getByTitle(title: string)](/javascript/api/word/word.contentcontrolcollection#word-word-contentcontrolcollection-getbytitle-member(1))|Gets the content controls that have the specified title.| -||[getItem(id: number)](/javascript/api/word/word.contentcontrolcollection#word-word-contentcontrolcollection-getitem-member(1))|Gets a content control by its ID.| -||[items](/javascript/api/word/word.contentcontrolcollection#word-word-contentcontrolcollection-items-member)|Gets the loaded child items in this collection.| -|[Document](/javascript/api/word/word.document)|[body](/javascript/api/word/word.document#word-word-document-body-member)|Gets the body object of the main document.| -||[contentControls](/javascript/api/word/word.document#word-word-document-contentcontrols-member)|Gets the collection of content control objects in the document.| -||[getSelection()](/javascript/api/word/word.document#word-word-document-getselection-member(1))|Gets the current selection of the document.| -||[save()](/javascript/api/word/word.document#word-word-document-save-member(1))|Saves the document.| -||[saved](/javascript/api/word/word.document#word-word-document-saved-member)|Indicates whether the changes in the document have been saved.| -||[sections](/javascript/api/word/word.document#word-word-document-sections-member)|Gets the collection of section objects in the document.| -|[Font](/javascript/api/word/word.font)|[bold](/javascript/api/word/word.font#word-word-font-bold-member)|Specifies a value that indicates whether the font is bold.| -||[color](/javascript/api/word/word.font#word-word-font-color-member)|Specifies the color for the specified font.| -||[doubleStrikeThrough](/javascript/api/word/word.font#word-word-font-doublestrikethrough-member)|Specifies a value that indicates whether the font has a double strikethrough.| -||[highlightColor](/javascript/api/word/word.font#word-word-font-highlightcolor-member)|Specifies the highlight color.| -||[italic](/javascript/api/word/word.font#word-word-font-italic-member)|Specifies a value that indicates whether the font is italicized.| -||[name](/javascript/api/word/word.font#word-word-font-name-member)|Specifies a value that represents the name of the font.| -||[size](/javascript/api/word/word.font#word-word-font-size-member)|Specifies a value that represents the font size in points.| -||[strikeThrough](/javascript/api/word/word.font#word-word-font-strikethrough-member)|Specifies a value that indicates whether the font has a strikethrough.| -||[subscript](/javascript/api/word/word.font#word-word-font-subscript-member)|Specifies a value that indicates whether the font is a subscript.| -||[superscript](/javascript/api/word/word.font#word-word-font-superscript-member)|Specifies a value that indicates whether the font is a superscript.| -||[underline](/javascript/api/word/word.font#word-word-font-underline-member)|Specifies a value that indicates the font's underline type.| -|[InlinePicture](/javascript/api/word/word.inlinepicture)|[altTextDescription](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-alttextdescription-member)|Specifies a string that represents the alternative text associated with the inline image.| -||[altTextTitle](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-alttexttitle-member)|Specifies a string that contains the title for the inline image.| -||[getBase64ImageSrc()](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-getbase64imagesrc-member(1))|Gets the Base64-encoded string representation of the inline image.| -||[height](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-height-member)|Specifies a number that describes the height of the inline image.| -||[hyperlink](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-hyperlink-member)|Specifies a hyperlink on the image.| -||[insertContentControl()](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-insertcontentcontrol-member(1))|Wraps the inline picture with a rich text content control.| -||[lockAspectRatio](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-lockaspectratio-member)|Specifies a value that indicates whether the inline image retains its original proportions when you resize it.| -||[parentContentControl](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-parentcontentcontrol-member)|Gets the content control that contains the inline image.| -||[width](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-width-member)|Specifies a number that describes the width of the inline image.| -|[InlinePictureCollection](/javascript/api/word/word.inlinepicturecollection)|[items](/javascript/api/word/word.inlinepicturecollection#word-word-inlinepicturecollection-items-member)|Gets the loaded child items in this collection.| -|[Paragraph](/javascript/api/word/word.paragraph)|[alignment](/javascript/api/word/word.paragraph#word-word-paragraph-alignment-member)|Specifies the alignment for a paragraph.| -||[clear()](/javascript/api/word/word.paragraph#word-word-paragraph-clear-member(1))|Clears the contents of the paragraph object.| -||[contentControls](/javascript/api/word/word.paragraph#word-word-paragraph-contentcontrols-member)|Gets the collection of content control objects in the paragraph.| -||[delete()](/javascript/api/word/word.paragraph#word-word-paragraph-delete-member(1))|Deletes the paragraph and its content from the document.| -||[firstLineIndent](/javascript/api/word/word.paragraph#word-word-paragraph-firstlineindent-member)|Specifies the value, in points, for a first line or hanging indent.| -||[font](/javascript/api/word/word.paragraph#word-word-paragraph-font-member)|Gets the text format of the paragraph.| -||[getHtml()](/javascript/api/word/word.paragraph#word-word-paragraph-gethtml-member(1))|Gets an HTML representation of the paragraph object.| -||[getOoxml()](/javascript/api/word/word.paragraph#word-word-paragraph-getooxml-member(1))|Gets the Office Open XML (OOXML) representation of the paragraph object.| -||[inlinePictures](/javascript/api/word/word.paragraph#word-word-paragraph-inlinepictures-member)|Gets the collection of InlinePicture objects in the paragraph.| -||[insertBreak(breakType: Word.BreakType \| "Page" \| "Next" \| "SectionNext" \| "SectionContinuous" \| "SectionEven" \| "SectionOdd" \| "Line", insertLocation: Word.InsertLocation.before \| Word.InsertLocation.after \| "Before" \| "After")](/javascript/api/word/word.paragraph#word-word-paragraph-insertbreak-member(1))|Inserts a break at the specified location in the main document.| -||[insertContentControl()](/javascript/api/word/word.paragraph#word-word-paragraph-insertcontentcontrol-member(1))|Wraps the Paragraph object with a rich text content control.| -||[insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace \| Word.InsertLocation.start \| Word.InsertLocation.end \| "Replace" \| "Start" \| "End")](/javascript/api/word/word.paragraph#word-word-paragraph-insertfilefrombase64-member(1))|Inserts a document into the paragraph at the specified location.| -||[insertHtml(html: string, insertLocation: Word.InsertLocation.replace \| Word.InsertLocation.start \| Word.InsertLocation.end \| "Replace" \| "Start" \| "End")](/javascript/api/word/word.paragraph#word-word-paragraph-inserthtml-member(1))|Inserts HTML into the paragraph at the specified location.| -||[insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace \| Word.InsertLocation.start \| Word.InsertLocation.end \| "Replace" \| "Start" \| "End")](/javascript/api/word/word.paragraph#word-word-paragraph-insertinlinepicturefrombase64-member(1))|Inserts a picture into the paragraph at the specified location.| -||[insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace \| Word.InsertLocation.start \| Word.InsertLocation.end \| "Replace" \| "Start" \| "End")](/javascript/api/word/word.paragraph#word-word-paragraph-insertooxml-member(1))|Inserts OOXML into the paragraph at the specified location.| -||[insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before \| Word.InsertLocation.after \| "Before" \| "After")](/javascript/api/word/word.paragraph#word-word-paragraph-insertparagraph-member(1))|Inserts a paragraph at the specified location.| -||[insertText(text: string, insertLocation: Word.InsertLocation.replace \| Word.InsertLocation.start \| Word.InsertLocation.end \| "Replace" \| "Start" \| "End")](/javascript/api/word/word.paragraph#word-word-paragraph-inserttext-member(1))|Inserts text into the paragraph at the specified location.| -||[leftIndent](/javascript/api/word/word.paragraph#word-word-paragraph-leftindent-member)|Specifies the left indent value, in points, for the paragraph.| -||[lineSpacing](/javascript/api/word/word.paragraph#word-word-paragraph-linespacing-member)|Specifies the line spacing, in points, for the specified paragraph.| -||[lineUnitAfter](/javascript/api/word/word.paragraph#word-word-paragraph-lineunitafter-member)|Specifies the amount of spacing, in grid lines, after the paragraph.| -||[lineUnitBefore](/javascript/api/word/word.paragraph#word-word-paragraph-lineunitbefore-member)|Specifies the amount of spacing, in grid lines, before the paragraph.| -||[outlineLevel](/javascript/api/word/word.paragraph#word-word-paragraph-outlinelevel-member)|Specifies the outline level for the paragraph.| -||[parentContentControl](/javascript/api/word/word.paragraph#word-word-paragraph-parentcontentcontrol-member)|Gets the content control that contains the paragraph.| -||[rightIndent](/javascript/api/word/word.paragraph#word-word-paragraph-rightindent-member)|Specifies the right indent value, in points, for the paragraph.| -||[search(searchText: string, searchOptions?: Word.SearchOptions \| { ignorePunct?: boolean ignoreSpace?: boolean matchCase?: boolean matchPrefix?: boolean matchSuffix?: boolean matchWholeWord?: boolean matchWildcards?: boolean })](/javascript/api/word/word.paragraph#word-word-paragraph-search-member(1))|Performs a search with the specified SearchOptions on the scope of the paragraph object.| -||[select(selectionMode?: Word.SelectionMode)](/javascript/api/word/word.paragraph#word-word-paragraph-select-member(1))|Selects and navigates the Word UI to the paragraph.| -||[spaceAfter](/javascript/api/word/word.paragraph#word-word-paragraph-spaceafter-member)|Specifies the spacing, in points, after the paragraph.| -||[spaceBefore](/javascript/api/word/word.paragraph#word-word-paragraph-spacebefore-member)|Specifies the spacing, in points, before the paragraph.| -||[style](/javascript/api/word/word.paragraph#word-word-paragraph-style-member)|Specifies the style name for the paragraph.| -||[text](/javascript/api/word/word.paragraph#word-word-paragraph-text-member)|Gets the text of the paragraph.| -|[ParagraphCollection](/javascript/api/word/word.paragraphcollection)|[items](/javascript/api/word/word.paragraphcollection#word-word-paragraphcollection-items-member)|Gets the loaded child items in this collection.| -|[Range](/javascript/api/word/word.range)|[clear()](/javascript/api/word/word.range#word-word-range-clear-member(1))|Clears the contents of the range object.| -||[contentControls](/javascript/api/word/word.range#word-word-range-contentcontrols-member)|Gets the collection of content control objects in the range.| -||[delete()](/javascript/api/word/word.range#word-word-range-delete-member(1))|Deletes the range and its content from the document.| -||[font](/javascript/api/word/word.range#word-word-range-font-member)|Gets the text format of the range.| -||[getHtml()](/javascript/api/word/word.range#word-word-range-gethtml-member(1))|Gets an HTML representation of the range object.| -||[getOoxml()](/javascript/api/word/word.range#word-word-range-getooxml-member(1))|Gets the OOXML representation of the range object.| -||[insertBreak(breakType: Word.BreakType \| "Page" \| "Next" \| "SectionNext" \| "SectionContinuous" \| "SectionEven" \| "SectionOdd" \| "Line", insertLocation: Word.InsertLocation.before \| Word.InsertLocation.after \| "Before" \| "After")](/javascript/api/word/word.range#word-word-range-insertbreak-member(1))|Inserts a break at the specified location in the main document.| -||[insertContentControl()](/javascript/api/word/word.range#word-word-range-insertcontentcontrol-member(1))|Wraps the Range object with a rich text content control.| -||[insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation \| "Replace" \| "Start" \| "End" \| "Before" \| "After")](/javascript/api/word/word.range#word-word-range-insertfilefrombase64-member(1))|Inserts a document at the specified location.| -||[insertHtml(html: string, insertLocation: Word.InsertLocation \| "Replace" \| "Start" \| "End" \| "Before" \| "After")](/javascript/api/word/word.range#word-word-range-inserthtml-member(1))|Inserts HTML at the specified location.| -||[insertOoxml(ooxml: string, insertLocation: Word.InsertLocation \| "Replace" \| "Start" \| "End" \| "Before" \| "After")](/javascript/api/word/word.range#word-word-range-insertooxml-member(1))|Inserts OOXML at the specified location.| -||[insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before \| Word.InsertLocation.after \| "Before" \| "After")](/javascript/api/word/word.range#word-word-range-insertparagraph-member(1))|Inserts a paragraph at the specified location.| -||[insertText(text: string, insertLocation: Word.InsertLocation \| "Replace" \| "Start" \| "End" \| "Before" \| "After")](/javascript/api/word/word.range#word-word-range-inserttext-member(1))|Inserts text at the specified location.| -||[paragraphs](/javascript/api/word/word.range#word-word-range-paragraphs-member)|Gets the collection of paragraph objects in the range.| -||[parentContentControl](/javascript/api/word/word.range#word-word-range-parentcontentcontrol-member)|Gets the content control that contains the range.| -||[search(searchText: string, searchOptions?: Word.SearchOptions \| { ignorePunct?: boolean ignoreSpace?: boolean matchCase?: boolean matchPrefix?: boolean matchSuffix?: boolean matchWholeWord?: boolean matchWildcards?: boolean })](/javascript/api/word/word.range#word-word-range-search-member(1))|Performs a search with the specified SearchOptions on the scope of the range object.| -||[select(selectionMode?: Word.SelectionMode)](/javascript/api/word/word.range#word-word-range-select-member(1))|Selects and navigates the Word UI to the range.| -||[style](/javascript/api/word/word.range#word-word-range-style-member)|Specifies the style name for the range.| -||[text](/javascript/api/word/word.range#word-word-range-text-member)|Gets the text of the range.| -|[RangeCollection](/javascript/api/word/word.rangecollection)|[items](/javascript/api/word/word.rangecollection#word-word-rangecollection-items-member)|Gets the loaded child items in this collection.| -|[SearchOptions](/javascript/api/word/word.searchoptions)|[ignorePunct](/javascript/api/word/word.searchoptions#word-word-searchoptions-ignorepunct-member)|Specifies a value that indicates whether to ignore all punctuation characters between words.| -||[ignoreSpace](/javascript/api/word/word.searchoptions#word-word-searchoptions-ignorespace-member)|Specifies a value that indicates whether to ignore all whitespace between words.| -||[matchCase](/javascript/api/word/word.searchoptions#word-word-searchoptions-matchcase-member)|Specifies a value that indicates whether to perform a case sensitive search.| -||[matchPrefix](/javascript/api/word/word.searchoptions#word-word-searchoptions-matchprefix-member)|Specifies a value that indicates whether to match words that begin with the search string.| -||[matchSuffix](/javascript/api/word/word.searchoptions#word-word-searchoptions-matchsuffix-member)|Specifies a value that indicates whether to match words that end with the search string.| -||[matchWholeWord](/javascript/api/word/word.searchoptions#word-word-searchoptions-matchwholeword-member)|Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word.| -||[matchWildcards](/javascript/api/word/word.searchoptions#word-word-searchoptions-matchwildcards-member)|Specifies a value that indicates whether the search will be performed using special search operators.| -|[Section](/javascript/api/word/word.section)|[body](/javascript/api/word/word.section#word-word-section-body-member)|Gets the body object of the section.| -||[getFooter(type: Word.HeaderFooterType)](/javascript/api/word/word.section#word-word-section-getfooter-member(1))|Gets one of the section's footers.| -||[getHeader(type: Word.HeaderFooterType)](/javascript/api/word/word.section#word-word-section-getheader-member(1))|Gets one of the section's headers.| -|[SectionCollection](/javascript/api/word/word.sectioncollection)|[items](/javascript/api/word/word.sectioncollection#word-word-sectioncollection-items-member)|Gets the loaded child items in this collection.| +[!INCLUDE[API table](../../includes/word-1_8.md)] ## See also diff --git a/docs/requirement-sets/word/word-api-1-2-requirement-set.md b/docs/requirement-sets/word/word-api-1-2-requirement-set.md index bc304a9fe5..b0c434ca71 100644 --- a/docs/requirement-sets/word/word-api-1-2-requirement-set.md +++ b/docs/requirement-sets/word/word-api-1-2-requirement-set.md @@ -14,22 +14,7 @@ WordApi 1.2 added support for inline pictures. The following table lists the APIs in Word JavaScript API requirement set 1.2. To view API reference documentation for all APIs supported by Word JavaScript API requirement set 1.2 or earlier, see [Word APIs in requirement set 1.2 or earlier](/javascript/api/word?view=word-js-1.2&preserve-view=true). -| Class | Fields | Description | -|:---|:---|:---| -|[Body](/javascript/api/word/word.body)|[insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.start \| Word.InsertLocation.end \| "Start" \| "End")](/javascript/api/word/word.body#word-word-body-insertinlinepicturefrombase64-member(1))|Inserts a picture into the body at the specified location.| -|[ContentControl](/javascript/api/word/word.contentcontrol)|[insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace \| Word.InsertLocation.start \| Word.InsertLocation.end \| "Replace" \| "Start" \| "End")](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-insertinlinepicturefrombase64-member(1))|Inserts an inline picture into the content control at the specified location.| -|[InlinePicture](/javascript/api/word/word.inlinepicture)|[delete()](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-delete-member(1))|Deletes the inline picture from the document.| -||[insertBreak(breakType: Word.BreakType \| "Page" \| "Next" \| "SectionNext" \| "SectionContinuous" \| "SectionEven" \| "SectionOdd" \| "Line", insertLocation: Word.InsertLocation.before \| Word.InsertLocation.after \| "Before" \| "After")](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-insertbreak-member(1))|Inserts a break at the specified location in the main document.| -||[insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.before \| Word.InsertLocation.after \| "Before" \| "After")](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-insertfilefrombase64-member(1))|Inserts a document at the specified location.| -||[insertHtml(html: string, insertLocation: Word.InsertLocation.before \| Word.InsertLocation.after \| "Before" \| "After")](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-inserthtml-member(1))|Inserts HTML at the specified location.| -||[insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace \| Word.InsertLocation.before \| Word.InsertLocation.after \| "Replace" \| "Before" \| "After")](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-insertinlinepicturefrombase64-member(1))|Inserts an inline picture at the specified location.| -||[insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.before \| Word.InsertLocation.after \| "Before" \| "After")](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-insertooxml-member(1))|Inserts OOXML at the specified location.| -||[insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before \| Word.InsertLocation.after \| "Before" \| "After")](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-insertparagraph-member(1))|Inserts a paragraph at the specified location.| -||[insertText(text: string, insertLocation: Word.InsertLocation.before \| Word.InsertLocation.after \| "Before" \| "After")](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-inserttext-member(1))|Inserts text at the specified location.| -||[paragraph](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-paragraph-member)|Gets the parent paragraph that contains the inline image.| -||[select(selectionMode?: Word.SelectionMode)](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-select-member(1))|Selects the inline picture.| -|[Range](/javascript/api/word/word.range)|[inlinePictures](/javascript/api/word/word.range#word-word-range-inlinepictures-member)|Gets the collection of inline picture objects in the range.| -||[insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation \| "Replace" \| "Start" \| "End" \| "Before" \| "After")](/javascript/api/word/word.range#word-word-range-insertinlinepicturefrombase64-member(1))|Inserts a picture at the specified location.| +[!INCLUDE[API table](../../includes/word-1_2.md)] ## See also diff --git a/docs/requirement-sets/word/word-api-1-3-requirement-set.md b/docs/requirement-sets/word/word-api-1-3-requirement-set.md index 95bf81d506..d64e05f6d1 100644 --- a/docs/requirement-sets/word/word-api-1-3-requirement-set.md +++ b/docs/requirement-sets/word/word-api-1-3-requirement-set.md @@ -14,266 +14,7 @@ WordApi 1.3 added more support for content controls and document-level settings. The following table lists the APIs in Word JavaScript API requirement set 1.3. To view API reference documentation for all APIs supported by Word JavaScript API requirement set 1.3 or earlier, see [Word APIs in requirement set 1.3 or earlier](/javascript/api/word?view=word-js-1.3&preserve-view=true). -| Class | Fields | Description | -|:---|:---|:---| -|[Application](/javascript/api/word/word.application)|[createDocument(base64File?: string)](/javascript/api/word/word.application#word-word-application-createdocument-member(1))|Creates a new document by using an optional Base64-encoded .docx file.| -|[Body](/javascript/api/word/word.body)|[getRange(rangeLocation?: Word.RangeLocation.whole \| Word.RangeLocation.start \| Word.RangeLocation.end \| Word.RangeLocation.after \| Word.RangeLocation.content \| "Whole" \| "Start" \| "End" \| "After" \| "Content")](/javascript/api/word/word.body#word-word-body-getrange-member(1))|Gets the whole body, or the starting or ending point of the body, as a range.| -||[insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.start \| Word.InsertLocation.end \| "Start" \| "End", values?: string[][])](/javascript/api/word/word.body#word-word-body-inserttable-member(1))|Inserts a table with the specified number of rows and columns.| -||[lists](/javascript/api/word/word.body#word-word-body-lists-member)|Gets the collection of list objects in the body.| -||[parentBody](/javascript/api/word/word.body#word-word-body-parentbody-member)|Gets the parent body of the body.| -||[parentBodyOrNullObject](/javascript/api/word/word.body#word-word-body-parentbodyornullobject-member)|Gets the parent body of the body.| -||[parentContentControlOrNullObject](/javascript/api/word/word.body#word-word-body-parentcontentcontrolornullobject-member)|Gets the content control that contains the body.| -||[parentSection](/javascript/api/word/word.body#word-word-body-parentsection-member)|Gets the parent section of the body.| -||[parentSectionOrNullObject](/javascript/api/word/word.body#word-word-body-parentsectionornullobject-member)|Gets the parent section of the body.| -||[styleBuiltIn](/javascript/api/word/word.body#word-word-body-stylebuiltin-member)|Specifies the built-in style name for the body.| -||[tables](/javascript/api/word/word.body#word-word-body-tables-member)|Gets the collection of table objects in the body.| -||[type](/javascript/api/word/word.body#word-word-body-type-member)|Gets the type of the body.| -|[ContentControl](/javascript/api/word/word.contentcontrol)|[getRange(rangeLocation?: Word.RangeLocation \| "Whole" \| "Start" \| "End" \| "Before" \| "After" \| "Content")](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-getrange-member(1))|Gets the whole content control, or the starting or ending point of the content control, as a range.| -||[getTextRanges(endingMarks: string[], trimSpacing?: boolean)](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-gettextranges-member(1))|Gets the text ranges in the content control by using punctuation marks and/or other ending marks.| -||[insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.start \| Word.InsertLocation.end \| Word.InsertLocation.before \| Word.InsertLocation.after \| "Start" \| "End" \| "Before" \| "After", values?: string[][])](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-inserttable-member(1))|Inserts a table with the specified number of rows and columns into, or next to, a content control.| -||[lists](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-lists-member)|Gets the collection of list objects in the content control.| -||[parentBody](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-parentbody-member)|Gets the parent body of the content control.| -||[parentContentControlOrNullObject](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-parentcontentcontrolornullobject-member)|Gets the content control that contains the content control.| -||[parentTable](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-parenttable-member)|Gets the table that contains the content control.| -||[parentTableCell](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-parenttablecell-member)|Gets the table cell that contains the content control.| -||[parentTableCellOrNullObject](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-parenttablecellornullobject-member)|Gets the table cell that contains the content control.| -||[parentTableOrNullObject](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-parenttableornullobject-member)|Gets the table that contains the content control.| -||[split(delimiters: string[], multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean)](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-split-member(1))|Splits the content control into child ranges by using delimiters.| -||[styleBuiltIn](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-stylebuiltin-member)|Specifies the built-in style name for the content control.| -||[subtype](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-subtype-member)|Gets the content control subtype.| -||[tables](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-tables-member)|Gets the collection of table objects in the content control.| -|[ContentControlCollection](/javascript/api/word/word.contentcontrolcollection)|[getByIdOrNullObject(id: number)](/javascript/api/word/word.contentcontrolcollection#word-word-contentcontrolcollection-getbyidornullobject-member(1))|Gets a content control by its identifier.| -||[getByTypes(types: Word.ContentControlType[])](/javascript/api/word/word.contentcontrolcollection#word-word-contentcontrolcollection-getbytypes-member(1))|Gets the content controls that have the specified types.| -||[getFirst()](/javascript/api/word/word.contentcontrolcollection#word-word-contentcontrolcollection-getfirst-member(1))|Gets the first content control in this collection.| -||[getFirstOrNullObject()](/javascript/api/word/word.contentcontrolcollection#word-word-contentcontrolcollection-getfirstornullobject-member(1))|Gets the first content control in this collection.| -|[CustomProperty](/javascript/api/word/word.customproperty)|[delete()](/javascript/api/word/word.customproperty#word-word-customproperty-delete-member(1))|Deletes the custom property.| -||[key](/javascript/api/word/word.customproperty#word-word-customproperty-key-member)|Gets the key of the custom property.| -||[type](/javascript/api/word/word.customproperty#word-word-customproperty-type-member)|Gets the value type of the custom property.| -||[value](/javascript/api/word/word.customproperty#word-word-customproperty-value-member)|Specifies the value of the custom property.| -|[CustomPropertyCollection](/javascript/api/word/word.custompropertycollection)|[add(key: string, value: any)](/javascript/api/word/word.custompropertycollection#word-word-custompropertycollection-add-member(1))|Creates a new or sets an existing custom property.| -||[deleteAll()](/javascript/api/word/word.custompropertycollection#word-word-custompropertycollection-deleteall-member(1))|Deletes all custom properties in this collection.| -||[getCount()](/javascript/api/word/word.custompropertycollection#word-word-custompropertycollection-getcount-member(1))|Gets the count of custom properties.| -||[getItem(key: string)](/javascript/api/word/word.custompropertycollection#word-word-custompropertycollection-getitem-member(1))|Gets a custom property object by its key, which is case-insensitive.| -||[getItemOrNullObject(key: string)](/javascript/api/word/word.custompropertycollection#word-word-custompropertycollection-getitemornullobject-member(1))|Gets a custom property object by its key, which is case-insensitive.| -||[items](/javascript/api/word/word.custompropertycollection#word-word-custompropertycollection-items-member)|Gets the loaded child items in this collection.| -|[Document](/javascript/api/word/word.document)|[properties](/javascript/api/word/word.document#word-word-document-properties-member)|Gets the properties of the document.| -|[DocumentCreated](/javascript/api/word/word.documentcreated)|[open()](/javascript/api/word/word.documentcreated#word-word-documentcreated-open-member(1))|Opens the document.| -|[DocumentProperties](/javascript/api/word/word.documentproperties)|[applicationName](/javascript/api/word/word.documentproperties#word-word-documentproperties-applicationname-member)|Gets the application name of the document.| -||[author](/javascript/api/word/word.documentproperties#word-word-documentproperties-author-member)|Specifies the author of the document.| -||[category](/javascript/api/word/word.documentproperties#word-word-documentproperties-category-member)|Specifies the category of the document.| -||[comments](/javascript/api/word/word.documentproperties#word-word-documentproperties-comments-member)|Specifies the comments of the document.| -||[company](/javascript/api/word/word.documentproperties#word-word-documentproperties-company-member)|Specifies the company of the document.| -||[creationDate](/javascript/api/word/word.documentproperties#word-word-documentproperties-creationdate-member)|Gets the creation date of the document.| -||[customProperties](/javascript/api/word/word.documentproperties#word-word-documentproperties-customproperties-member)|Gets the collection of custom properties of the document.| -||[format](/javascript/api/word/word.documentproperties#word-word-documentproperties-format-member)|Specifies the format of the document.| -||[keywords](/javascript/api/word/word.documentproperties#word-word-documentproperties-keywords-member)|Specifies the keywords of the document.| -||[lastAuthor](/javascript/api/word/word.documentproperties#word-word-documentproperties-lastauthor-member)|Gets the last author of the document.| -||[lastPrintDate](/javascript/api/word/word.documentproperties#word-word-documentproperties-lastprintdate-member)|Gets the last print date of the document.| -||[lastSaveTime](/javascript/api/word/word.documentproperties#word-word-documentproperties-lastsavetime-member)|Gets the last save time of the document.| -||[manager](/javascript/api/word/word.documentproperties#word-word-documentproperties-manager-member)|Specifies the manager of the document.| -||[revisionNumber](/javascript/api/word/word.documentproperties#word-word-documentproperties-revisionnumber-member)|Gets the revision number of the document.| -||[security](/javascript/api/word/word.documentproperties#word-word-documentproperties-security-member)|Gets security settings of the document.| -||[subject](/javascript/api/word/word.documentproperties#word-word-documentproperties-subject-member)|Specifies the subject of the document.| -||[template](/javascript/api/word/word.documentproperties#word-word-documentproperties-template-member)|Gets the template of the document.| -||[title](/javascript/api/word/word.documentproperties#word-word-documentproperties-title-member)|Specifies the title of the document.| -|[InlinePicture](/javascript/api/word/word.inlinepicture)|[getNext()](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-getnext-member(1))|Gets the next inline image.| -||[getNextOrNullObject()](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-getnextornullobject-member(1))|Gets the next inline image.| -||[getRange(rangeLocation?: Word.RangeLocation.whole \| Word.RangeLocation.start \| Word.RangeLocation.end \| "Whole" \| "Start" \| "End")](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-getrange-member(1))|Gets the picture, or the starting or ending point of the picture, as a range.| -||[parentContentControlOrNullObject](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-parentcontentcontrolornullobject-member)|Gets the content control that contains the inline image.| -||[parentTable](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-parenttable-member)|Gets the table that contains the inline image.| -||[parentTableCell](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-parenttablecell-member)|Gets the table cell that contains the inline image.| -||[parentTableCellOrNullObject](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-parenttablecellornullobject-member)|Gets the table cell that contains the inline image.| -||[parentTableOrNullObject](/javascript/api/word/word.inlinepicture#word-word-inlinepicture-parenttableornullobject-member)|Gets the table that contains the inline image.| -|[InlinePictureCollection](/javascript/api/word/word.inlinepicturecollection)|[getFirst()](/javascript/api/word/word.inlinepicturecollection#word-word-inlinepicturecollection-getfirst-member(1))|Gets the first inline image in this collection.| -||[getFirstOrNullObject()](/javascript/api/word/word.inlinepicturecollection#word-word-inlinepicturecollection-getfirstornullobject-member(1))|Gets the first inline image in this collection.| -|[List](/javascript/api/word/word.list)|[getLevelParagraphs(level: number)](/javascript/api/word/word.list#word-word-list-getlevelparagraphs-member(1))|Gets the paragraphs that occur at the specified level in the list.| -||[getLevelString(level: number)](/javascript/api/word/word.list#word-word-list-getlevelstring-member(1))|Gets the bullet, number, or picture at the specified level as a string.| -||[id](/javascript/api/word/word.list#word-word-list-id-member)|Gets the list's id.| -||[insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start \| Word.InsertLocation.end \| Word.InsertLocation.before \| Word.InsertLocation.after \| "Start" \| "End" \| "Before" \| "After")](/javascript/api/word/word.list#word-word-list-insertparagraph-member(1))|Inserts a paragraph at the specified location.| -||[levelExistences](/javascript/api/word/word.list#word-word-list-levelexistences-member)|Checks whether each of the 9 levels exists in the list.| -||[levelTypes](/javascript/api/word/word.list#word-word-list-leveltypes-member)|Gets all 9 level types in the list.| -||[paragraphs](/javascript/api/word/word.list#word-word-list-paragraphs-member)|Gets paragraphs in the list.| -||[setLevelAlignment(level: number, alignment: Word.Alignment)](/javascript/api/word/word.list#word-word-list-setlevelalignment-member(1))|Sets the alignment of the bullet, number, or picture at the specified level in the list.| -||[setLevelBullet(level: number, listBullet: Word.ListBullet, charCode?: number, fontName?: string)](/javascript/api/word/word.list#word-word-list-setlevelbullet-member(1))|Sets the bullet format at the specified level in the list.| -||[setLevelIndents(level: number, textIndent: number, bulletNumberPictureIndent: number)](/javascript/api/word/word.list#word-word-list-setlevelindents-member(1))|Sets the two indents of the specified level in the list.| -||[setLevelNumbering(level: number, listNumbering: Word.ListNumbering, formatString?: Array)](/javascript/api/word/word.list#word-word-list-setlevelnumbering-member(1))|Sets the numbering format at the specified level in the list.| -||[setLevelStartingNumber(level: number, startingNumber: number)](/javascript/api/word/word.list#word-word-list-setlevelstartingnumber-member(1))|Sets the starting number at the specified level in the list.| -|[ListCollection](/javascript/api/word/word.listcollection)|[getById(id: number)](/javascript/api/word/word.listcollection#word-word-listcollection-getbyid-member(1))|Gets a list by its identifier.| -||[getByIdOrNullObject(id: number)](/javascript/api/word/word.listcollection#word-word-listcollection-getbyidornullobject-member(1))|Gets a list by its identifier.| -||[getFirst()](/javascript/api/word/word.listcollection#word-word-listcollection-getfirst-member(1))|Gets the first list in this collection.| -||[getFirstOrNullObject()](/javascript/api/word/word.listcollection#word-word-listcollection-getfirstornullobject-member(1))|Gets the first list in this collection.| -||[getItem(id: number)](/javascript/api/word/word.listcollection#word-word-listcollection-getitem-member(1))|Gets a list object by its ID.| -||[items](/javascript/api/word/word.listcollection#word-word-listcollection-items-member)|Gets the loaded child items in this collection.| -|[ListItem](/javascript/api/word/word.listitem)|[getAncestor(parentOnly?: boolean)](/javascript/api/word/word.listitem#word-word-listitem-getancestor-member(1))|Gets the list item parent, or the closest ancestor if the parent doesn't exist.| -||[getAncestorOrNullObject(parentOnly?: boolean)](/javascript/api/word/word.listitem#word-word-listitem-getancestorornullobject-member(1))|Gets the list item parent, or the closest ancestor if the parent doesn't exist.| -||[getDescendants(directChildrenOnly?: boolean)](/javascript/api/word/word.listitem#word-word-listitem-getdescendants-member(1))|Gets all descendant list items of the list item.| -||[level](/javascript/api/word/word.listitem#word-word-listitem-level-member)|Specifies the level of the item in the list.| -||[listString](/javascript/api/word/word.listitem#word-word-listitem-liststring-member)|Gets the list item bullet, number, or picture as a string.| -||[siblingIndex](/javascript/api/word/word.listitem#word-word-listitem-siblingindex-member)|Gets the list item order number in relation to its siblings.| -|[Paragraph](/javascript/api/word/word.paragraph)|[attachToList(listId: number, level: number)](/javascript/api/word/word.paragraph#word-word-paragraph-attachtolist-member(1))|Lets the paragraph join an existing list at the specified level.| -||[detachFromList()](/javascript/api/word/word.paragraph#word-word-paragraph-detachfromlist-member(1))|Moves this paragraph out of its list, if the paragraph is a list item.| -||[getNext()](/javascript/api/word/word.paragraph#word-word-paragraph-getnext-member(1))|Gets the next paragraph.| -||[getNextOrNullObject()](/javascript/api/word/word.paragraph#word-word-paragraph-getnextornullobject-member(1))|Gets the next paragraph.| -||[getPrevious()](/javascript/api/word/word.paragraph#word-word-paragraph-getprevious-member(1))|Gets the previous paragraph.| -||[getPreviousOrNullObject()](/javascript/api/word/word.paragraph#word-word-paragraph-getpreviousornullobject-member(1))|Gets the previous paragraph.| -||[getRange(rangeLocation?: Word.RangeLocation.whole \| Word.RangeLocation.start \| Word.RangeLocation.end \| Word.RangeLocation.after \| Word.RangeLocation.content \| "Whole" \| "Start" \| "End" \| "After" \| "Content")](/javascript/api/word/word.paragraph#word-word-paragraph-getrange-member(1))|Gets the whole paragraph, or the starting or ending point of the paragraph, as a range.| -||[getTextRanges(endingMarks: string[], trimSpacing?: boolean)](/javascript/api/word/word.paragraph#word-word-paragraph-gettextranges-member(1))|Gets the text ranges in the paragraph by using punctuation marks and/or other ending marks.| -||[insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before \| Word.InsertLocation.after \| "Before" \| "After", values?: string[][])](/javascript/api/word/word.paragraph#word-word-paragraph-inserttable-member(1))|Inserts a table with the specified number of rows and columns.| -||[isLastParagraph](/javascript/api/word/word.paragraph#word-word-paragraph-islastparagraph-member)|Indicates the paragraph is the last one inside its parent body.| -||[isListItem](/javascript/api/word/word.paragraph#word-word-paragraph-islistitem-member)|Checks whether the paragraph is a list item.| -||[list](/javascript/api/word/word.paragraph#word-word-paragraph-list-member)|Gets the List to which this paragraph belongs.| -||[listItem](/javascript/api/word/word.paragraph#word-word-paragraph-listitem-member)|Gets the ListItem for the paragraph.| -||[listItemOrNullObject](/javascript/api/word/word.paragraph#word-word-paragraph-listitemornullobject-member)|Gets the ListItem for the paragraph.| -||[listOrNullObject](/javascript/api/word/word.paragraph#word-word-paragraph-listornullobject-member)|Gets the List to which this paragraph belongs.| -||[parentBody](/javascript/api/word/word.paragraph#word-word-paragraph-parentbody-member)|Gets the parent body of the paragraph.| -||[parentContentControlOrNullObject](/javascript/api/word/word.paragraph#word-word-paragraph-parentcontentcontrolornullobject-member)|Gets the content control that contains the paragraph.| -||[parentTable](/javascript/api/word/word.paragraph#word-word-paragraph-parenttable-member)|Gets the table that contains the paragraph.| -||[parentTableCell](/javascript/api/word/word.paragraph#word-word-paragraph-parenttablecell-member)|Gets the table cell that contains the paragraph.| -||[parentTableCellOrNullObject](/javascript/api/word/word.paragraph#word-word-paragraph-parenttablecellornullobject-member)|Gets the table cell that contains the paragraph.| -||[parentTableOrNullObject](/javascript/api/word/word.paragraph#word-word-paragraph-parenttableornullobject-member)|Gets the table that contains the paragraph.| -||[split(delimiters: string[], trimDelimiters?: boolean, trimSpacing?: boolean)](/javascript/api/word/word.paragraph#word-word-paragraph-split-member(1))|Splits the paragraph into child ranges by using delimiters.| -||[startNewList()](/javascript/api/word/word.paragraph#word-word-paragraph-startnewlist-member(1))|Starts a new list with this paragraph.| -||[styleBuiltIn](/javascript/api/word/word.paragraph#word-word-paragraph-stylebuiltin-member)|Specifies the built-in style name for the paragraph.| -||[tableNestingLevel](/javascript/api/word/word.paragraph#word-word-paragraph-tablenestinglevel-member)|Gets the level of the paragraph's table.| -|[ParagraphCollection](/javascript/api/word/word.paragraphcollection)|[getFirst()](/javascript/api/word/word.paragraphcollection#word-word-paragraphcollection-getfirst-member(1))|Gets the first paragraph in this collection.| -||[getFirstOrNullObject()](/javascript/api/word/word.paragraphcollection#word-word-paragraphcollection-getfirstornullobject-member(1))|Gets the first paragraph in this collection.| -||[getLast()](/javascript/api/word/word.paragraphcollection#word-word-paragraphcollection-getlast-member(1))|Gets the last paragraph in this collection.| -||[getLastOrNullObject()](/javascript/api/word/word.paragraphcollection#word-word-paragraphcollection-getlastornullobject-member(1))|Gets the last paragraph in this collection.| -|[Range](/javascript/api/word/word.range)|[compareLocationWith(range: Word.Range)](/javascript/api/word/word.range#word-word-range-comparelocationwith-member(1))|Compares this range's location with another range's location.| -||[expandTo(range: Word.Range)](/javascript/api/word/word.range#word-word-range-expandto-member(1))|Returns a new range that extends from this range in either direction to cover another range.| -||[expandToOrNullObject(range: Word.Range)](/javascript/api/word/word.range#word-word-range-expandtoornullobject-member(1))|Returns a new range that extends from this range in either direction to cover another range.| -||[getHyperlinkRanges()](/javascript/api/word/word.range#word-word-range-gethyperlinkranges-member(1))|Gets hyperlink child ranges within the range.| -||[getNextTextRange(endingMarks: string[], trimSpacing?: boolean)](/javascript/api/word/word.range#word-word-range-getnexttextrange-member(1))|Gets the next text range by using punctuation marks and/or other ending marks.| -||[getNextTextRangeOrNullObject(endingMarks: string[], trimSpacing?: boolean)](/javascript/api/word/word.range#word-word-range-getnexttextrangeornullobject-member(1))|Gets the next text range by using punctuation marks and/or other ending marks.| -||[getRange(rangeLocation?: Word.RangeLocation.whole \| Word.RangeLocation.start \| Word.RangeLocation.end \| Word.RangeLocation.after \| Word.RangeLocation.content \| "Whole" \| "Start" \| "End" \| "After" \| "Content")](/javascript/api/word/word.range#word-word-range-getrange-member(1))|Clones the range, or gets the starting or ending point of the range as a new range.| -||[getTextRanges(endingMarks: string[], trimSpacing?: boolean)](/javascript/api/word/word.range#word-word-range-gettextranges-member(1))|Gets the text child ranges in the range by using punctuation marks and/or other ending marks.| -||[hyperlink](/javascript/api/word/word.range#word-word-range-hyperlink-member)|Gets the first hyperlink in the range, or sets a hyperlink on the range.| -||[insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before \| Word.InsertLocation.after \| "Before" \| "After", values?: string[][])](/javascript/api/word/word.range#word-word-range-inserttable-member(1))|Inserts a table with the specified number of rows and columns.| -||[intersectWith(range: Word.Range)](/javascript/api/word/word.range#word-word-range-intersectwith-member(1))|Returns a new range as the intersection of this range with another range.| -||[intersectWithOrNullObject(range: Word.Range)](/javascript/api/word/word.range#word-word-range-intersectwithornullobject-member(1))|Returns a new range as the intersection of this range with another range.| -||[isEmpty](/javascript/api/word/word.range#word-word-range-isempty-member)|Checks whether the range length is zero.| -||[lists](/javascript/api/word/word.range#word-word-range-lists-member)|Gets the collection of list objects in the range.| -||[parentBody](/javascript/api/word/word.range#word-word-range-parentbody-member)|Gets the parent body of the range.| -||[parentContentControlOrNullObject](/javascript/api/word/word.range#word-word-range-parentcontentcontrolornullobject-member)|Gets the content control that contains the range.| -||[parentTable](/javascript/api/word/word.range#word-word-range-parenttable-member)|Gets the table that contains the range.| -||[parentTableCell](/javascript/api/word/word.range#word-word-range-parenttablecell-member)|Gets the table cell that contains the range.| -||[parentTableCellOrNullObject](/javascript/api/word/word.range#word-word-range-parenttablecellornullobject-member)|Gets the table cell that contains the range.| -||[parentTableOrNullObject](/javascript/api/word/word.range#word-word-range-parenttableornullobject-member)|Gets the table that contains the range.| -||[split(delimiters: string[], multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean)](/javascript/api/word/word.range#word-word-range-split-member(1))|Splits the range into child ranges by using delimiters.| -||[styleBuiltIn](/javascript/api/word/word.range#word-word-range-stylebuiltin-member)|Specifies the built-in style name for the range.| -||[tables](/javascript/api/word/word.range#word-word-range-tables-member)|Gets the collection of table objects in the range.| -|[RangeCollection](/javascript/api/word/word.rangecollection)|[getFirst()](/javascript/api/word/word.rangecollection#word-word-rangecollection-getfirst-member(1))|Gets the first range in this collection.| -||[getFirstOrNullObject()](/javascript/api/word/word.rangecollection#word-word-rangecollection-getfirstornullobject-member(1))|Gets the first range in this collection.| -|[RequestContext](/javascript/api/word/word.requestcontext)|[application](/javascript/api/word/word.requestcontext#word-word-requestcontext-application-member)|[Api set: WordApi 1.3] *| -|[Section](/javascript/api/word/word.section)|[getNext()](/javascript/api/word/word.section#word-word-section-getnext-member(1))|Gets the next section.| -||[getNextOrNullObject()](/javascript/api/word/word.section#word-word-section-getnextornullobject-member(1))|Gets the next section.| -|[SectionCollection](/javascript/api/word/word.sectioncollection)|[getFirst()](/javascript/api/word/word.sectioncollection#word-word-sectioncollection-getfirst-member(1))|Gets the first section in this collection.| -||[getFirstOrNullObject()](/javascript/api/word/word.sectioncollection#word-word-sectioncollection-getfirstornullobject-member(1))|Gets the first section in this collection.| -|[Table](/javascript/api/word/word.table)|[addColumns(insertLocation: Word.InsertLocation.start \| Word.InsertLocation.end \| "Start" \| "End", columnCount: number, values?: string[][])](/javascript/api/word/word.table#word-word-table-addcolumns-member(1))|Adds columns to the start or end of the table, using the first or last existing column as a template.| -||[addRows(insertLocation: Word.InsertLocation.start \| Word.InsertLocation.end \| "Start" \| "End", rowCount: number, values?: string[][])](/javascript/api/word/word.table#word-word-table-addrows-member(1))|Adds rows to the start or end of the table, using the first or last existing row as a template.| -||[alignment](/javascript/api/word/word.table#word-word-table-alignment-member)|Specifies the alignment of the table against the page column.| -||[autoFitWindow()](/javascript/api/word/word.table#word-word-table-autofitwindow-member(1))|Autofits the table columns to the width of the window.| -||[clear()](/javascript/api/word/word.table#word-word-table-clear-member(1))|Clears the contents of the table.| -||[delete()](/javascript/api/word/word.table#word-word-table-delete-member(1))|Deletes the entire table.| -||[deleteColumns(columnIndex: number, columnCount?: number)](/javascript/api/word/word.table#word-word-table-deletecolumns-member(1))|Deletes specific columns.| -||[deleteRows(rowIndex: number, rowCount?: number)](/javascript/api/word/word.table#word-word-table-deleterows-member(1))|Deletes specific rows.| -||[distributeColumns()](/javascript/api/word/word.table#word-word-table-distributecolumns-member(1))|Distributes the column widths evenly.| -||[font](/javascript/api/word/word.table#word-word-table-font-member)|Gets the font.| -||[getBorder(borderLocation: Word.BorderLocation)](/javascript/api/word/word.table#word-word-table-getborder-member(1))|Gets the border style for the specified border.| -||[getCell(rowIndex: number, cellIndex: number)](/javascript/api/word/word.table#word-word-table-getcell-member(1))|Gets the table cell at a specified row and column.| -||[getCellOrNullObject(rowIndex: number, cellIndex: number)](/javascript/api/word/word.table#word-word-table-getcellornullobject-member(1))|Gets the table cell at a specified row and column.| -||[getCellPadding(cellPaddingLocation: Word.CellPaddingLocation)](/javascript/api/word/word.table#word-word-table-getcellpadding-member(1))|Gets cell padding in points.| -||[getNext()](/javascript/api/word/word.table#word-word-table-getnext-member(1))|Gets the next table.| -||[getNextOrNullObject()](/javascript/api/word/word.table#word-word-table-getnextornullobject-member(1))|Gets the next table.| -||[getParagraphAfter()](/javascript/api/word/word.table#word-word-table-getparagraphafter-member(1))|Gets the paragraph after the table.| -||[getParagraphAfterOrNullObject()](/javascript/api/word/word.table#word-word-table-getparagraphafterornullobject-member(1))|Gets the paragraph after the table.| -||[getParagraphBefore()](/javascript/api/word/word.table#word-word-table-getparagraphbefore-member(1))|Gets the paragraph before the table.| -||[getParagraphBeforeOrNullObject()](/javascript/api/word/word.table#word-word-table-getparagraphbeforeornullobject-member(1))|Gets the paragraph before the table.| -||[getRange(rangeLocation?: Word.RangeLocation.whole \| Word.RangeLocation.start \| Word.RangeLocation.end \| Word.RangeLocation.after \| "Whole" \| "Start" \| "End" \| "After")](/javascript/api/word/word.table#word-word-table-getrange-member(1))|Gets the range that contains this table, or the range at the start or end of the table.| -||[headerRowCount](/javascript/api/word/word.table#word-word-table-headerrowcount-member)|Specifies the number of header rows.| -||[horizontalAlignment](/javascript/api/word/word.table#word-word-table-horizontalalignment-member)|Specifies the horizontal alignment of every cell in the table.| -||[insertContentControl()](/javascript/api/word/word.table#word-word-table-insertcontentcontrol-member(1))|Inserts a content control on the table.| -||[insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before \| Word.InsertLocation.after \| "Before" \| "After")](/javascript/api/word/word.table#word-word-table-insertparagraph-member(1))|Inserts a paragraph at the specified location.| -||[insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before \| Word.InsertLocation.after \| "Before" \| "After", values?: string[][])](/javascript/api/word/word.table#word-word-table-inserttable-member(1))|Inserts a table with the specified number of rows and columns.| -||[isUniform](/javascript/api/word/word.table#word-word-table-isuniform-member)|Indicates whether all of the table rows are uniform.| -||[nestingLevel](/javascript/api/word/word.table#word-word-table-nestinglevel-member)|Gets the nesting level of the table.| -||[parentBody](/javascript/api/word/word.table#word-word-table-parentbody-member)|Gets the parent body of the table.| -||[parentContentControl](/javascript/api/word/word.table#word-word-table-parentcontentcontrol-member)|Gets the content control that contains the table.| -||[parentContentControlOrNullObject](/javascript/api/word/word.table#word-word-table-parentcontentcontrolornullobject-member)|Gets the content control that contains the table.| -||[parentTable](/javascript/api/word/word.table#word-word-table-parenttable-member)|Gets the table that contains this table.| -||[parentTableCell](/javascript/api/word/word.table#word-word-table-parenttablecell-member)|Gets the table cell that contains this table.| -||[parentTableCellOrNullObject](/javascript/api/word/word.table#word-word-table-parenttablecellornullobject-member)|Gets the table cell that contains this table.| -||[parentTableOrNullObject](/javascript/api/word/word.table#word-word-table-parenttableornullobject-member)|Gets the table that contains this table.| -||[rowCount](/javascript/api/word/word.table#word-word-table-rowcount-member)|Gets the number of rows in the table.| -||[rows](/javascript/api/word/word.table#word-word-table-rows-member)|Gets all of the table rows.| -||[search(searchText: string, searchOptions?: Word.SearchOptions \| { ignorePunct?: boolean ignoreSpace?: boolean matchCase?: boolean matchPrefix?: boolean matchSuffix?: boolean matchWholeWord?: boolean matchWildcards?: boolean })](/javascript/api/word/word.table#word-word-table-search-member(1))|Performs a search with the specified SearchOptions on the scope of the table object.| -||[select(selectionMode?: Word.SelectionMode)](/javascript/api/word/word.table#word-word-table-select-member(1))|Selects the table, or the position at the start or end of the table, and navigates the Word UI to it.| -||[setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number)](/javascript/api/word/word.table#word-word-table-setcellpadding-member(1))|Sets cell padding in points.| -||[shadingColor](/javascript/api/word/word.table#word-word-table-shadingcolor-member)|Specifies the shading color.| -||[style](/javascript/api/word/word.table#word-word-table-style-member)|Specifies the style name for the table.| -||[styleBandedColumns](/javascript/api/word/word.table#word-word-table-stylebandedcolumns-member)|Specifies whether the table has banded columns.| -||[styleBandedRows](/javascript/api/word/word.table#word-word-table-stylebandedrows-member)|Specifies whether the table has banded rows.| -||[styleBuiltIn](/javascript/api/word/word.table#word-word-table-stylebuiltin-member)|Specifies the built-in style name for the table.| -||[styleFirstColumn](/javascript/api/word/word.table#word-word-table-stylefirstcolumn-member)|Specifies whether the table has a first column with a special style.| -||[styleLastColumn](/javascript/api/word/word.table#word-word-table-stylelastcolumn-member)|Specifies whether the table has a last column with a special style.| -||[styleTotalRow](/javascript/api/word/word.table#word-word-table-styletotalrow-member)|Specifies whether the table has a total (last) row with a special style.| -||[tables](/javascript/api/word/word.table#word-word-table-tables-member)|Gets the child tables nested one level deeper.| -||[values](/javascript/api/word/word.table#word-word-table-values-member)|Specifies the text values in the table, as a 2D JavaScript array.| -||[verticalAlignment](/javascript/api/word/word.table#word-word-table-verticalalignment-member)|Specifies the vertical alignment of every cell in the table.| -||[width](/javascript/api/word/word.table#word-word-table-width-member)|Specifies the width of the table in points.| -|[TableBorder](/javascript/api/word/word.tableborder)|[color](/javascript/api/word/word.tableborder#word-word-tableborder-color-member)|Specifies the table border color.| -||[type](/javascript/api/word/word.tableborder#word-word-tableborder-type-member)|Specifies the type of the table border.| -||[width](/javascript/api/word/word.tableborder#word-word-tableborder-width-member)|Specifies the width, in points, of the table border.| -|[TableCell](/javascript/api/word/word.tablecell)|[body](/javascript/api/word/word.tablecell#word-word-tablecell-body-member)|Gets the body object of the cell.| -||[cellIndex](/javascript/api/word/word.tablecell#word-word-tablecell-cellindex-member)|Gets the index of the cell in its row.| -||[columnWidth](/javascript/api/word/word.tablecell#word-word-tablecell-columnwidth-member)|Specifies the width of the cell's column in points.| -||[deleteColumn()](/javascript/api/word/word.tablecell#word-word-tablecell-deletecolumn-member(1))|Deletes the column containing this cell.| -||[deleteRow()](/javascript/api/word/word.tablecell#word-word-tablecell-deleterow-member(1))|Deletes the row containing this cell.| -||[getBorder(borderLocation: Word.BorderLocation)](/javascript/api/word/word.tablecell#word-word-tablecell-getborder-member(1))|Gets the border style for the specified border.| -||[getCellPadding(cellPaddingLocation: Word.CellPaddingLocation)](/javascript/api/word/word.tablecell#word-word-tablecell-getcellpadding-member(1))|Gets cell padding in points.| -||[getNext()](/javascript/api/word/word.tablecell#word-word-tablecell-getnext-member(1))|Gets the next cell.| -||[getNextOrNullObject()](/javascript/api/word/word.tablecell#word-word-tablecell-getnextornullobject-member(1))|Gets the next cell.| -||[horizontalAlignment](/javascript/api/word/word.tablecell#word-word-tablecell-horizontalalignment-member)|Specifies the horizontal alignment of the cell.| -||[insertColumns(insertLocation: Word.InsertLocation.before \| Word.InsertLocation.after \| "Before" \| "After", columnCount: number, values?: string[][])](/javascript/api/word/word.tablecell#word-word-tablecell-insertcolumns-member(1))|Adds columns to the left or right of the cell, using the cell's column as a template.| -||[insertRows(insertLocation: Word.InsertLocation.before \| Word.InsertLocation.after \| "Before" \| "After", rowCount: number, values?: string[][])](/javascript/api/word/word.tablecell#word-word-tablecell-insertrows-member(1))|Inserts rows above or below the cell, using the cell's row as a template.| -||[parentRow](/javascript/api/word/word.tablecell#word-word-tablecell-parentrow-member)|Gets the parent row of the cell.| -||[parentTable](/javascript/api/word/word.tablecell#word-word-tablecell-parenttable-member)|Gets the parent table of the cell.| -||[rowIndex](/javascript/api/word/word.tablecell#word-word-tablecell-rowindex-member)|Gets the index of the cell's row in the table.| -||[setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number)](/javascript/api/word/word.tablecell#word-word-tablecell-setcellpadding-member(1))|Sets cell padding in points.| -||[shadingColor](/javascript/api/word/word.tablecell#word-word-tablecell-shadingcolor-member)|Specifies the shading color of the cell.| -||[value](/javascript/api/word/word.tablecell#word-word-tablecell-value-member)|Specifies the text of the cell.| -||[verticalAlignment](/javascript/api/word/word.tablecell#word-word-tablecell-verticalalignment-member)|Specifies the vertical alignment of the cell.| -||[width](/javascript/api/word/word.tablecell#word-word-tablecell-width-member)|Gets the width of the cell in points.| -|[TableCellCollection](/javascript/api/word/word.tablecellcollection)|[getFirst()](/javascript/api/word/word.tablecellcollection#word-word-tablecellcollection-getfirst-member(1))|Gets the first table cell in this collection.| -||[getFirstOrNullObject()](/javascript/api/word/word.tablecellcollection#word-word-tablecellcollection-getfirstornullobject-member(1))|Gets the first table cell in this collection.| -||[items](/javascript/api/word/word.tablecellcollection#word-word-tablecellcollection-items-member)|Gets the loaded child items in this collection.| -|[TableCollection](/javascript/api/word/word.tablecollection)|[getFirst()](/javascript/api/word/word.tablecollection#word-word-tablecollection-getfirst-member(1))|Gets the first table in this collection.| -||[getFirstOrNullObject()](/javascript/api/word/word.tablecollection#word-word-tablecollection-getfirstornullobject-member(1))|Gets the first table in this collection.| -||[items](/javascript/api/word/word.tablecollection#word-word-tablecollection-items-member)|Gets the loaded child items in this collection.| -|[TableRow](/javascript/api/word/word.tablerow)|[cellCount](/javascript/api/word/word.tablerow#word-word-tablerow-cellcount-member)|Gets the number of cells in the row.| -||[cells](/javascript/api/word/word.tablerow#word-word-tablerow-cells-member)|Gets cells.| -||[clear()](/javascript/api/word/word.tablerow#word-word-tablerow-clear-member(1))|Clears the contents of the row.| -||[delete()](/javascript/api/word/word.tablerow#word-word-tablerow-delete-member(1))|Deletes the entire row.| -||[font](/javascript/api/word/word.tablerow#word-word-tablerow-font-member)|Gets the font.| -||[getBorder(borderLocation: Word.BorderLocation)](/javascript/api/word/word.tablerow#word-word-tablerow-getborder-member(1))|Gets the border style of the cells in the row.| -||[getCellPadding(cellPaddingLocation: Word.CellPaddingLocation)](/javascript/api/word/word.tablerow#word-word-tablerow-getcellpadding-member(1))|Gets cell padding in points.| -||[getNext()](/javascript/api/word/word.tablerow#word-word-tablerow-getnext-member(1))|Gets the next row.| -||[getNextOrNullObject()](/javascript/api/word/word.tablerow#word-word-tablerow-getnextornullobject-member(1))|Gets the next row.| -||[horizontalAlignment](/javascript/api/word/word.tablerow#word-word-tablerow-horizontalalignment-member)|Specifies the horizontal alignment of every cell in the row.| -||[insertRows(insertLocation: Word.InsertLocation.before \| Word.InsertLocation.after \| "Before" \| "After", rowCount: number, values?: string[][])](/javascript/api/word/word.tablerow#word-word-tablerow-insertrows-member(1))|Inserts rows using this row as a template.| -||[isHeader](/javascript/api/word/word.tablerow#word-word-tablerow-isheader-member)|Checks whether the row is a header row.| -||[parentTable](/javascript/api/word/word.tablerow#word-word-tablerow-parenttable-member)|Gets parent table.| -||[preferredHeight](/javascript/api/word/word.tablerow#word-word-tablerow-preferredheight-member)|Specifies the preferred height of the row in points.| -||[rowIndex](/javascript/api/word/word.tablerow#word-word-tablerow-rowindex-member)|Gets the index of the row in its parent table.| -||[search(searchText: string, searchOptions?: Word.SearchOptions \| { ignorePunct?: boolean ignoreSpace?: boolean matchCase?: boolean matchPrefix?: boolean matchSuffix?: boolean matchWholeWord?: boolean matchWildcards?: boolean })](/javascript/api/word/word.tablerow#word-word-tablerow-search-member(1))|Performs a search with the specified SearchOptions on the scope of the row.| -||[select(selectionMode?: Word.SelectionMode)](/javascript/api/word/word.tablerow#word-word-tablerow-select-member(1))|Selects the row and navigates the Word UI to it.| -||[setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number)](/javascript/api/word/word.tablerow#word-word-tablerow-setcellpadding-member(1))|Sets cell padding in points.| -||[shadingColor](/javascript/api/word/word.tablerow#word-word-tablerow-shadingcolor-member)|Specifies the shading color.| -||[values](/javascript/api/word/word.tablerow#word-word-tablerow-values-member)|Specifies the text values in the row, as a 2D JavaScript array.| -||[verticalAlignment](/javascript/api/word/word.tablerow#word-word-tablerow-verticalalignment-member)|Specifies the vertical alignment of the cells in the row.| -|[TableRowCollection](/javascript/api/word/word.tablerowcollection)|[getFirst()](/javascript/api/word/word.tablerowcollection#word-word-tablerowcollection-getfirst-member(1))|Gets the first row in this collection.| -||[getFirstOrNullObject()](/javascript/api/word/word.tablerowcollection#word-word-tablerowcollection-getfirstornullobject-member(1))|Gets the first row in this collection.| -||[items](/javascript/api/word/word.tablerowcollection#word-word-tablerowcollection-items-member)|Gets the loaded child items in this collection.| +[!INCLUDE[API table](../../includes/word-1_3.md)] ## See also diff --git a/docs/requirement-sets/word/word-api-1-4-requirement-set.md b/docs/requirement-sets/word/word-api-1-4-requirement-set.md index f8c97c62e0..094877f37c 100644 --- a/docs/requirement-sets/word/word-api-1-4-requirement-set.md +++ b/docs/requirement-sets/word/word-api-1-4-requirement-set.md @@ -14,114 +14,7 @@ WordApi 1.4 added support for bookmarks, change tracking, comments, custom XML p The following table lists the APIs in Word JavaScript API requirement set 1.4. To view API reference documentation for all APIs supported by Word JavaScript API requirement set 1.4 or earlier, see [Word APIs in requirement set 1.4 or earlier](/javascript/api/word?view=word-js-1.4&preserve-view=true). -| Class | Fields | Description | -|:---|:---|:---| -|[Body](/javascript/api/word/word.body)|[fields](/javascript/api/word/word.body#word-word-body-fields-member)|Gets the collection of field objects in the body.| -||[getComments()](/javascript/api/word/word.body#word-word-body-getcomments-member(1))|Gets comments associated with the body.| -||[getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion)](/javascript/api/word/word.body#word-word-body-getreviewedtext-member(1))|Gets reviewed text based on ChangeTrackingVersion selection.| -|[Comment](/javascript/api/word/word.comment)|[authorEmail](/javascript/api/word/word.comment#word-word-comment-authoremail-member)|Gets the email of the comment's author.| -||[authorName](/javascript/api/word/word.comment#word-word-comment-authorname-member)|Gets the name of the comment's author.| -||[content](/javascript/api/word/word.comment#word-word-comment-content-member)|Specifies the comment's content as plain text.| -||[contentRange](/javascript/api/word/word.comment#word-word-comment-contentrange-member)|Specifies the comment's content range.| -||[creationDate](/javascript/api/word/word.comment#word-word-comment-creationdate-member)|Gets the creation date of the comment.| -||[delete()](/javascript/api/word/word.comment#word-word-comment-delete-member(1))|Deletes the comment and its replies.| -||[getRange()](/javascript/api/word/word.comment#word-word-comment-getrange-member(1))|Gets the range in the main document where the comment is on.| -||[id](/javascript/api/word/word.comment#word-word-comment-id-member)|Gets the ID of the comment.| -||[replies](/javascript/api/word/word.comment#word-word-comment-replies-member)|Gets the collection of reply objects associated with the comment.| -||[reply(replyText: string)](/javascript/api/word/word.comment#word-word-comment-reply-member(1))|Adds a new reply to the end of the comment thread.| -||[resolved](/javascript/api/word/word.comment#word-word-comment-resolved-member)|Specifies the comment thread's status.| -|[CommentCollection](/javascript/api/word/word.commentcollection)|[getFirst()](/javascript/api/word/word.commentcollection#word-word-commentcollection-getfirst-member(1))|Gets the first comment in the collection.| -||[getFirstOrNullObject()](/javascript/api/word/word.commentcollection#word-word-commentcollection-getfirstornullobject-member(1))|Gets the first comment in the collection.| -||[items](/javascript/api/word/word.commentcollection#word-word-commentcollection-items-member)|Gets the loaded child items in this collection.| -|[CommentContentRange](/javascript/api/word/word.commentcontentrange)|[bold](/javascript/api/word/word.commentcontentrange#word-word-commentcontentrange-bold-member)|Specifies a value that indicates whether the comment text is bold.| -||[hyperlink](/javascript/api/word/word.commentcontentrange#word-word-commentcontentrange-hyperlink-member)|Gets the first hyperlink in the range, or sets a hyperlink on the range.| -||[insertText(text: string, insertLocation: Word.InsertLocation \| "Replace" \| "Start" \| "End" \| "Before" \| "After")](/javascript/api/word/word.commentcontentrange#word-word-commentcontentrange-inserttext-member(1))|Inserts text into at the specified location.| -||[isEmpty](/javascript/api/word/word.commentcontentrange#word-word-commentcontentrange-isempty-member)|Checks whether the range length is zero.| -||[italic](/javascript/api/word/word.commentcontentrange#word-word-commentcontentrange-italic-member)|Specifies a value that indicates whether the comment text is italicized.| -||[strikeThrough](/javascript/api/word/word.commentcontentrange#word-word-commentcontentrange-strikethrough-member)|Specifies a value that indicates whether the comment text has a strikethrough.| -||[text](/javascript/api/word/word.commentcontentrange#word-word-commentcontentrange-text-member)|Gets the text of the comment range.| -||[underline](/javascript/api/word/word.commentcontentrange#word-word-commentcontentrange-underline-member)|Specifies a value that indicates the comment text's underline type.| -|[CommentReply](/javascript/api/word/word.commentreply)|[authorEmail](/javascript/api/word/word.commentreply#word-word-commentreply-authoremail-member)|Gets the email of the comment reply's author.| -||[authorName](/javascript/api/word/word.commentreply#word-word-commentreply-authorname-member)|Gets the name of the comment reply's author.| -||[content](/javascript/api/word/word.commentreply#word-word-commentreply-content-member)|Specifies the comment reply's content.| -||[contentRange](/javascript/api/word/word.commentreply#word-word-commentreply-contentrange-member)|Specifies the commentReply's content range.| -||[creationDate](/javascript/api/word/word.commentreply#word-word-commentreply-creationdate-member)|Gets the creation date of the comment reply.| -||[delete()](/javascript/api/word/word.commentreply#word-word-commentreply-delete-member(1))|Deletes the comment reply.| -||[id](/javascript/api/word/word.commentreply#word-word-commentreply-id-member)|Gets the ID of the comment reply.| -||[parentComment](/javascript/api/word/word.commentreply#word-word-commentreply-parentcomment-member)|Gets the parent comment of this reply.| -|[CommentReplyCollection](/javascript/api/word/word.commentreplycollection)|[getFirst()](/javascript/api/word/word.commentreplycollection#word-word-commentreplycollection-getfirst-member(1))|Gets the first comment reply in the collection.| -||[getFirstOrNullObject()](/javascript/api/word/word.commentreplycollection#word-word-commentreplycollection-getfirstornullobject-member(1))|Gets the first comment reply in the collection.| -||[items](/javascript/api/word/word.commentreplycollection#word-word-commentreplycollection-items-member)|Gets the loaded child items in this collection.| -|[ContentControl](/javascript/api/word/word.contentcontrol)|[fields](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-fields-member)|Gets the collection of field objects in the content control.| -||[getComments()](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-getcomments-member(1))|Gets comments associated with the content control.| -||[getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion)](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-getreviewedtext-member(1))|Gets reviewed text based on ChangeTrackingVersion selection.| -|[CustomXmlPart](/javascript/api/word/word.customxmlpart)|[delete()](/javascript/api/word/word.customxmlpart#word-word-customxmlpart-delete-member(1))|Deletes the custom XML part.| -||[deleteAttribute(xpath: string, namespaceMappings: { [key: string]: string }, name: string)](/javascript/api/word/word.customxmlpart#word-word-customxmlpart-deleteattribute-member(1))|Deletes an attribute with the given name from the element identified by xpath.| -||[deleteElement(xpath: string, namespaceMappings: { [key: string]: string })](/javascript/api/word/word.customxmlpart#word-word-customxmlpart-deleteelement-member(1))|Deletes the element identified by xpath.| -||[getXml()](/javascript/api/word/word.customxmlpart#word-word-customxmlpart-getxml-member(1))|Gets the full XML content of the custom XML part.| -||[id](/javascript/api/word/word.customxmlpart#word-word-customxmlpart-id-member)|Gets the ID of the custom XML part.| -||[insertAttribute(xpath: string, namespaceMappings: { [key: string]: string }, name: string, value: string)](/javascript/api/word/word.customxmlpart#word-word-customxmlpart-insertattribute-member(1))|Inserts an attribute with the given name and value to the element identified by xpath.| -||[insertElement(xpath: string, xml: string, namespaceMappings: { [key: string]: string }, index?: number)](/javascript/api/word/word.customxmlpart#word-word-customxmlpart-insertelement-member(1))|Inserts the given XML under the parent element identified by xpath at child position index.| -||[namespaceUri](/javascript/api/word/word.customxmlpart#word-word-customxmlpart-namespaceuri-member)|Gets the namespace URI of the custom XML part.| -||[query(xpath: string, namespaceMappings: { [key: string]: string })](/javascript/api/word/word.customxmlpart#word-word-customxmlpart-query-member(1))|Queries the XML content of the custom XML part.| -||[setXml(xml: string)](/javascript/api/word/word.customxmlpart#word-word-customxmlpart-setxml-member(1))|Sets the full XML content of the custom XML part.| -||[updateAttribute(xpath: string, namespaceMappings: { [key: string]: string }, name: string, value: string)](/javascript/api/word/word.customxmlpart#word-word-customxmlpart-updateattribute-member(1))|Updates the value of an attribute with the given name of the element identified by xpath.| -||[updateElement(xpath: string, xml: string, namespaceMappings: { [key: string]: string })](/javascript/api/word/word.customxmlpart#word-word-customxmlpart-updateelement-member(1))|Updates the XML of the element identified by xpath.| -|[CustomXmlPartCollection](/javascript/api/word/word.customxmlpartcollection)|[add(xml: string)](/javascript/api/word/word.customxmlpartcollection#word-word-customxmlpartcollection-add-member(1))|Adds a new custom XML part to the document.| -||[getByNamespace(namespaceUri: string)](/javascript/api/word/word.customxmlpartcollection#word-word-customxmlpartcollection-getbynamespace-member(1))|Gets a new scoped collection of custom XML parts whose namespaces match the given namespace.| -||[getCount()](/javascript/api/word/word.customxmlpartcollection#word-word-customxmlpartcollection-getcount-member(1))|Gets the number of items in the collection.| -||[getItem(id: string)](/javascript/api/word/word.customxmlpartcollection#word-word-customxmlpartcollection-getitem-member(1))|Gets a custom XML part based on its ID.| -||[getItemOrNullObject(id: string)](/javascript/api/word/word.customxmlpartcollection#word-word-customxmlpartcollection-getitemornullobject-member(1))|Gets a custom XML part based on its ID.| -||[items](/javascript/api/word/word.customxmlpartcollection#word-word-customxmlpartcollection-items-member)|Gets the loaded child items in this collection.| -|[CustomXmlPartScopedCollection](/javascript/api/word/word.customxmlpartscopedcollection)|[getCount()](/javascript/api/word/word.customxmlpartscopedcollection#word-word-customxmlpartscopedcollection-getcount-member(1))|Gets the number of items in the collection.| -||[getItem(id: string)](/javascript/api/word/word.customxmlpartscopedcollection#word-word-customxmlpartscopedcollection-getitem-member(1))|Gets a custom XML part based on its ID.| -||[getItemOrNullObject(id: string)](/javascript/api/word/word.customxmlpartscopedcollection#word-word-customxmlpartscopedcollection-getitemornullobject-member(1))|Gets a custom XML part based on its ID.| -||[getOnlyItem()](/javascript/api/word/word.customxmlpartscopedcollection#word-word-customxmlpartscopedcollection-getonlyitem-member(1))|If the collection contains exactly one item, this method returns it.| -||[getOnlyItemOrNullObject()](/javascript/api/word/word.customxmlpartscopedcollection#word-word-customxmlpartscopedcollection-getonlyitemornullobject-member(1))|If the collection contains exactly one item, this method returns it.| -||[items](/javascript/api/word/word.customxmlpartscopedcollection#word-word-customxmlpartscopedcollection-items-member)|Gets the loaded child items in this collection.| -|[Document](/javascript/api/word/word.document)|[changeTrackingMode](/javascript/api/word/word.document#word-word-document-changetrackingmode-member)|Specifies the ChangeTracking mode.| -||[customXmlParts](/javascript/api/word/word.document#word-word-document-customxmlparts-member)|Gets the custom XML parts in the document.| -||[deleteBookmark(name: string)](/javascript/api/word/word.document#word-word-document-deletebookmark-member(1))|Deletes a bookmark, if it exists, from the document.| -||[getBookmarkRange(name: string)](/javascript/api/word/word.document#word-word-document-getbookmarkrange-member(1))|Gets a bookmark's range.| -||[getBookmarkRangeOrNullObject(name: string)](/javascript/api/word/word.document#word-word-document-getbookmarkrangeornullobject-member(1))|Gets a bookmark's range.| -||[settings](/javascript/api/word/word.document#word-word-document-settings-member)|Gets the add-in's settings in the document.| -|[Field](/javascript/api/word/word.field)|[code](/javascript/api/word/word.field#word-word-field-code-member)|Gets the field's code instruction.| -||[getNext()](/javascript/api/word/word.field#word-word-field-getnext-member(1))|Gets the next field.| -||[getNextOrNullObject()](/javascript/api/word/word.field#word-word-field-getnextornullobject-member(1))|Gets the next field.| -||[parentBody](/javascript/api/word/word.field#word-word-field-parentbody-member)|Gets the parent body of the field.| -||[parentContentControl](/javascript/api/word/word.field#word-word-field-parentcontentcontrol-member)|Gets the content control that contains the field.| -||[parentContentControlOrNullObject](/javascript/api/word/word.field#word-word-field-parentcontentcontrolornullobject-member)|Gets the content control that contains the field.| -||[parentTable](/javascript/api/word/word.field#word-word-field-parenttable-member)|Gets the table that contains the field.| -||[parentTableCell](/javascript/api/word/word.field#word-word-field-parenttablecell-member)|Gets the table cell that contains the field.| -||[parentTableCellOrNullObject](/javascript/api/word/word.field#word-word-field-parenttablecellornullobject-member)|Gets the table cell that contains the field.| -||[parentTableOrNullObject](/javascript/api/word/word.field#word-word-field-parenttableornullobject-member)|Gets the table that contains the field.| -||[result](/javascript/api/word/word.field#word-word-field-result-member)|Gets the field's result data.| -|[FieldCollection](/javascript/api/word/word.fieldcollection)|[getFirst()](/javascript/api/word/word.fieldcollection#word-word-fieldcollection-getfirst-member(1))|Gets the first field in this collection.| -||[getFirstOrNullObject()](/javascript/api/word/word.fieldcollection#word-word-fieldcollection-getfirstornullobject-member(1))|Gets the first field in this collection.| -||[items](/javascript/api/word/word.fieldcollection#word-word-fieldcollection-items-member)|Gets the loaded child items in this collection.| -|[Paragraph](/javascript/api/word/word.paragraph)|[fields](/javascript/api/word/word.paragraph#word-word-paragraph-fields-member)|Gets the collection of fields in the paragraph.| -||[getComments()](/javascript/api/word/word.paragraph#word-word-paragraph-getcomments-member(1))|Gets comments associated with the paragraph.| -||[getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion)](/javascript/api/word/word.paragraph#word-word-paragraph-getreviewedtext-member(1))|Gets reviewed text based on ChangeTrackingVersion selection.| -|[Range](/javascript/api/word/word.range)|[fields](/javascript/api/word/word.range#word-word-range-fields-member)|Gets the collection of field objects in the range.| -||[getBookmarks(includeHidden?: boolean, includeAdjacent?: boolean)](/javascript/api/word/word.range#word-word-range-getbookmarks-member(1))|Gets the names all bookmarks in or overlapping the range.| -||[getComments()](/javascript/api/word/word.range#word-word-range-getcomments-member(1))|Gets comments associated with the range.| -||[getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion)](/javascript/api/word/word.range#word-word-range-getreviewedtext-member(1))|Gets reviewed text based on ChangeTrackingVersion selection.| -||[insertBookmark(name: string)](/javascript/api/word/word.range#word-word-range-insertbookmark-member(1))|Inserts a bookmark on the range.| -||[insertComment(commentText: string)](/javascript/api/word/word.range#word-word-range-insertcomment-member(1))|Insert a comment on the range.| -|[Setting](/javascript/api/word/word.setting)|[delete()](/javascript/api/word/word.setting#word-word-setting-delete-member(1))|Deletes the setting.| -||[key](/javascript/api/word/word.setting#word-word-setting-key-member)|Gets the key of the setting.| -||[value](/javascript/api/word/word.setting#word-word-setting-value-member)|Specifies the value of the setting.| -|[SettingCollection](/javascript/api/word/word.settingcollection)|[add(key: string, value: any)](/javascript/api/word/word.settingcollection#word-word-settingcollection-add-member(1))|Creates a new setting or sets an existing setting.| -||[deleteAll()](/javascript/api/word/word.settingcollection#word-word-settingcollection-deleteall-member(1))|Deletes all settings in this add-in.| -||[getCount()](/javascript/api/word/word.settingcollection#word-word-settingcollection-getcount-member(1))|Gets the count of settings.| -||[getItem(key: string)](/javascript/api/word/word.settingcollection#word-word-settingcollection-getitem-member(1))|Gets a setting object by its key, which is case-sensitive.| -||[getItemOrNullObject(key: string)](/javascript/api/word/word.settingcollection#word-word-settingcollection-getitemornullobject-member(1))|Gets a setting object by its key, which is case-sensitive.| -||[items](/javascript/api/word/word.settingcollection#word-word-settingcollection-items-member)|Gets the loaded child items in this collection.| -|[Table](/javascript/api/word/word.table)|[fields](/javascript/api/word/word.table#word-word-table-fields-member)|Gets the collection of field objects in the table.| -||[mergeCells(topRow: number, firstCell: number, bottomRow: number, lastCell: number)](/javascript/api/word/word.table#word-word-table-mergecells-member(1))|Merges the cells bounded inclusively by a first and last cell.| -|[TableCell](/javascript/api/word/word.tablecell)|[split(rowCount: number, columnCount: number)](/javascript/api/word/word.tablecell#word-word-tablecell-split-member(1))|Splits the cell into the specified number of rows and columns.| -|[TableRow](/javascript/api/word/word.tablerow)|[fields](/javascript/api/word/word.tablerow#word-word-tablerow-fields-member)|Gets the collection of field objects in the table row.| -||[merge()](/javascript/api/word/word.tablerow#word-word-tablerow-merge-member(1))|Merges the row into one cell.| +[!INCLUDE[API table](../../includes/word-1_4.md)] ## See also diff --git a/docs/requirement-sets/word/word-api-1-5-requirement-set.md b/docs/requirement-sets/word/word-api-1-5-requirement-set.md index 0d5dd44e24..3a5b1a8ca0 100644 --- a/docs/requirement-sets/word/word-api-1-5-requirement-set.md +++ b/docs/requirement-sets/word/word-api-1-5-requirement-set.md @@ -14,118 +14,7 @@ WordApi 1.5 added support for footnotes, endnotes, content control events, and s The following table lists the APIs in Word JavaScript API requirement set 1.5. To view API reference documentation for all APIs supported by Word JavaScript API requirement set 1.5 or earlier, see [Word APIs in requirement set 1.5 or earlier](/javascript/api/word?view=word-js-1.5&preserve-view=true). -| Class | Fields | Description | -|:---|:---|:---| -|[Application](/javascript/api/word/word.application)|[retrieveStylesFromBase64(base64File: string)](/javascript/api/word/word.application#word-word-application-retrievestylesfrombase64-member(1))|Parse styles from template Base64 file and return JSON format of retrieved styles as a string.| -|[Body](/javascript/api/word/word.body)|[endnotes](/javascript/api/word/word.body#word-word-body-endnotes-member)|Gets the collection of endnotes in the body.| -||[footnotes](/javascript/api/word/word.body#word-word-body-footnotes-member)|Gets the collection of footnotes in the body.| -||[getContentControls(options?: Word.ContentControlOptions)](/javascript/api/word/word.body#word-word-body-getcontentcontrols-member(1))|Gets the currently supported content controls in the body.| -|[ContentControl](/javascript/api/word/word.contentcontrol)|[endnotes](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-endnotes-member)|Gets the collection of endnotes in the content control.| -||[footnotes](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-footnotes-member)|Gets the collection of footnotes in the content control.| -||[getContentControls(options?: Word.ContentControlOptions)](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-getcontentcontrols-member(1))|Gets the currently supported child content controls in this content control.| -||[onDataChanged](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-ondatachanged-member)|Occurs when data within the content control are changed.| -||[onDeleted](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-ondeleted-member)|Occurs when the content control is deleted.| -||[onEntered](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-onentered-member)|Occurs when the content control is entered.| -||[onExited](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-onexited-member)|Occurs when the content control is exited, for example, when the cursor leaves the content control.| -||[onSelectionChanged](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-onselectionchanged-member)|Occurs when selection within the content control is changed.| -|[ContentControlAddedEventArgs](/javascript/api/word/word.contentcontroladdedeventargs)|[eventType](/javascript/api/word/word.contentcontroladdedeventargs#word-word-contentcontroladdedeventargs-eventtype-member)|The event type.| -||[ids](/javascript/api/word/word.contentcontroladdedeventargs#word-word-contentcontroladdedeventargs-ids-member)|Gets the content control IDs.| -||[source](/javascript/api/word/word.contentcontroladdedeventargs#word-word-contentcontroladdedeventargs-source-member)|The source of the event.| -|[ContentControlCollection](/javascript/api/word/word.contentcontrolcollection)|[getByChangeTrackingStates(changeTrackingStates: Word.ChangeTrackingState[])](/javascript/api/word/word.contentcontrolcollection#word-word-contentcontrolcollection-getbychangetrackingstates-member(1))|Gets the content controls that have the specified tracking state.| -|[ContentControlDataChangedEventArgs](/javascript/api/word/word.contentcontroldatachangedeventargs)|[eventType](/javascript/api/word/word.contentcontroldatachangedeventargs#word-word-contentcontroldatachangedeventargs-eventtype-member)|The event type.| -||[ids](/javascript/api/word/word.contentcontroldatachangedeventargs#word-word-contentcontroldatachangedeventargs-ids-member)|Gets the content control IDs.| -||[source](/javascript/api/word/word.contentcontroldatachangedeventargs#word-word-contentcontroldatachangedeventargs-source-member)|The source of the event.| -|[ContentControlDeletedEventArgs](/javascript/api/word/word.contentcontroldeletedeventargs)|[eventType](/javascript/api/word/word.contentcontroldeletedeventargs#word-word-contentcontroldeletedeventargs-eventtype-member)|The event type.| -||[ids](/javascript/api/word/word.contentcontroldeletedeventargs#word-word-contentcontroldeletedeventargs-ids-member)|Gets the content control IDs.| -||[source](/javascript/api/word/word.contentcontroldeletedeventargs#word-word-contentcontroldeletedeventargs-source-member)|The source of the event.| -|[ContentControlEnteredEventArgs](/javascript/api/word/word.contentcontrolenteredeventargs)|[eventType](/javascript/api/word/word.contentcontrolenteredeventargs#word-word-contentcontrolenteredeventargs-eventtype-member)|The event type.| -||[ids](/javascript/api/word/word.contentcontrolenteredeventargs#word-word-contentcontrolenteredeventargs-ids-member)|Gets the content control IDs.| -||[source](/javascript/api/word/word.contentcontrolenteredeventargs#word-word-contentcontrolenteredeventargs-source-member)|The source of the event.| -|[ContentControlExitedEventArgs](/javascript/api/word/word.contentcontrolexitedeventargs)|[eventType](/javascript/api/word/word.contentcontrolexitedeventargs#word-word-contentcontrolexitedeventargs-eventtype-member)|The event type.| -||[ids](/javascript/api/word/word.contentcontrolexitedeventargs#word-word-contentcontrolexitedeventargs-ids-member)|Gets the content control IDs.| -||[source](/javascript/api/word/word.contentcontrolexitedeventargs#word-word-contentcontrolexitedeventargs-source-member)|The source of the event.| -|[ContentControlOptions](/javascript/api/word/word.contentcontroloptions)|[types](/javascript/api/word/word.contentcontroloptions#word-word-contentcontroloptions-types-member)|An array of content control types, item must be 'RichText' or 'PlainText'.| -|[ContentControlSelectionChangedEventArgs](/javascript/api/word/word.contentcontrolselectionchangedeventargs)|[eventType](/javascript/api/word/word.contentcontrolselectionchangedeventargs#word-word-contentcontrolselectionchangedeventargs-eventtype-member)|The event type.| -||[ids](/javascript/api/word/word.contentcontrolselectionchangedeventargs#word-word-contentcontrolselectionchangedeventargs-ids-member)|Gets the content control IDs.| -||[source](/javascript/api/word/word.contentcontrolselectionchangedeventargs#word-word-contentcontrolselectionchangedeventargs-source-member)|The source of the event.| -|[Document](/javascript/api/word/word.document)|[addStyle(name: string, type: Word.StyleType)](/javascript/api/word/word.document#word-word-document-addstyle-member(1))|Adds a style into the document by name and type.| -||[close(closeBehavior?: Word.CloseBehavior)](/javascript/api/word/word.document#word-word-document-close-member(1))|Closes the current document.| -||[getContentControls(options?: Word.ContentControlOptions)](/javascript/api/word/word.document#word-word-document-getcontentcontrols-member(1))|Gets the currently supported content controls in the document.| -||[getEndnoteBody()](/javascript/api/word/word.document#word-word-document-getendnotebody-member(1))|Gets the document's endnotes in a single body.| -||[getFootnoteBody()](/javascript/api/word/word.document#word-word-document-getfootnotebody-member(1))|Gets the document's footnotes in a single body.| -||[getStyles()](/javascript/api/word/word.document#word-word-document-getstyles-member(1))|Gets a StyleCollection object that represents the whole style set of the document.| -||[insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace \| Word.InsertLocation.start \| Word.InsertLocation.end \| "Replace" \| "Start" \| "End", insertFileOptions?: Word.InsertFileOptions)](/javascript/api/word/word.document#word-word-document-insertfilefrombase64-member(1))|Inserts a document into the target document at a specific location with additional properties.| -||[onContentControlAdded](/javascript/api/word/word.document#word-word-document-oncontentcontroladded-member)|Occurs when a content control is added.| -||[save(saveBehavior?: Word.SaveBehavior, fileName?: string)](/javascript/api/word/word.document#word-word-document-save-member(1))|Saves the document.| -|[Field](/javascript/api/word/word.field)|[code](/javascript/api/word/word.field#word-word-field-code-member)|Specifies the field's code instruction.| -||[data](/javascript/api/word/word.field#word-word-field-data-member)|Specifies data in an "Addin" field.| -||[delete()](/javascript/api/word/word.field#word-word-field-delete-member(1))|Deletes the field.| -||[kind](/javascript/api/word/word.field#word-word-field-kind-member)|Gets the field's kind.| -||[locked](/javascript/api/word/word.field#word-word-field-locked-member)|Specifies whether the field is locked.| -||[select(selectionMode?: Word.SelectionMode)](/javascript/api/word/word.field#word-word-field-select-member(1))|Selects the field.| -||[type](/javascript/api/word/word.field#word-word-field-type-member)|Gets the field's type.| -||[updateResult()](/javascript/api/word/word.field#word-word-field-updateresult-member(1))|Updates the field.| -|[FieldCollection](/javascript/api/word/word.fieldcollection)|[getByTypes(types: Word.FieldType[])](/javascript/api/word/word.fieldcollection#word-word-fieldcollection-getbytypes-member(1))|Gets the Field object collection including the specified types of fields.| -|[InsertFileOptions](/javascript/api/word/word.insertfileoptions)|[importChangeTrackingMode](/javascript/api/word/word.insertfileoptions#word-word-insertfileoptions-importchangetrackingmode-member)|Represents whether the change tracking mode status from the source document should be imported.| -||[importPageColor](/javascript/api/word/word.insertfileoptions#word-word-insertfileoptions-importpagecolor-member)|Represents whether the page color and other background information from the source document should be imported.| -||[importParagraphSpacing](/javascript/api/word/word.insertfileoptions#word-word-insertfileoptions-importparagraphspacing-member)|Represents whether the paragraph spacing from the source document should be imported.| -||[importStyles](/javascript/api/word/word.insertfileoptions#word-word-insertfileoptions-importstyles-member)|Represents whether the styles from the source document should be imported.| -||[importTheme](/javascript/api/word/word.insertfileoptions#word-word-insertfileoptions-importtheme-member)|Represents whether the theme from the source document should be imported.| -|[NoteItem](/javascript/api/word/word.noteitem)|[body](/javascript/api/word/word.noteitem#word-word-noteitem-body-member)|Represents the body object of the note item.| -||[delete()](/javascript/api/word/word.noteitem#word-word-noteitem-delete-member(1))|Deletes the note item.| -||[getNext()](/javascript/api/word/word.noteitem#word-word-noteitem-getnext-member(1))|Gets the next note item of the same type.| -||[getNextOrNullObject()](/javascript/api/word/word.noteitem#word-word-noteitem-getnextornullobject-member(1))|Gets the next note item of the same type.| -||[reference](/javascript/api/word/word.noteitem#word-word-noteitem-reference-member)|Represents a footnote or endnote reference in the main document.| -||[type](/javascript/api/word/word.noteitem#word-word-noteitem-type-member)|Represents the note item type: footnote or endnote.| -|[NoteItemCollection](/javascript/api/word/word.noteitemcollection)|[getFirst()](/javascript/api/word/word.noteitemcollection#word-word-noteitemcollection-getfirst-member(1))|Gets the first note item in this collection.| -||[getFirstOrNullObject()](/javascript/api/word/word.noteitemcollection#word-word-noteitemcollection-getfirstornullobject-member(1))|Gets the first note item in this collection.| -||[items](/javascript/api/word/word.noteitemcollection#word-word-noteitemcollection-items-member)|Gets the loaded child items in this collection.| -|[Paragraph](/javascript/api/word/word.paragraph)|[endnotes](/javascript/api/word/word.paragraph#word-word-paragraph-endnotes-member)|Gets the collection of endnotes in the paragraph.| -||[footnotes](/javascript/api/word/word.paragraph#word-word-paragraph-footnotes-member)|Gets the collection of footnotes in the paragraph.| -||[getContentControls(options?: Word.ContentControlOptions)](/javascript/api/word/word.paragraph#word-word-paragraph-getcontentcontrols-member(1))|Gets the currently supported content controls in the paragraph.| -|[ParagraphFormat](/javascript/api/word/word.paragraphformat)|[alignment](/javascript/api/word/word.paragraphformat#word-word-paragraphformat-alignment-member)|Specifies the alignment for the specified paragraphs.| -||[firstLineIndent](/javascript/api/word/word.paragraphformat#word-word-paragraphformat-firstlineindent-member)|Specifies the value (in points) for a first line or hanging indent.| -||[keepTogether](/javascript/api/word/word.paragraphformat#word-word-paragraphformat-keeptogether-member)|Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document.| -||[keepWithNext](/javascript/api/word/word.paragraphformat#word-word-paragraphformat-keepwithnext-member)|Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document.| -||[leftIndent](/javascript/api/word/word.paragraphformat#word-word-paragraphformat-leftindent-member)|Specifies the left indent.| -||[lineSpacing](/javascript/api/word/word.paragraphformat#word-word-paragraphformat-linespacing-member)|Specifies the line spacing (in points) for the specified paragraphs.| -||[lineUnitAfter](/javascript/api/word/word.paragraphformat#word-word-paragraphformat-lineunitafter-member)|Specifies the amount of spacing (in gridlines) after the specified paragraphs.| -||[lineUnitBefore](/javascript/api/word/word.paragraphformat#word-word-paragraphformat-lineunitbefore-member)|Specifies the amount of spacing (in gridlines) before the specified paragraphs.| -||[mirrorIndents](/javascript/api/word/word.paragraphformat#word-word-paragraphformat-mirrorindents-member)|Specifies whether left and right indents are the same width.| -||[outlineLevel](/javascript/api/word/word.paragraphformat#word-word-paragraphformat-outlinelevel-member)|Specifies the outline level for the specified paragraphs.| -||[rightIndent](/javascript/api/word/word.paragraphformat#word-word-paragraphformat-rightindent-member)|Specifies the right indent (in points) for the specified paragraphs.| -||[spaceAfter](/javascript/api/word/word.paragraphformat#word-word-paragraphformat-spaceafter-member)|Specifies the amount of spacing (in points) after the specified paragraph or text column.| -||[spaceBefore](/javascript/api/word/word.paragraphformat#word-word-paragraphformat-spacebefore-member)|Specifies the spacing (in points) before the specified paragraphs.| -||[widowControl](/javascript/api/word/word.paragraphformat#word-word-paragraphformat-widowcontrol-member)|Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document.| -|[Range](/javascript/api/word/word.range)|[endnotes](/javascript/api/word/word.range#word-word-range-endnotes-member)|Gets the collection of endnotes in the range.| -||[footnotes](/javascript/api/word/word.range#word-word-range-footnotes-member)|Gets the collection of footnotes in the range.| -||[getContentControls(options?: Word.ContentControlOptions)](/javascript/api/word/word.range#word-word-range-getcontentcontrols-member(1))|Gets the currently supported content controls in the range.| -||[insertEndnote(insertText?: string)](/javascript/api/word/word.range#word-word-range-insertendnote-member(1))|Inserts an endnote.| -||[insertField(insertLocation: Word.InsertLocation \| "Replace" \| "Start" \| "End" \| "Before" \| "After", fieldType?: Word.FieldType, text?: string, removeFormatting?: boolean)](/javascript/api/word/word.range#word-word-range-insertfield-member(1))|Inserts a field at the specified location.| -||[insertFootnote(insertText?: string)](/javascript/api/word/word.range#word-word-range-insertfootnote-member(1))|Inserts a footnote.| -|[Style](/javascript/api/word/word.style)|[baseStyle](/javascript/api/word/word.style#word-word-style-basestyle-member)|Gets the name of an existing style to use as the base formatting of another style.| -||[builtIn](/javascript/api/word/word.style#word-word-style-builtin-member)|Gets whether the specified style is a built-in style.| -||[delete()](/javascript/api/word/word.style#word-word-style-delete-member(1))|Deletes the style.| -||[font](/javascript/api/word/word.style#word-word-style-font-member)|Gets a font object that represents the character formatting of the specified style.| -||[inUse](/javascript/api/word/word.style#word-word-style-inuse-member)|Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document.| -||[linked](/javascript/api/word/word.style#word-word-style-linked-member)|Gets whether a style is a linked style that can be used for both paragraph and character formatting.| -||[nameLocal](/javascript/api/word/word.style#word-word-style-namelocal-member)|Gets the name of a style in the language of the user.| -||[nextParagraphStyle](/javascript/api/word/word.style#word-word-style-nextparagraphstyle-member)|Gets the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style.| -||[paragraphFormat](/javascript/api/word/word.style#word-word-style-paragraphformat-member)|Gets a ParagraphFormat object that represents the paragraph settings for the specified style.| -||[priority](/javascript/api/word/word.style#word-word-style-priority-member)|Specifies the priority.| -||[quickStyle](/javascript/api/word/word.style#word-word-style-quickstyle-member)|Specifies whether the style corresponds to an available quick style.| -||[type](/javascript/api/word/word.style#word-word-style-type-member)|Gets the style type.| -||[unhideWhenUsed](/javascript/api/word/word.style#word-word-style-unhidewhenused-member)|Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document.| -||[visibility](/javascript/api/word/word.style#word-word-style-visibility-member)|Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane.| -|[StyleCollection](/javascript/api/word/word.stylecollection)|[getByName(name: string)](/javascript/api/word/word.stylecollection#word-word-stylecollection-getbyname-member(1))|Get the style object by its name.| -||[getByNameOrNullObject(name: string)](/javascript/api/word/word.stylecollection#word-word-stylecollection-getbynameornullobject-member(1))|If the corresponding style doesn't exist, then this method returns an object with its `isNullObject` property set to `true`.| -||[getCount()](/javascript/api/word/word.stylecollection#word-word-stylecollection-getcount-member(1))|Gets the number of the styles in the collection.| -||[getItem(index: number)](/javascript/api/word/word.stylecollection#word-word-stylecollection-getitem-member(1))|Gets a style object by its index in the collection.| -||[items](/javascript/api/word/word.stylecollection#word-word-stylecollection-items-member)|Gets the loaded child items in this collection.| -|[Table](/javascript/api/word/word.table)|[endnotes](/javascript/api/word/word.table#word-word-table-endnotes-member)|Gets the collection of endnotes in the table.| -||[footnotes](/javascript/api/word/word.table#word-word-table-footnotes-member)|Gets the collection of footnotes in the table.| -|[TableRow](/javascript/api/word/word.tablerow)|[endnotes](/javascript/api/word/word.tablerow#word-word-tablerow-endnotes-member)|Gets the collection of endnotes in the table row.| -||[footnotes](/javascript/api/word/word.tablerow#word-word-tablerow-footnotes-member)|Gets the collection of footnotes in the table row.| +[!INCLUDE[API table](../../includes/word-1_5.md)] ## See also diff --git a/docs/requirement-sets/word/word-api-1-6-requirement-set.md b/docs/requirement-sets/word/word-api-1-6-requirement-set.md index 92379d4872..2c8c628508 100644 --- a/docs/requirement-sets/word/word-api-1-6-requirement-set.md +++ b/docs/requirement-sets/word/word-api-1-6-requirement-set.md @@ -14,54 +14,7 @@ WordApi 1.6 mainly added enhanced support for management of styles and tracked c The following table lists the APIs in Word JavaScript API requirement set 1.6. To view API reference documentation for all APIs supported by Word JavaScript API requirement set 1.6 or earlier, see [Word APIs in requirement set 1.6 or earlier](/javascript/api/word?view=word-js-1.6&preserve-view=true). -| Class | Fields | Description | -|:---|:---|:---| -|[Application](/javascript/api/word/word.application)|[openDocument(filePath: string)](/javascript/api/word/word.application#word-word-application-opendocument-member(1))|Opens a document and displays it in a new tab or window.| -|[Body](/javascript/api/word/word.body)|[getTrackedChanges()](/javascript/api/word/word.body#word-word-body-gettrackedchanges-member(1))|Gets the collection of the TrackedChange objects in the body.| -|[ContentControl](/javascript/api/word/word.contentcontrol)|[getTrackedChanges()](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-gettrackedchanges-member(1))|Gets the collection of the TrackedChange objects in the content control.| -|[Document](/javascript/api/word/word.document)|[getParagraphByUniqueLocalId(id: string)](/javascript/api/word/word.document#word-word-document-getparagraphbyuniquelocalid-member(1))|Gets the paragraph by its unique local ID.| -||[importStylesFromJson(stylesJson: string)](/javascript/api/word/word.document#word-word-document-importstylesfromjson-member(1))|Import styles from a JSON-formatted string.| -||[onParagraphAdded](/javascript/api/word/word.document#word-word-document-onparagraphadded-member)|Occurs when the user adds new paragraphs.| -||[onParagraphChanged](/javascript/api/word/word.document#word-word-document-onparagraphchanged-member)|Occurs when the user changes paragraphs.| -||[onParagraphDeleted](/javascript/api/word/word.document#word-word-document-onparagraphdeleted-member)|Occurs when the user deletes paragraphs.| -|[InsertFileOptions](/javascript/api/word/word.insertfileoptions)|[importCustomProperties](/javascript/api/word/word.insertfileoptions#word-word-insertfileoptions-importcustomproperties-member)|Represents whether the custom properties from the source document should be imported.| -||[importCustomXmlParts](/javascript/api/word/word.insertfileoptions#word-word-insertfileoptions-importcustomxmlparts-member)|Represents whether the custom XML parts from the source document should be imported.| -|[Paragraph](/javascript/api/word/word.paragraph)|[getTrackedChanges()](/javascript/api/word/word.paragraph#word-word-paragraph-gettrackedchanges-member(1))|Gets the collection of the TrackedChange objects in the paragraph.| -||[uniqueLocalId](/javascript/api/word/word.paragraph#word-word-paragraph-uniquelocalid-member)|Gets a string that represents the paragraph identifier in the current session.| -|[ParagraphAddedEventArgs](/javascript/api/word/word.paragraphaddedeventargs)|[source](/javascript/api/word/word.paragraphaddedeventargs#word-word-paragraphaddedeventargs-source-member)|The source of the event.| -||[type](/javascript/api/word/word.paragraphaddedeventargs#word-word-paragraphaddedeventargs-type-member)|The event type.| -||[uniqueLocalIds](/javascript/api/word/word.paragraphaddedeventargs#word-word-paragraphaddedeventargs-uniquelocalids-member)|Gets the unique IDs of the involved paragraphs.| -|[ParagraphChangedEventArgs](/javascript/api/word/word.paragraphchangedeventargs)|[source](/javascript/api/word/word.paragraphchangedeventargs#word-word-paragraphchangedeventargs-source-member)|The source of the event.| -||[type](/javascript/api/word/word.paragraphchangedeventargs#word-word-paragraphchangedeventargs-type-member)|The event type.| -||[uniqueLocalIds](/javascript/api/word/word.paragraphchangedeventargs#word-word-paragraphchangedeventargs-uniquelocalids-member)|Gets the unique IDs of the involved paragraphs.| -|[ParagraphDeletedEventArgs](/javascript/api/word/word.paragraphdeletedeventargs)|[source](/javascript/api/word/word.paragraphdeletedeventargs#word-word-paragraphdeletedeventargs-source-member)|The source of the event.| -||[type](/javascript/api/word/word.paragraphdeletedeventargs#word-word-paragraphdeletedeventargs-type-member)|The event type.| -||[uniqueLocalIds](/javascript/api/word/word.paragraphdeletedeventargs#word-word-paragraphdeletedeventargs-uniquelocalids-member)|Gets the unique IDs of the involved paragraphs.| -|[Range](/javascript/api/word/word.range)|[getTrackedChanges()](/javascript/api/word/word.range#word-word-range-gettrackedchanges-member(1))|Gets the collection of the TrackedChange objects in the range.| -|[Shading](/javascript/api/word/word.shading)|[backgroundPatternColor](/javascript/api/word/word.shading#word-word-shading-backgroundpatterncolor-member)|Specifies the color for the background of the object.| -|[Style](/javascript/api/word/word.style)|[baseStyle](/javascript/api/word/word.style#word-word-style-basestyle-member)|Specifies the name of an existing style to use as the base formatting of another style.| -||[nextParagraphStyle](/javascript/api/word/word.style#word-word-style-nextparagraphstyle-member)|Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style.| -||[shading](/javascript/api/word/word.style#word-word-style-shading-member)|Gets a Shading object that represents the shading for the specified style.| -||[tableStyle](/javascript/api/word/word.style#word-word-style-tablestyle-member)|Gets a TableStyle object representing Style properties that can be applied to a table.| -|[TableStyle](/javascript/api/word/word.tablestyle)|[bottomCellMargin](/javascript/api/word/word.tablestyle#word-word-tablestyle-bottomcellmargin-member)|Specifies the amount of space to add between the contents and the bottom borders of the cells.| -||[cellSpacing](/javascript/api/word/word.tablestyle#word-word-tablestyle-cellspacing-member)|Specifies the spacing (in points) between the cells in a table style.| -||[leftCellMargin](/javascript/api/word/word.tablestyle#word-word-tablestyle-leftcellmargin-member)|Specifies the amount of space to add between the contents and the left borders of the cells.| -||[rightCellMargin](/javascript/api/word/word.tablestyle#word-word-tablestyle-rightcellmargin-member)|Specifies the amount of space to add between the contents and the right borders of the cells.| -||[topCellMargin](/javascript/api/word/word.tablestyle#word-word-tablestyle-topcellmargin-member)|Specifies the amount of space to add between the contents and the top borders of the cells.| -|[TrackedChange](/javascript/api/word/word.trackedchange)|[accept()](/javascript/api/word/word.trackedchange#word-word-trackedchange-accept-member(1))|Accepts the tracked change.| -||[author](/javascript/api/word/word.trackedchange#word-word-trackedchange-author-member)|Gets the author of the tracked change.| -||[date](/javascript/api/word/word.trackedchange#word-word-trackedchange-date-member)|Gets the date of the tracked change.| -||[getNext()](/javascript/api/word/word.trackedchange#word-word-trackedchange-getnext-member(1))|Gets the next tracked change.| -||[getNextOrNullObject()](/javascript/api/word/word.trackedchange#word-word-trackedchange-getnextornullobject-member(1))|Gets the next tracked change.| -||[getRange(rangeLocation?: Word.RangeLocation.whole \| Word.RangeLocation.start \| Word.RangeLocation.end \| "Whole" \| "Start" \| "End")](/javascript/api/word/word.trackedchange#word-word-trackedchange-getrange-member(1))|Gets the range of the tracked change.| -||[reject()](/javascript/api/word/word.trackedchange#word-word-trackedchange-reject-member(1))|Rejects the tracked change.| -||[text](/javascript/api/word/word.trackedchange#word-word-trackedchange-text-member)|Gets the text of the tracked change.| -||[type](/javascript/api/word/word.trackedchange#word-word-trackedchange-type-member)|Gets the type of the tracked change.| -|[TrackedChangeCollection](/javascript/api/word/word.trackedchangecollection)|[acceptAll()](/javascript/api/word/word.trackedchangecollection#word-word-trackedchangecollection-acceptall-member(1))|Accepts all the tracked changes in the collection.| -||[getFirst()](/javascript/api/word/word.trackedchangecollection#word-word-trackedchangecollection-getfirst-member(1))|Gets the first TrackedChange in this collection.| -||[getFirstOrNullObject()](/javascript/api/word/word.trackedchangecollection#word-word-trackedchangecollection-getfirstornullobject-member(1))|Gets the first TrackedChange in this collection.| -||[items](/javascript/api/word/word.trackedchangecollection#word-word-trackedchangecollection-items-member)|Gets the loaded child items in this collection.| -||[rejectAll()](/javascript/api/word/word.trackedchangecollection#word-word-trackedchangecollection-rejectall-member(1))|Rejects all the tracked changes in the collection.| +[!INCLUDE[API table](../../includes/word-1_6.md)] ## See also diff --git a/docs/requirement-sets/word/word-api-1-9-requirement-set.md b/docs/requirement-sets/word/word-api-1-9-requirement-set.md new file mode 100644 index 0000000000..f7f5406795 --- /dev/null +++ b/docs/requirement-sets/word/word-api-1-9-requirement-set.md @@ -0,0 +1,22 @@ +--- +title: Word JavaScript API requirement set 1.9 +description: Details about the WordApi 1.9 requirement set. +ms.date: 11/18/2024 +ms.topic: whats-new +ms.localizationpriority: medium +--- + +# What's new in Word JavaScript API 1.9 + +WordApi 1.9 mainly included support for additional types of content controls. This improves the quality of data entry by having the user choose from a valid set of options. + +## API list + +The following table lists the APIs in Word JavaScript API requirement set 1.9. To view API reference documentation for all APIs supported by Word JavaScript API requirement set 1.9 or earlier, see [Word APIs in requirement set 1.9 or earlier](/javascript/api/word?view=word-js-1.9&preserve-view=true). + +[!INCLUDE[API table](../../includes/word-1_9.md)] + +## See also + +- [Word JavaScript API Reference Documentation](/javascript/api/word) +- [Word JavaScript API requirement sets](word-api-requirement-sets.md) diff --git a/docs/requirement-sets/word/word-api-requirement-sets.md b/docs/requirement-sets/word/word-api-requirement-sets.md index b6ad0daf30..5efa546cbe 100644 --- a/docs/requirement-sets/word/word-api-requirement-sets.md +++ b/docs/requirement-sets/word/word-api-requirement-sets.md @@ -1,7 +1,7 @@ --- title: Word JavaScript API requirement sets description: Office Add-in requirement set information for Word. -ms.date: 10/18/2024 +ms.date: 11/18/2024 ms.topic: overview ms.localizationpriority: high --- @@ -27,6 +27,7 @@ Word add-ins run across multiple versions of Office, including Office 2016 or la | [WordApiHiddenDocument 1.5](word-api-1.5-hidden-document-requirement-set.md) (Desktop only) | Not applicable | Version 2302 (Build 16130.20332) | Office 2024: Version 2302 (Build 16130.20332) | Version 16.70 (23021201) | Not applicable | | [WordApiHiddenDocument 1.4](word-api-1.4-hidden-document-requirement-set.md) (Desktop only) | Not applicable | Version 2208 (Build 15601.20148) | Office 2024: Version 2208 (Build 15601.20148) | Version 16.64 (22081401) | Not applicable | | [WordApiHiddenDocument 1.3](word-api-1.3-hidden-document-requirement-set.md) (Desktop only) | Not applicable | Version 1612 (Build 7668.1000) | Office 2019: Version 1612 (Build 7668.1000) | Version 15.32 (17030901) | Not applicable | +| [WordApi 1.9](word-api-1-9-requirement-set.md) | Supported | Coming soon | Not available | Coming soon | Coming soon | | [WordApi 1.8](word-api-1-8-requirement-set.md) | Supported | Version 2405 (Build 17628.20110) | Office 2024: Version 2405 (Build 17628.20110) | Version 16.85 (24051214) | Version 16.85 | | [WordApi 1.7](word-api-1-7-requirement-set.md) | Supported | Version 2311 (Build 17029.20068) | Office 2024: Version 2311 (Build 17029.20068) | Version 16.79 (23111019) | Version 16.79 | | [WordApi 1.6](word-api-1-6-requirement-set.md) | Supported | Version 2308 (Build 16731.20234) | Office 2024: Version 2308 (Build 16731.20234) | Version 16.76 (23081101) | Version 16.76 | diff --git a/docs/requirement-sets/word/word-preview-apis.md b/docs/requirement-sets/word/word-preview-apis.md index 10c0141e42..4dd48f07e7 100644 --- a/docs/requirement-sets/word/word-preview-apis.md +++ b/docs/requirement-sets/word/word-preview-apis.md @@ -1,7 +1,7 @@ --- title: Word JavaScript preview APIs description: Details about upcoming Word JavaScript APIs. -ms.date: 10/15/2024 +ms.date: 11/18/2024 ms.topic: whats-new ms.localizationpriority: medium --- @@ -26,29 +26,10 @@ The following table lists the Word JavaScript APIs currently in preview, except | Class | Fields | Description | |:---|:---|:---| -|[Body](/javascript/api/word/word.body)|[insertContentControl(contentControlType?: Word.ContentControlType.richText \| Word.ContentControlType.plainText \| Word.ContentControlType.checkBox \| Word.ContentControlType.dropDownList \| Word.ContentControlType.comboBox \| "RichText" \| "PlainText" \| "CheckBox" \| "DropDownList" \| "ComboBox")](/javascript/api/word/word.body#word-word-body-insertcontentcontrol-member(1))|Wraps the Body object with a content control.| -|[ComboBoxContentControl](/javascript/api/word/word.comboboxcontentcontrol)|[addListItem(displayText: string, value?: string, index?: number)](/javascript/api/word/word.comboboxcontentcontrol#word-word-comboboxcontentcontrol-addlistitem-member(1))|Adds a new list item to this combo box content control and returns a Word.ContentControlListItem object.| -||[deleteAllListItems()](/javascript/api/word/word.comboboxcontentcontrol#word-word-comboboxcontentcontrol-deletealllistitems-member(1))|Deletes all list items in this combo box content control.| -||[listItems](/javascript/api/word/word.comboboxcontentcontrol#word-word-comboboxcontentcontrol-listitems-member)|Gets the collection of list items in the combo box content control.| -|[ContentControl](/javascript/api/word/word.contentcontrol)|[comboBoxContentControl](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-comboboxcontentcontrol-member)|Specifies the combo box-related data if the content control's type is 'ComboBox'.| -||[dropDownListContentControl](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-dropdownlistcontentcontrol-member)|Specifies the dropdown list-related data if the content control's type is 'DropDownList'.| -||[resetState()](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-resetstate-member(1))|Resets the state of the content control.| +|[ContentControl](/javascript/api/word/word.contentcontrol)|[resetState()](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-resetstate-member(1))|Resets the state of the content control.| ||[setState(contentControlState: Word.ContentControlState)](/javascript/api/word/word.contentcontrol#word-word-contentcontrol-setstate-member(1))|Sets the state of the content control.| -|[ContentControlListItem](/javascript/api/word/word.contentcontrollistitem)|[delete()](/javascript/api/word/word.contentcontrollistitem#word-word-contentcontrollistitem-delete-member(1))|Deletes the list item.| -||[displayText](/javascript/api/word/word.contentcontrollistitem#word-word-contentcontrollistitem-displaytext-member)|Specifies the display text of a list item for a dropdown list or combo box content control.| -||[index](/javascript/api/word/word.contentcontrollistitem#word-word-contentcontrollistitem-index-member)|Specifies the index location of a content control list item in the collection of list items.| -||[select()](/javascript/api/word/word.contentcontrollistitem#word-word-contentcontrollistitem-select-member(1))|Selects the list item and sets the text of the content control to the value of the list item.| -||[value](/javascript/api/word/word.contentcontrollistitem#word-word-contentcontrollistitem-value-member)|Specifies the programmatic value of a list item for a dropdown list or combo box content control.| -|[ContentControlListItemCollection](/javascript/api/word/word.contentcontrollistitemcollection)|[getFirst()](/javascript/api/word/word.contentcontrollistitemcollection#word-word-contentcontrollistitemcollection-getfirst-member(1))|Gets the first list item in this collection.| -||[getFirstOrNullObject()](/javascript/api/word/word.contentcontrollistitemcollection#word-word-contentcontrollistitemcollection-getfirstornullobject-member(1))|Gets the first list item in this collection.| -||[items](/javascript/api/word/word.contentcontrollistitemcollection#word-word-contentcontrollistitemcollection-items-member)|Gets the loaded child items in this collection.| |[Document](/javascript/api/word/word.document)|[compareFromBase64(base64File: string, documentCompareOptions?: Word.DocumentCompareOptions)](/javascript/api/word/word.document#word-word-document-comparefrombase64-member(1))|Displays revision marks that indicate where the specified document differs from another document.| -|[DropDownListContentControl](/javascript/api/word/word.dropdownlistcontentcontrol)|[addListItem(displayText: string, value?: string, index?: number)](/javascript/api/word/word.dropdownlistcontentcontrol#word-word-dropdownlistcontentcontrol-addlistitem-member(1))|Adds a new list item to this dropdown list content control and returns a Word.ContentControlListItem object.| -||[deleteAllListItems()](/javascript/api/word/word.dropdownlistcontentcontrol#word-word-dropdownlistcontentcontrol-deletealllistitems-member(1))|Deletes all list items in this dropdown list content control.| -||[listItems](/javascript/api/word/word.dropdownlistcontentcontrol#word-word-dropdownlistcontentcontrol-listitems-member)|Gets the collection of list items in the dropdown list content control.| |[Font](/javascript/api/word/word.font)|[hidden](/javascript/api/word/word.font#word-word-font-hidden-member)|Specifies a value that indicates whether the font is tagged as hidden.| -|[Paragraph](/javascript/api/word/word.paragraph)|[insertContentControl(contentControlType?: Word.ContentControlType.richText \| Word.ContentControlType.plainText \| Word.ContentControlType.checkBox \| Word.ContentControlType.dropDownList \| Word.ContentControlType.comboBox \| "RichText" \| "PlainText" \| "CheckBox" \| "DropDownList" \| "ComboBox")](/javascript/api/word/word.paragraph#word-word-paragraph-insertcontentcontrol-member(1))|Wraps the Paragraph object with a content control.| -|[Range](/javascript/api/word/word.range)|[insertContentControl(contentControlType?: Word.ContentControlType.richText \| Word.ContentControlType.plainText \| Word.ContentControlType.checkBox \| Word.ContentControlType.dropDownList \| Word.ContentControlType.comboBox \| "RichText" \| "PlainText" \| "CheckBox" \| "DropDownList" \| "ComboBox")](/javascript/api/word/word.range#word-word-range-insertcontentcontrol-member(1))|Wraps the Range object with a content control.| |[Style](/javascript/api/word/word.style)|[description](/javascript/api/word/word.style#word-word-style-description-member)|Gets the description of the specified style.| ## Web-only API list diff --git a/generate-docs/API Coverage Report.csv b/generate-docs/API Coverage Report.csv index f81d563a54..2665b84182 100644 --- a/generate-docs/API Coverage Report.csv +++ b/generate-docs/API Coverage Report.csv @@ -11341,7 +11341,8 @@ Word.Document,"getFootnoteBody()",Method,Poor,false Word.Document,"getParagraphByUniqueLocalId(id)",Method,Poor,true Word.Document,"getSelection()",Method,Poor,true Word.Document,"getStyles()",Method,Poor,true -Word.Document,"importStylesFromJson(stylesJson)",Method,Poor,true +Word.Document,"importStylesFromJson(stylesJson, importedStylesConflictBehavior)",Method,Fine,true +Word.Document,"importStylesFromJson(stylesJson, importedStylesConflictBehaviorString)",Method,Fine,false Word.Document,"insertFileFromBase64(base64File, insertLocation, insertFileOptions)",Method,Fine,true Word.Document,"load(options)",Method,Fine,true Word.Document,"load(propertyNames)",Method,Poor,false @@ -11647,6 +11648,10 @@ Word.ImageFormat,"tiff",EnumField,Fine,false Word.ImageFormat,"undefined",EnumField,Fine,false Word.ImageFormat,"unsupported",EnumField,Fine,false Word.ImageFormat,"wmf",EnumField,Fine,false +Word.ImportedStylesConflictBehavior,N/A,Enum,Good,false +Word.ImportedStylesConflictBehavior,"createNew",EnumField,Good,false +Word.ImportedStylesConflictBehavior,"ignore",EnumField,Fine,false +Word.ImportedStylesConflictBehavior,"overwrite",EnumField,Fine,false Word.InlinePicture,N/A,Class,Good,true Word.InlinePicture,"altTextDescription",Property,Good,false Word.InlinePicture,"altTextTitle",Property,Good,false diff --git a/generate-docs/GenerateDocs.sh b/generate-docs/GenerateDocs.sh index 1eb2009177..f9a68ffce6 100644 --- a/generate-docs/GenerateDocs.sh +++ b/generate-docs/GenerateDocs.sh @@ -104,20 +104,22 @@ node version-remover ../api-extractor-inputs-powerpoint-release/powerpoint_1_3/p node version-remover ../api-extractor-inputs-powerpoint-release/powerpoint_1_2/powerpoint.d.ts "PowerPointApi 1.2" ../api-extractor-inputs-powerpoint-release/powerpoint_1_1/powerpoint.d.ts node version-remover ../api-extractor-inputs-powerpoint-release/powerpoint_1_1/powerpoint.d.ts "PowerPointApi 1.1" ./tool-inputs/powerpoint-base.d.ts -node version-remover ../api-extractor-inputs-word-release/word_online/word-init.d.ts "WordApiOnline 1.1" ../api-extractor-inputs-word-release/word_desktop_1_1/word.d.ts +node version-remover ../api-extractor-inputs-word-release/word_online/word-init.d.ts "WordApiOnline 1.1" ../api-extractor-inputs-word-release/word_desktop_1_1/word-desktop1.d.ts +node version-remover ../api-extractor-inputs-word-release/word_desktop_1_1/word-desktop1.d.ts "WordApi 1.9" ../api-extractor-inputs-word-release/word_desktop_1_1/word.d.ts node version-remover ../api-extractor-inputs-word-release/word_online/word-init.d.ts "WordApiDesktop 1.1" ../api-extractor-inputs-word-release/word_online/word-online1.d.ts node version-remover ../api-extractor-inputs-word-release/word_online/word-online1.d.ts "WordApiHiddenDocument 1.5" ../api-extractor-inputs-word-release/word_online/word-online2.d.ts node version-remover ../api-extractor-inputs-word-release/word_online/word-online2.d.ts "WordApiHiddenDocument 1.4" ../api-extractor-inputs-word-release/word_online/word-online3.d.ts node version-remover ../api-extractor-inputs-word-release/word_online/word-online3.d.ts "WordApiHiddenDocument 1.3" ../api-extractor-inputs-word-release/word_online/word.d.ts -node version-remover ../api-extractor-inputs-word-release/word_desktop_1_1/word.d.ts "WordApiDesktop 1.1" ../api-extractor-inputs-word-release/word_desktop_1_1/word-desktop1.d.ts -node version-remover ../api-extractor-inputs-word-release/word_desktop_1_1/word-desktop1.d.ts "WordApi 1.8" ../api-extractor-inputs-word-release/word_desktop_1_1/word-desktop2.d.ts -node version-remover ../api-extractor-inputs-word-release/word_desktop_1_1/word-desktop2.d.ts "WordApi 1.7" ../api-extractor-inputs-word-release/word_desktop_1_1/word-desktop3.d.ts -node version-remover ../api-extractor-inputs-word-release/word_desktop_1_1/word-desktop3.d.ts "WordApi 1.6" ../api-extractor-inputs-word-release/word_1_5_hidden_document/word.d.ts +node version-remover ../api-extractor-inputs-word-release/word_desktop_1_1/word.d.ts "WordApiDesktop 1.1" ../api-extractor-inputs-word-release/word_desktop_1_1/word-desktop2.d.ts +node version-remover ../api-extractor-inputs-word-release/word_desktop_1_1/word-desktop2.d.ts "WordApi 1.8" ../api-extractor-inputs-word-release/word_desktop_1_1/word-desktop3.d.ts +node version-remover ../api-extractor-inputs-word-release/word_desktop_1_1/word-desktop3.d.ts "WordApi 1.7" ../api-extractor-inputs-word-release/word_desktop_1_1/word-desktop4.d.ts +node version-remover ../api-extractor-inputs-word-release/word_desktop_1_1/word-desktop4.d.ts "WordApi 1.6" ../api-extractor-inputs-word-release/word_1_5_hidden_document/word.d.ts node version-remover ../api-extractor-inputs-word-release/word_1_5_hidden_document/word.d.ts "WordApiHiddenDocument 1.5" ../api-extractor-inputs-word-release/word_1_4_hidden_document/word-desktop1.d.ts node version-remover ../api-extractor-inputs-word-release/word_1_4_hidden_document/word-desktop1.d.ts "WordApi 1.5" ../api-extractor-inputs-word-release/word_1_4_hidden_document/word.d.ts node version-remover ../api-extractor-inputs-word-release/word_1_4_hidden_document/word.d.ts "WordApiHiddenDocument 1.4" ../api-extractor-inputs-word-release/word_1_3_hidden_document/word-desktop1.d.ts node version-remover ../api-extractor-inputs-word-release/word_1_3_hidden_document/word-desktop1.d.ts "WordApi 1.4" ../api-extractor-inputs-word-release/word_1_3_hidden_document/word.d.ts -node version-remover ../api-extractor-inputs-word-release/word_online/word.d.ts "WordApiOnline 1.1" ../api-extractor-inputs-word-release/word_1_8/word.d.ts +node version-remover ../api-extractor-inputs-word-release/word_online/word.d.ts "WordApiOnline 1.1" ../api-extractor-inputs-word-release/word_1_9/word.d.ts +node version-remover ../api-extractor-inputs-word-release/word_1_9/word.d.ts "WordApi 1.9" ../api-extractor-inputs-word-release/word_1_8/word.d.ts node version-remover ../api-extractor-inputs-word-release/word_1_8/word.d.ts "WordApi 1.8" ../api-extractor-inputs-word-release/word_1_7/word.d.ts node version-remover ../api-extractor-inputs-word-release/word_1_7/word.d.ts "WordApi 1.7" ../api-extractor-inputs-word-release/word_1_6/word.d.ts node version-remover ../api-extractor-inputs-word-release/word_1_6/word.d.ts "WordApi 1.6" ../api-extractor-inputs-word-release/word_1_5/word.d.ts @@ -173,11 +175,12 @@ node whats-new powerpoint ../api-extractor-inputs-powerpoint-release/powerpoint_ node whats-new powerpoint ../api-extractor-inputs-powerpoint-release/powerpoint_1_1/powerpoint.d.ts ./tool-inputs/powerpoint-base.d.ts ../../docs/includes/powerpoint-1_1 node whats-new word ../api-extractor-inputs-word/word.d.ts ../api-extractor-inputs-word-release/word_online/word-init.d.ts ../../docs/includes/word-preview -node whats-new word ../api-extractor-inputs-word-release/word_online/word.d.ts ../api-extractor-inputs-word-release/word_1_8/word.d.ts ../../docs/includes/word-online -node whats-new word ../api-extractor-inputs-word-release/word_desktop_1_1/word.d.ts ../api-extractor-inputs-word-release/word_desktop_1_1/word-desktop1.d.ts ../../docs/includes/word-desktop-1.1 +node whats-new word ../api-extractor-inputs-word-release/word_online/word.d.ts ../api-extractor-inputs-word-release/word_1_9/word.d.ts ../../docs/includes/word-online +node whats-new word ../api-extractor-inputs-word-release/word_desktop_1_1/word.d.ts ../api-extractor-inputs-word-release/word_desktop_1_1/word-desktop2.d.ts ../../docs/includes/word-desktop-1.1 node whats-new word ../api-extractor-inputs-word-release/word_1_5_hidden_document/word.d.ts ../api-extractor-inputs-word-release/word_1_4_hidden_document/word-desktop1.d.ts ../../docs/includes/word-1_5_hidden_document node whats-new word ../api-extractor-inputs-word-release/word_1_4_hidden_document/word.d.ts ../api-extractor-inputs-word-release/word_1_3_hidden_document/word-desktop1.d.ts ../../docs/includes/word-1_4_hidden_document node whats-new word ../api-extractor-inputs-word-release/word_1_3_hidden_document/word.d.ts ../api-extractor-inputs-word-release/word_1_3/word.d.ts ../../docs/includes/word-1_3_hidden_document +node whats-new word ../api-extractor-inputs-word-release/word_1_9/word.d.ts ../api-extractor-inputs-word-release/word_1_8/word.d.ts ../../docs/includes/word-1_9 node whats-new word ../api-extractor-inputs-word-release/word_1_8/word.d.ts ../api-extractor-inputs-word-release/word_1_7/word.d.ts ../../docs/includes/word-1_8 node whats-new word ../api-extractor-inputs-word-release/word_1_7/word.d.ts ../api-extractor-inputs-word-release/word_1_6/word.d.ts ../../docs/includes/word-1_7 node whats-new word ../api-extractor-inputs-word-release/word_1_6/word.d.ts ../api-extractor-inputs-word-release/word_1_5/word.d.ts ../../docs/includes/word-1_6 @@ -501,6 +504,12 @@ if [ ! -d "json/word_1_3_hidden_document" ]; then ../../node_modules/.bin/api-extractor run popd fi +if [ ! -d "json/word_1_9" ]; then + echo Running API Extractor for Word 1.9. + pushd api-extractor-inputs-word-release/word_1_9 + ../../node_modules/.bin/api-extractor run + popd +fi if [ ! -d "json/word_1_8" ]; then echo Running API Extractor for Word 1.8. pushd api-extractor-inputs-word-release/word_1_8 @@ -732,6 +741,9 @@ fi if [ ! -d "yaml/word_1_8" ]; then ./node_modules/.bin/api-documenter yaml --input-folder ./json/word_1_8 --output-folder ./yaml/word_1_8 --office 2>/dev/null fi +if [ ! -d "yaml/word_1_9" ]; then + ./node_modules/.bin/api-documenter yaml --input-folder ./json/word_1_9 --output-folder ./yaml/word_1_9 --office 2>/dev/null +fi if [ ! -d "yaml/word_1_3_hidden_document" ]; then ./node_modules/.bin/api-documenter yaml --input-folder ./json/word_1_3_hidden_document --output-folder ./yaml/word_1_3_hidden_document --office 2>/dev/null fi diff --git a/generate-docs/api-extractor-inputs-word-release/word_1_1/word.d.ts b/generate-docs/api-extractor-inputs-word-release/word_1_1/word.d.ts index 2d461cb346..78d83ae171 100644 --- a/generate-docs/api-extractor-inputs-word-release/word_1_1/word.d.ts +++ b/generate-docs/api-extractor-inputs-word-release/word_1_1/word.d.ts @@ -143,10 +143,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the body at the specified location. * @@ -290,6 +291,7 @@ export declare namespace Word { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; + /** * Gets the collection of content control objects in the content control. * @@ -299,6 +301,7 @@ export declare namespace Word { readonly contentControls: Word.ContentControlCollection; + /** * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. * @@ -700,6 +703,8 @@ export declare namespace Word { + + /** * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. * @@ -772,6 +777,7 @@ export declare namespace Word { + /** * Saves the document. * @@ -844,6 +850,8 @@ export declare namespace Word { + + /** * Represents a font. * @@ -1368,10 +1376,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the paragraph at the specified location. * @@ -1694,10 +1703,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; @@ -2631,6 +2641,7 @@ export declare namespace Word { + enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", @@ -2805,6 +2816,16 @@ export declare namespace Word { export interface ContentControlCollectionUpdateData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ + export interface ContentControlListItemUpdateData { + + + + } + /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ + export interface ContentControlListItemCollectionUpdateData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ export interface CustomPropertyUpdateData { @@ -3454,6 +3475,7 @@ export declare namespace Word { /** An interface describing the data returned by calling `contentControl.toJSON()`. */ export interface ContentControlData { + /** * Gets the collection of content control objects in the content control. * @@ -3462,6 +3484,7 @@ export declare namespace Word { */ contentControls?: Word.Interfaces.ContentControlData[]; + /** * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. * @@ -3578,6 +3601,16 @@ export declare namespace Word { export interface ContentControlCollectionData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ + export interface ContentControlListItemData { + + + + } + /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ + export interface ContentControlListItemCollectionData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface describing the data returned by calling `customProperty.toJSON()`. */ export interface CustomPropertyData { @@ -3666,6 +3699,12 @@ export declare namespace Word { + } + /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ + export interface DropDownListContentControlData { + } + /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ + export interface ComboBoxContentControlData { } /** An interface describing the data returned by calling `field.toJSON()`. */ export interface FieldData { @@ -4519,6 +4558,8 @@ export declare namespace Word { + + /** * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. * diff --git a/generate-docs/api-extractor-inputs-word-release/word_1_2/word.d.ts b/generate-docs/api-extractor-inputs-word-release/word_1_2/word.d.ts index c786ba6e35..a29b42d6a2 100644 --- a/generate-docs/api-extractor-inputs-word-release/word_1_2/word.d.ts +++ b/generate-docs/api-extractor-inputs-word-release/word_1_2/word.d.ts @@ -143,10 +143,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the body at the specified location. * @@ -299,6 +300,7 @@ export declare namespace Word { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; + /** * Gets the collection of content control objects in the content control. * @@ -308,6 +310,7 @@ export declare namespace Word { readonly contentControls: Word.ContentControlCollection; + /** * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. * @@ -718,6 +721,8 @@ export declare namespace Word { + + /** * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. * @@ -790,6 +795,7 @@ export declare namespace Word { + /** * Saves the document. * @@ -862,6 +868,8 @@ export declare namespace Word { + + /** * Represents a font. * @@ -1479,10 +1487,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the paragraph at the specified location. * @@ -1811,10 +1820,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; @@ -2757,6 +2767,7 @@ export declare namespace Word { + enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", @@ -2931,6 +2942,16 @@ export declare namespace Word { export interface ContentControlCollectionUpdateData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ + export interface ContentControlListItemUpdateData { + + + + } + /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ + export interface ContentControlListItemCollectionUpdateData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ export interface CustomPropertyUpdateData { @@ -3580,6 +3601,7 @@ export declare namespace Word { /** An interface describing the data returned by calling `contentControl.toJSON()`. */ export interface ContentControlData { + /** * Gets the collection of content control objects in the content control. * @@ -3588,6 +3610,7 @@ export declare namespace Word { */ contentControls?: Word.Interfaces.ContentControlData[]; + /** * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. * @@ -3704,6 +3727,16 @@ export declare namespace Word { export interface ContentControlCollectionData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ + export interface ContentControlListItemData { + + + + } + /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ + export interface ContentControlListItemCollectionData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface describing the data returned by calling `customProperty.toJSON()`. */ export interface CustomPropertyData { @@ -3792,6 +3825,12 @@ export declare namespace Word { + } + /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ + export interface DropDownListContentControlData { + } + /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ + export interface ComboBoxContentControlData { } /** An interface describing the data returned by calling `field.toJSON()`. */ export interface FieldData { @@ -4651,6 +4690,8 @@ export declare namespace Word { + + /** * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. * diff --git a/generate-docs/api-extractor-inputs-word-release/word_1_3/word.d.ts b/generate-docs/api-extractor-inputs-word-release/word_1_3/word.d.ts index eadf6397be..afece432b3 100644 --- a/generate-docs/api-extractor-inputs-word-release/word_1_3/word.d.ts +++ b/generate-docs/api-extractor-inputs-word-release/word_1_3/word.d.ts @@ -236,10 +236,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the body at the specified location. * @@ -403,6 +404,7 @@ export declare namespace Word { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; + /** * Gets the collection of content control objects in the content control. * @@ -412,6 +414,7 @@ export declare namespace Word { readonly contentControls: Word.ContentControlCollection; + /** * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. * @@ -944,6 +947,8 @@ export declare namespace Word { toJSON(): Word.Interfaces.ContentControlCollectionData; } + + /** * Represents a custom property. * @@ -1190,6 +1195,7 @@ export declare namespace Word { + /** * Saves the document. * @@ -1514,6 +1520,8 @@ export declare namespace Word { } + + /** * Represents a font. * @@ -2705,10 +2713,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the paragraph at the specified location. * @@ -3219,10 +3228,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; @@ -6824,6 +6834,7 @@ export declare namespace Word { + enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", @@ -7010,6 +7021,16 @@ export declare namespace Word { export interface ContentControlCollectionUpdateData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ + export interface ContentControlListItemUpdateData { + + + + } + /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ + export interface ContentControlListItemCollectionUpdateData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ export interface CustomPropertyUpdateData { /** @@ -7965,6 +7986,7 @@ export declare namespace Word { /** An interface describing the data returned by calling `contentControl.toJSON()`. */ export interface ContentControlData { + /** * Gets the collection of content control objects in the content control. * @@ -7973,6 +7995,7 @@ export declare namespace Word { */ contentControls?: Word.Interfaces.ContentControlData[]; + /** * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. * @@ -8113,6 +8136,16 @@ export declare namespace Word { export interface ContentControlCollectionData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ + export interface ContentControlListItemData { + + + + } + /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ + export interface ContentControlListItemCollectionData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface describing the data returned by calling `customProperty.toJSON()`. */ export interface CustomPropertyData { /** @@ -8334,6 +8367,12 @@ export declare namespace Word { */ title?: string; } + /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ + export interface DropDownListContentControlData { + } + /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ + export interface ComboBoxContentControlData { + } /** An interface describing the data returned by calling `field.toJSON()`. */ export interface FieldData { @@ -9673,6 +9712,8 @@ export declare namespace Word { */ type?: boolean; } + + /** * Represents a custom property. * diff --git a/generate-docs/api-extractor-inputs-word-release/word_1_3_hidden_document/word-desktop1.d.ts b/generate-docs/api-extractor-inputs-word-release/word_1_3_hidden_document/word-desktop1.d.ts index a26dfcfcd5..de19959518 100644 --- a/generate-docs/api-extractor-inputs-word-release/word_1_3_hidden_document/word-desktop1.d.ts +++ b/generate-docs/api-extractor-inputs-word-release/word_1_3_hidden_document/word-desktop1.d.ts @@ -264,10 +264,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the body at the specified location. * @@ -888,6 +889,7 @@ export declare namespace Word { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; + /** * Gets the collection of content control objects in the content control. * @@ -896,6 +898,7 @@ export declare namespace Word { */ readonly contentControls: Word.ContentControlCollection; + /** * Gets the collection of field objects in the content control. * @@ -1457,6 +1460,8 @@ export declare namespace Word { toJSON(): Word.Interfaces.ContentControlCollectionData; } + + /** * Represents a custom property. * @@ -2189,6 +2194,7 @@ export declare namespace Word { + /** * Saves the document. * @@ -2563,6 +2569,8 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.DocumentPropertiesData; } + + /** * Represents a field. * @@ -3992,10 +4000,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the paragraph at the specified location. * @@ -4563,10 +4572,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; @@ -8404,6 +8414,7 @@ export declare namespace Word { + enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", @@ -8656,6 +8667,16 @@ export declare namespace Word { export interface ContentControlCollectionUpdateData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ + export interface ContentControlListItemUpdateData { + + + + } + /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ + export interface ContentControlListItemCollectionUpdateData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ export interface CustomPropertyUpdateData { /** @@ -9787,6 +9808,7 @@ export declare namespace Word { /** An interface describing the data returned by calling `contentControl.toJSON()`. */ export interface ContentControlData { + /** * Gets the collection of content control objects in the content control. * @@ -9794,6 +9816,7 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ contentControls?: Word.Interfaces.ContentControlData[]; + /** * Gets the collection of field objects in the content control. * @@ -9941,6 +9964,16 @@ export declare namespace Word { export interface ContentControlCollectionData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ + export interface ContentControlListItemData { + + + + } + /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ + export interface ContentControlListItemCollectionData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface describing the data returned by calling `customProperty.toJSON()`. */ export interface CustomPropertyData { /** @@ -10222,6 +10255,12 @@ export declare namespace Word { */ title?: string; } + /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ + export interface DropDownListContentControlData { + } + /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ + export interface ComboBoxContentControlData { + } /** An interface describing the data returned by calling `field.toJSON()`. */ export interface FieldData { /** @@ -11909,6 +11948,8 @@ export declare namespace Word { */ type?: boolean; } + + /** * Represents a custom property. * diff --git a/generate-docs/api-extractor-inputs-word-release/word_1_3_hidden_document/word.d.ts b/generate-docs/api-extractor-inputs-word-release/word_1_3_hidden_document/word.d.ts index 3489574903..074f3ea797 100644 --- a/generate-docs/api-extractor-inputs-word-release/word_1_3_hidden_document/word.d.ts +++ b/generate-docs/api-extractor-inputs-word-release/word_1_3_hidden_document/word.d.ts @@ -236,10 +236,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the body at the specified location. * @@ -403,6 +404,7 @@ export declare namespace Word { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; + /** * Gets the collection of content control objects in the content control. * @@ -412,6 +414,7 @@ export declare namespace Word { readonly contentControls: Word.ContentControlCollection; + /** * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. * @@ -944,6 +947,8 @@ export declare namespace Word { toJSON(): Word.Interfaces.ContentControlCollectionData; } + + /** * Represents a custom property. * @@ -1190,6 +1195,7 @@ export declare namespace Word { + /** * Saves the document. * @@ -1566,6 +1572,8 @@ export declare namespace Word { } + + /** * Represents a font. * @@ -2757,10 +2765,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the paragraph at the specified location. * @@ -3271,10 +3280,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; @@ -6876,6 +6886,7 @@ export declare namespace Word { + enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", @@ -7062,6 +7073,16 @@ export declare namespace Word { export interface ContentControlCollectionUpdateData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ + export interface ContentControlListItemUpdateData { + + + + } + /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ + export interface ContentControlListItemCollectionUpdateData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ export interface CustomPropertyUpdateData { /** @@ -8029,6 +8050,7 @@ export declare namespace Word { /** An interface describing the data returned by calling `contentControl.toJSON()`. */ export interface ContentControlData { + /** * Gets the collection of content control objects in the content control. * @@ -8037,6 +8059,7 @@ export declare namespace Word { */ contentControls?: Word.Interfaces.ContentControlData[]; + /** * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. * @@ -8177,6 +8200,16 @@ export declare namespace Word { export interface ContentControlCollectionData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ + export interface ContentControlListItemData { + + + + } + /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ + export interface ContentControlListItemCollectionData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface describing the data returned by calling `customProperty.toJSON()`. */ export interface CustomPropertyData { /** @@ -8428,6 +8461,12 @@ export declare namespace Word { */ title?: string; } + /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ + export interface DropDownListContentControlData { + } + /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ + export interface ComboBoxContentControlData { + } /** An interface describing the data returned by calling `field.toJSON()`. */ export interface FieldData { @@ -9767,6 +9806,8 @@ export declare namespace Word { */ type?: boolean; } + + /** * Represents a custom property. * diff --git a/generate-docs/api-extractor-inputs-word-release/word_1_4/word.d.ts b/generate-docs/api-extractor-inputs-word-release/word_1_4/word.d.ts index 8ab0f0e8f3..a9ee82e8ab 100644 --- a/generate-docs/api-extractor-inputs-word-release/word_1_4/word.d.ts +++ b/generate-docs/api-extractor-inputs-word-release/word_1_4/word.d.ts @@ -264,10 +264,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the body at the specified location. * @@ -888,6 +889,7 @@ export declare namespace Word { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; + /** * Gets the collection of content control objects in the content control. * @@ -896,6 +898,7 @@ export declare namespace Word { */ readonly contentControls: Word.ContentControlCollection; + /** * Gets the collection of field objects in the content control. * @@ -1457,6 +1460,8 @@ export declare namespace Word { toJSON(): Word.Interfaces.ContentControlCollectionData; } + + /** * Represents a custom property. * @@ -2189,6 +2194,7 @@ export declare namespace Word { + /** * Saves the document. * @@ -2511,6 +2517,8 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.DocumentPropertiesData; } + + /** * Represents a field. * @@ -3940,10 +3948,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the paragraph at the specified location. * @@ -4511,10 +4520,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; @@ -8352,6 +8362,7 @@ export declare namespace Word { + enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", @@ -8604,6 +8615,16 @@ export declare namespace Word { export interface ContentControlCollectionUpdateData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ + export interface ContentControlListItemUpdateData { + + + + } + /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ + export interface ContentControlListItemCollectionUpdateData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ export interface CustomPropertyUpdateData { /** @@ -9723,6 +9744,7 @@ export declare namespace Word { /** An interface describing the data returned by calling `contentControl.toJSON()`. */ export interface ContentControlData { + /** * Gets the collection of content control objects in the content control. * @@ -9730,6 +9752,7 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ contentControls?: Word.Interfaces.ContentControlData[]; + /** * Gets the collection of field objects in the content control. * @@ -9877,6 +9900,16 @@ export declare namespace Word { export interface ContentControlCollectionData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ + export interface ContentControlListItemData { + + + + } + /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ + export interface ContentControlListItemCollectionData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface describing the data returned by calling `customProperty.toJSON()`. */ export interface CustomPropertyData { /** @@ -10128,6 +10161,12 @@ export declare namespace Word { */ title?: string; } + /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ + export interface DropDownListContentControlData { + } + /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ + export interface ComboBoxContentControlData { + } /** An interface describing the data returned by calling `field.toJSON()`. */ export interface FieldData { /** @@ -11815,6 +11854,8 @@ export declare namespace Word { */ type?: boolean; } + + /** * Represents a custom property. * diff --git a/generate-docs/api-extractor-inputs-word-release/word_1_4_hidden_document/word-desktop1.d.ts b/generate-docs/api-extractor-inputs-word-release/word_1_4_hidden_document/word-desktop1.d.ts index 869745df90..a04a78ba19 100644 --- a/generate-docs/api-extractor-inputs-word-release/word_1_4_hidden_document/word-desktop1.d.ts +++ b/generate-docs/api-extractor-inputs-word-release/word_1_4_hidden_document/word-desktop1.d.ts @@ -296,10 +296,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the body at the specified location. * @@ -920,6 +921,7 @@ export declare namespace Word { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; + /** * Gets the collection of content control objects in the content control. * @@ -927,6 +929,7 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ readonly contentControls: Word.ContentControlCollection; + /** * Gets the collection of endnotes in the content control. * @@ -1560,6 +1563,8 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.ContentControlCollectionData; } + + /** * Specifies the options that define which content controls are returned. * @@ -1568,12 +1573,13 @@ export declare namespace Word { */ export interface ContentControlOptions { /** - * An array of content control types, item must be 'RichText', 'PlainText', or 'CheckBox'. + * An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. * * @remarks * [Api set: WordApi 1.5] * - * Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. + * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9. */ types: Word.ContentControlType[]; } @@ -2376,6 +2382,7 @@ export declare namespace Word { */ getStyles(): Word.StyleCollection; + /** * Inserts a document into the target document at a specific location with additional properties. Headers, footers, watermarks, and other section properties are copied by default. @@ -2808,6 +2815,8 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.DocumentPropertiesData; } + + /** * Represents a field. * @@ -4470,10 +4479,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the paragraph at the specified location. * @@ -5214,10 +5224,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts an endnote. The endnote reference is placed after the range. * @@ -10336,6 +10347,7 @@ export declare namespace Word { + enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", @@ -10588,6 +10600,16 @@ export declare namespace Word { export interface ContentControlCollectionUpdateData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ + export interface ContentControlListItemUpdateData { + + + + } + /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ + export interface ContentControlListItemCollectionUpdateData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ export interface CustomPropertyUpdateData { /** @@ -11879,6 +11901,7 @@ export declare namespace Word { /** An interface describing the data returned by calling `contentControl.toJSON()`. */ export interface ContentControlData { + /** * Gets the collection of content control objects in the content control. * @@ -11886,6 +11909,7 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ contentControls?: Word.Interfaces.ContentControlData[]; + /** * Gets the collection of field objects in the content control. * @@ -12033,6 +12057,16 @@ export declare namespace Word { export interface ContentControlCollectionData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ + export interface ContentControlListItemData { + + + + } + /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ + export interface ContentControlListItemCollectionData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface describing the data returned by calling `customProperty.toJSON()`. */ export interface CustomPropertyData { /** @@ -12326,6 +12360,12 @@ export declare namespace Word { */ title?: string; } + /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ + export interface DropDownListContentControlData { + } + /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ + export interface ComboBoxContentControlData { + } /** An interface describing the data returned by calling `field.toJSON()`. */ export interface FieldData { /** @@ -14221,6 +14261,8 @@ export declare namespace Word { */ type?: boolean; } + + /** * Represents a custom property. * diff --git a/generate-docs/api-extractor-inputs-word-release/word_1_4_hidden_document/word.d.ts b/generate-docs/api-extractor-inputs-word-release/word_1_4_hidden_document/word.d.ts index ab40d5a7b0..bd4c01532c 100644 --- a/generate-docs/api-extractor-inputs-word-release/word_1_4_hidden_document/word.d.ts +++ b/generate-docs/api-extractor-inputs-word-release/word_1_4_hidden_document/word.d.ts @@ -264,10 +264,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the body at the specified location. * @@ -888,6 +889,7 @@ export declare namespace Word { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; + /** * Gets the collection of content control objects in the content control. * @@ -896,6 +898,7 @@ export declare namespace Word { */ readonly contentControls: Word.ContentControlCollection; + /** * Gets the collection of field objects in the content control. * @@ -1457,6 +1460,8 @@ export declare namespace Word { toJSON(): Word.Interfaces.ContentControlCollectionData; } + + /** * Represents a custom property. * @@ -2189,6 +2194,7 @@ export declare namespace Word { + /** * Saves the document. * @@ -2599,6 +2605,8 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.DocumentPropertiesData; } + + /** * Represents a field. * @@ -4028,10 +4036,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the paragraph at the specified location. * @@ -4599,10 +4608,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; @@ -8440,6 +8450,7 @@ export declare namespace Word { + enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", @@ -8692,6 +8703,16 @@ export declare namespace Word { export interface ContentControlCollectionUpdateData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ + export interface ContentControlListItemUpdateData { + + + + } + /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ + export interface ContentControlListItemCollectionUpdateData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ export interface CustomPropertyUpdateData { /** @@ -9823,6 +9844,7 @@ export declare namespace Word { /** An interface describing the data returned by calling `contentControl.toJSON()`. */ export interface ContentControlData { + /** * Gets the collection of content control objects in the content control. * @@ -9830,6 +9852,7 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ contentControls?: Word.Interfaces.ContentControlData[]; + /** * Gets the collection of field objects in the content control. * @@ -9977,6 +10000,16 @@ export declare namespace Word { export interface ContentControlCollectionData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ + export interface ContentControlListItemData { + + + + } + /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ + export interface ContentControlListItemCollectionData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface describing the data returned by calling `customProperty.toJSON()`. */ export interface CustomPropertyData { /** @@ -10270,6 +10303,12 @@ export declare namespace Word { */ title?: string; } + /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ + export interface DropDownListContentControlData { + } + /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ + export interface ComboBoxContentControlData { + } /** An interface describing the data returned by calling `field.toJSON()`. */ export interface FieldData { /** @@ -11957,6 +11996,8 @@ export declare namespace Word { */ type?: boolean; } + + /** * Represents a custom property. * diff --git a/generate-docs/api-extractor-inputs-word-release/word_1_5/word.d.ts b/generate-docs/api-extractor-inputs-word-release/word_1_5/word.d.ts index 88130efd3b..7b6cf5c026 100644 --- a/generate-docs/api-extractor-inputs-word-release/word_1_5/word.d.ts +++ b/generate-docs/api-extractor-inputs-word-release/word_1_5/word.d.ts @@ -296,10 +296,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the body at the specified location. * @@ -920,6 +921,7 @@ export declare namespace Word { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; + /** * Gets the collection of content control objects in the content control. * @@ -927,6 +929,7 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ readonly contentControls: Word.ContentControlCollection; + /** * Gets the collection of endnotes in the content control. * @@ -1560,6 +1563,8 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.ContentControlCollectionData; } + + /** * Specifies the options that define which content controls are returned. * @@ -1568,12 +1573,13 @@ export declare namespace Word { */ export interface ContentControlOptions { /** - * An array of content control types, item must be 'RichText', 'PlainText', or 'CheckBox'. + * An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. * * @remarks * [Api set: WordApi 1.5] * - * Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. + * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9. */ types: Word.ContentControlType[]; } @@ -2376,6 +2382,7 @@ export declare namespace Word { */ getStyles(): Word.StyleCollection; + /** * Inserts a document into the target document at a specific location with additional properties. Headers, footers, watermarks, and other section properties are copied by default. @@ -2720,6 +2727,8 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.DocumentPropertiesData; } + + /** * Represents a field. * @@ -4382,10 +4391,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the paragraph at the specified location. * @@ -5126,10 +5136,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts an endnote. The endnote reference is placed after the range. * @@ -10248,6 +10259,7 @@ export declare namespace Word { + enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", @@ -10500,6 +10512,16 @@ export declare namespace Word { export interface ContentControlCollectionUpdateData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ + export interface ContentControlListItemUpdateData { + + + + } + /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ + export interface ContentControlListItemCollectionUpdateData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ export interface CustomPropertyUpdateData { /** @@ -11779,6 +11801,7 @@ export declare namespace Word { /** An interface describing the data returned by calling `contentControl.toJSON()`. */ export interface ContentControlData { + /** * Gets the collection of content control objects in the content control. * @@ -11786,6 +11809,7 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ contentControls?: Word.Interfaces.ContentControlData[]; + /** * Gets the collection of field objects in the content control. * @@ -11933,6 +11957,16 @@ export declare namespace Word { export interface ContentControlCollectionData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ + export interface ContentControlListItemData { + + + + } + /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ + export interface ContentControlListItemCollectionData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface describing the data returned by calling `customProperty.toJSON()`. */ export interface CustomPropertyData { /** @@ -12184,6 +12218,12 @@ export declare namespace Word { */ title?: string; } + /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ + export interface DropDownListContentControlData { + } + /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ + export interface ComboBoxContentControlData { + } /** An interface describing the data returned by calling `field.toJSON()`. */ export interface FieldData { /** @@ -14079,6 +14119,8 @@ export declare namespace Word { */ type?: boolean; } + + /** * Represents a custom property. * diff --git a/generate-docs/api-extractor-inputs-word-release/word_1_5_hidden_document/word.d.ts b/generate-docs/api-extractor-inputs-word-release/word_1_5_hidden_document/word.d.ts index c51eea04ab..fc343ecf25 100644 --- a/generate-docs/api-extractor-inputs-word-release/word_1_5_hidden_document/word.d.ts +++ b/generate-docs/api-extractor-inputs-word-release/word_1_5_hidden_document/word.d.ts @@ -296,10 +296,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the body at the specified location. * @@ -920,6 +921,7 @@ export declare namespace Word { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; + /** * Gets the collection of content control objects in the content control. * @@ -927,6 +929,7 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ readonly contentControls: Word.ContentControlCollection; + /** * Gets the collection of endnotes in the content control. * @@ -1560,6 +1563,8 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.ContentControlCollectionData; } + + /** * Specifies the options that define which content controls are returned. * @@ -1568,12 +1573,13 @@ export declare namespace Word { */ export interface ContentControlOptions { /** - * An array of content control types, item must be 'RichText', 'PlainText', or 'CheckBox'. + * An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. * * @remarks * [Api set: WordApi 1.5] * - * Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. + * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9. */ types: Word.ContentControlType[]; } @@ -2376,6 +2382,7 @@ export declare namespace Word { */ getStyles(): Word.StyleCollection; + /** * Inserts a document into the target document at a specific location with additional properties. Headers, footers, watermarks, and other section properties are copied by default. @@ -2857,6 +2864,8 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.DocumentPropertiesData; } + + /** * Represents a field. * @@ -4519,10 +4528,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the paragraph at the specified location. * @@ -5263,10 +5273,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts an endnote. The endnote reference is placed after the range. * @@ -10385,6 +10396,7 @@ export declare namespace Word { + enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", @@ -10637,6 +10649,16 @@ export declare namespace Word { export interface ContentControlCollectionUpdateData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ + export interface ContentControlListItemUpdateData { + + + + } + /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ + export interface ContentControlListItemCollectionUpdateData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ export interface CustomPropertyUpdateData { /** @@ -11928,6 +11950,7 @@ export declare namespace Word { /** An interface describing the data returned by calling `contentControl.toJSON()`. */ export interface ContentControlData { + /** * Gets the collection of content control objects in the content control. * @@ -11935,6 +11958,7 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ contentControls?: Word.Interfaces.ContentControlData[]; + /** * Gets the collection of field objects in the content control. * @@ -12082,6 +12106,16 @@ export declare namespace Word { export interface ContentControlCollectionData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ + export interface ContentControlListItemData { + + + + } + /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ + export interface ContentControlListItemCollectionData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface describing the data returned by calling `customProperty.toJSON()`. */ export interface CustomPropertyData { /** @@ -12375,6 +12409,12 @@ export declare namespace Word { */ title?: string; } + /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ + export interface DropDownListContentControlData { + } + /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ + export interface ComboBoxContentControlData { + } /** An interface describing the data returned by calling `field.toJSON()`. */ export interface FieldData { /** @@ -14270,6 +14310,8 @@ export declare namespace Word { */ type?: boolean; } + + /** * Represents a custom property. * diff --git a/generate-docs/api-extractor-inputs-word-release/word_1_6/word.d.ts b/generate-docs/api-extractor-inputs-word-release/word_1_6/word.d.ts index c997347642..2185e2d7ee 100644 --- a/generate-docs/api-extractor-inputs-word-release/word_1_6/word.d.ts +++ b/generate-docs/api-extractor-inputs-word-release/word_1_6/word.d.ts @@ -317,10 +317,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the body at the specified location. * @@ -941,6 +942,7 @@ export declare namespace Word { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; + /** * Gets the collection of content control objects in the content control. * @@ -948,6 +950,7 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ readonly contentControls: Word.ContentControlCollection; + /** * Gets the collection of endnotes in the content control. * @@ -1587,6 +1590,8 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.ContentControlCollectionData; } + + /** * Specifies the options that define which content controls are returned. * @@ -1595,12 +1600,13 @@ export declare namespace Word { */ export interface ContentControlOptions { /** - * An array of content control types, item must be 'RichText', 'PlainText', or 'CheckBox'. + * An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. * * @remarks * [Api set: WordApi 1.5] * - * Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. + * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9. */ types: Word.ContentControlType[]; } @@ -2416,9 +2422,24 @@ export declare namespace Word { * @remarks * [Api set: WordApi 1.6] * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. */ - importStylesFromJson(stylesJson: string): OfficeExtension.ClientResult; + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult; + /** + * Import styles from a JSON-formatted string. + * + * @remarks + * [Api set: WordApi 1.6] + * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * + * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehaviorString - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. + */ + importStylesFromJson(stylesJson: string, importedStylesConflictBehaviorString?: "Ignore" | "Overwrite" | "CreateNew"): OfficeExtension.ClientResult; /** * Inserts a document into the target document at a specific location with additional properties. Headers, footers, watermarks, and other section properties are copied by default. @@ -2787,6 +2808,8 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.DocumentPropertiesData; } + + /** * Represents a field. * @@ -4461,10 +4484,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the paragraph at the specified location. * @@ -5211,10 +5235,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts an endnote. The endnote reference is placed after the range. * @@ -10814,6 +10839,7 @@ export declare namespace Word { + enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", @@ -11066,6 +11092,16 @@ export declare namespace Word { export interface ContentControlCollectionUpdateData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ + export interface ContentControlListItemUpdateData { + + + + } + /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ + export interface ContentControlListItemCollectionUpdateData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ export interface CustomPropertyUpdateData { /** @@ -12393,6 +12429,7 @@ export declare namespace Word { /** An interface describing the data returned by calling `contentControl.toJSON()`. */ export interface ContentControlData { + /** * Gets the collection of content control objects in the content control. * @@ -12400,6 +12437,7 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ contentControls?: Word.Interfaces.ContentControlData[]; + /** * Gets the collection of field objects in the content control. * @@ -12547,6 +12585,16 @@ export declare namespace Word { export interface ContentControlCollectionData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ + export interface ContentControlListItemData { + + + + } + /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ + export interface ContentControlListItemCollectionData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface describing the data returned by calling `customProperty.toJSON()`. */ export interface CustomPropertyData { /** @@ -12798,6 +12846,12 @@ export declare namespace Word { */ title?: string; } + /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ + export interface DropDownListContentControlData { + } + /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ + export interface ComboBoxContentControlData { + } /** An interface describing the data returned by calling `field.toJSON()`. */ export interface FieldData { /** @@ -14771,6 +14825,8 @@ export declare namespace Word { */ type?: boolean; } + + /** * Represents a custom property. * diff --git a/generate-docs/api-extractor-inputs-word-release/word_1_7/word.d.ts b/generate-docs/api-extractor-inputs-word-release/word_1_7/word.d.ts index ec5e266e57..db53fcb294 100644 --- a/generate-docs/api-extractor-inputs-word-release/word_1_7/word.d.ts +++ b/generate-docs/api-extractor-inputs-word-release/word_1_7/word.d.ts @@ -678,10 +678,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the body at the specified location. * @@ -1360,12 +1361,13 @@ export declare namespace Word { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ readonly checkboxContentControl: Word.CheckboxContentControl; + /** * Gets the collection of content control objects in the content control. * @@ -1373,6 +1375,7 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ readonly contentControls: Word.ContentControlCollection; + /** * Gets the collection of endnotes in the content control. * @@ -2012,6 +2015,8 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.ContentControlCollectionData; } + + /** * Specifies the options that define which content controls are returned. * @@ -2020,12 +2025,13 @@ export declare namespace Word { */ export interface ContentControlOptions { /** - * An array of content control types, item must be 'RichText', 'PlainText', or 'CheckBox'. + * An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. * * @remarks * [Api set: WordApi 1.5] * - * Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. + * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9. */ types: Word.ContentControlType[]; } @@ -2849,9 +2855,24 @@ export declare namespace Word { * @remarks * [Api set: WordApi 1.6] * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. */ - importStylesFromJson(stylesJson: string): OfficeExtension.ClientResult; + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult; + /** + * Import styles from a JSON-formatted string. + * + * @remarks + * [Api set: WordApi 1.6] + * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * + * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehaviorString - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. + */ + importStylesFromJson(stylesJson: string, importedStylesConflictBehaviorString?: "Ignore" | "Overwrite" | "CreateNew"): OfficeExtension.ClientResult; /** * Inserts a document into the target document at a specific location with additional properties. Headers, footers, watermarks, and other section properties are copied by default. @@ -3267,6 +3288,8 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.DocumentPropertiesData; } + + /** * Represents a field. * @@ -4969,10 +4992,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the paragraph at the specified location. * @@ -5719,10 +5743,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts an endnote. The endnote reference is placed after the range. * @@ -11373,6 +11398,7 @@ export declare namespace Word { + enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", @@ -11549,7 +11575,7 @@ export declare namespace Word { /** An interface for updating data on the `ContentControl` object, for use in `contentControl.set({ ... })`. */ export interface ContentControlUpdateData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -11637,6 +11663,16 @@ export declare namespace Word { export interface ContentControlCollectionUpdateData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ + export interface ContentControlListItemUpdateData { + + + + } + /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ + export interface ContentControlListItemCollectionUpdateData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ export interface CustomPropertyUpdateData { /** @@ -12988,12 +13024,13 @@ export declare namespace Word { /** An interface describing the data returned by calling `contentControl.toJSON()`. */ export interface ContentControlData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ checkboxContentControl?: Word.Interfaces.CheckboxContentControlData; + /** * Gets the collection of content control objects in the content control. * @@ -13001,6 +13038,7 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ contentControls?: Word.Interfaces.ContentControlData[]; + /** * Gets the collection of field objects in the content control. * @@ -13148,6 +13186,16 @@ export declare namespace Word { export interface ContentControlCollectionData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ + export interface ContentControlListItemData { + + + + } + /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ + export interface ContentControlListItemCollectionData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface describing the data returned by calling `customProperty.toJSON()`. */ export interface CustomPropertyData { /** @@ -13399,6 +13447,12 @@ export declare namespace Word { */ title?: string; } + /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ + export interface DropDownListContentControlData { + } + /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ + export interface ComboBoxContentControlData { + } /** An interface describing the data returned by calling `field.toJSON()`. */ export interface FieldData { /** @@ -15157,7 +15211,7 @@ export declare namespace Word { */ $all?: boolean; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -15330,7 +15384,7 @@ export declare namespace Word { */ $all?: boolean; /** - * For EACH ITEM in the collection: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * For EACH ITEM in the collection: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -15491,6 +15545,8 @@ export declare namespace Word { */ type?: boolean; } + + /** * Represents a custom property. * diff --git a/generate-docs/api-extractor-inputs-word-release/word_1_8/word.d.ts b/generate-docs/api-extractor-inputs-word-release/word_1_8/word.d.ts index af546d1444..9c4ec7db4d 100644 --- a/generate-docs/api-extractor-inputs-word-release/word_1_8/word.d.ts +++ b/generate-docs/api-extractor-inputs-word-release/word_1_8/word.d.ts @@ -747,10 +747,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the body at the specified location. * @@ -1429,12 +1430,13 @@ export declare namespace Word { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ readonly checkboxContentControl: Word.CheckboxContentControl; + /** * Gets the collection of content control objects in the content control. * @@ -1442,6 +1444,7 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ readonly contentControls: Word.ContentControlCollection; + /** * Gets the collection of endnotes in the content control. * @@ -2081,6 +2084,8 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.ContentControlCollectionData; } + + /** * Specifies the options that define which content controls are returned. * @@ -2089,12 +2094,13 @@ export declare namespace Word { */ export interface ContentControlOptions { /** - * An array of content control types, item must be 'RichText', 'PlainText', or 'CheckBox'. + * An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. * * @remarks * [Api set: WordApi 1.5] * - * Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. + * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9. */ types: Word.ContentControlType[]; } @@ -2918,9 +2924,24 @@ export declare namespace Word { * @remarks * [Api set: WordApi 1.6] * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. */ - importStylesFromJson(stylesJson: string): OfficeExtension.ClientResult; + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult; + /** + * Import styles from a JSON-formatted string. + * + * @remarks + * [Api set: WordApi 1.6] + * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * + * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehaviorString - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. + */ + importStylesFromJson(stylesJson: string, importedStylesConflictBehaviorString?: "Ignore" | "Overwrite" | "CreateNew"): OfficeExtension.ClientResult; /** * Inserts a document into the target document at a specific location with additional properties. Headers, footers, watermarks, and other section properties are copied by default. @@ -3344,6 +3365,8 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.DocumentPropertiesData; } + + /** * Represents a field. * @@ -5046,10 +5069,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the paragraph at the specified location. * @@ -5803,10 +5827,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts an endnote. The endnote reference is placed after the range. * @@ -11469,6 +11494,7 @@ export declare namespace Word { + enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", @@ -11645,7 +11671,7 @@ export declare namespace Word { /** An interface for updating data on the `ContentControl` object, for use in `contentControl.set({ ... })`. */ export interface ContentControlUpdateData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -11733,6 +11759,16 @@ export declare namespace Word { export interface ContentControlCollectionUpdateData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ + export interface ContentControlListItemUpdateData { + + + + } + /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ + export interface ContentControlListItemCollectionUpdateData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ export interface CustomPropertyUpdateData { /** @@ -13084,12 +13120,13 @@ export declare namespace Word { /** An interface describing the data returned by calling `contentControl.toJSON()`. */ export interface ContentControlData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ checkboxContentControl?: Word.Interfaces.CheckboxContentControlData; + /** * Gets the collection of content control objects in the content control. * @@ -13097,6 +13134,7 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ contentControls?: Word.Interfaces.ContentControlData[]; + /** * Gets the collection of field objects in the content control. * @@ -13244,6 +13282,16 @@ export declare namespace Word { export interface ContentControlCollectionData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ + export interface ContentControlListItemData { + + + + } + /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ + export interface ContentControlListItemCollectionData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface describing the data returned by calling `customProperty.toJSON()`. */ export interface CustomPropertyData { /** @@ -13495,6 +13543,12 @@ export declare namespace Word { */ title?: string; } + /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ + export interface DropDownListContentControlData { + } + /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ + export interface ComboBoxContentControlData { + } /** An interface describing the data returned by calling `field.toJSON()`. */ export interface FieldData { /** @@ -15253,7 +15307,7 @@ export declare namespace Word { */ $all?: boolean; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -15426,7 +15480,7 @@ export declare namespace Word { */ $all?: boolean; /** - * For EACH ITEM in the collection: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * For EACH ITEM in the collection: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -15587,6 +15641,8 @@ export declare namespace Word { */ type?: boolean; } + + /** * Represents a custom property. * diff --git a/generate-docs/api-extractor-inputs-word-release/word_1_9/api-extractor.json b/generate-docs/api-extractor-inputs-word-release/word_1_9/api-extractor.json new file mode 100644 index 0000000000..1bdacc53f0 --- /dev/null +++ b/generate-docs/api-extractor-inputs-word-release/word_1_9/api-extractor.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "word.d.ts", + "apiReport": { + "enabled": false + }, + "docModel": { + "enabled": true, + "apiJsonFilePath": "../../json/word_1_9/.api.json" + }, + "dtsRollup": { + "enabled": false + }, + "messages": { + "extractorMessageReporting": { + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-forgotten-export": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } + }, + "tsdocMessageReporting": { + "tsdoc-escape-right-brace": { + "logLevel": "none" + }, + "tsdoc-escape-greater-than": { + "logLevel": "none" + }, + "tsdoc-malformed-inline-tag": { + "logLevel": "none" + }, + "tsdoc-unnecessary-backslash": { + "logLevel": "none" + } + } + } +} \ No newline at end of file diff --git a/generate-docs/api-extractor-inputs-word-release/word_1_9/dist/tsdoc-metadata.json b/generate-docs/api-extractor-inputs-word-release/word_1_9/dist/tsdoc-metadata.json new file mode 100644 index 0000000000..ae2e4ace9e --- /dev/null +++ b/generate-docs/api-extractor-inputs-word-release/word_1_9/dist/tsdoc-metadata.json @@ -0,0 +1,11 @@ +// This file is read by tools that parse documentation comments conforming to the TSDoc standard. +// It should be published with your NPM package. It should not be tracked by Git. +{ + "tsdocVersion": "0.12", + "toolPackages": [ + { + "packageName": "@microsoft/api-extractor", + "packageVersion": "7.0.13" + } + ] +} diff --git a/generate-docs/api-extractor-inputs-word-release/word_1_9/package.json b/generate-docs/api-extractor-inputs-word-release/word_1_9/package.json new file mode 100644 index 0000000000..b1871db58c --- /dev/null +++ b/generate-docs/api-extractor-inputs-word-release/word_1_9/package.json @@ -0,0 +1,4 @@ +{ + "name": "word", + "version": "1.9.0" +} \ No newline at end of file diff --git a/generate-docs/api-extractor-inputs-word-release/word_1_9/tsconfig.json b/generate-docs/api-extractor-inputs-word-release/word_1_9/tsconfig.json new file mode 100644 index 0000000000..30ae695dda --- /dev/null +++ b/generate-docs/api-extractor-inputs-word-release/word_1_9/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "target": "es6", + "forceConsistentCasingInFileNames": true, + "module": "commonjs", + "declaration": true, + "sourceMap": true, + "experimentalDecorators": true, + "types": [ + "node" + ], + "lib": [ + "es5", + "scripthost", + "es2015.collection", + "es2015.promise", + "es2015.iterable", + "dom" + ] + }, + "include": [ "word.d.ts" ] +} diff --git a/generate-docs/api-extractor-inputs-word-release/word_1_9/tsdoc-metadata.json b/generate-docs/api-extractor-inputs-word-release/word_1_9/tsdoc-metadata.json new file mode 100644 index 0000000000..03ce231904 --- /dev/null +++ b/generate-docs/api-extractor-inputs-word-release/word_1_9/tsdoc-metadata.json @@ -0,0 +1,11 @@ +// This file is read by tools that parse documentation comments conforming to the TSDoc standard. +// It should be published with your NPM package. It should not be tracked by Git. +{ + "tsdocVersion": "0.12", + "toolPackages": [ + { + "packageName": "@microsoft/api-extractor", + "packageVersion": "7.43.0" + } + ] +} diff --git a/generate-docs/api-extractor-inputs-word-release/word_1_9/word.d.ts b/generate-docs/api-extractor-inputs-word-release/word_1_9/word.d.ts new file mode 100644 index 0000000000..d8a3921bc0 --- /dev/null +++ b/generate-docs/api-extractor-inputs-word-release/word_1_9/word.d.ts @@ -0,0 +1,19134 @@ +import { OfficeExtension } from "../../api-extractor-inputs-office/office" +import { Office as Outlook} from "../../api-extractor-inputs-outlook/outlook" +//////////////////////////////////////////////////////////////// +/////////////////////// Begin Word APIs //////////////////////// +//////////////////////////////////////////////////////////////// + +export declare namespace Word { + /** + * Represents the color scheme of a critique in the document, affecting underline and highlight. + * + * @remarks + * [Api set: WordApi 1.7] + */ + enum CritiqueColorScheme { + /** + * Red color. + * @remarks + * [Api set: WordApi 1.7] + */ + red = "Red", + /** + * Green color. + * @remarks + * [Api set: WordApi 1.7] + */ + green = "Green", + /** + * Blue color. + * @remarks + * [Api set: WordApi 1.7] + */ + blue = "Blue", + /** + * Lavender color. + * @remarks + * [Api set: WordApi 1.7] + */ + lavender = "Lavender", + /** + * Berry color. + * @remarks + * [Api set: WordApi 1.7] + */ + berry = "Berry", + } + /** + * Properties defining the behavior of the pop-up menu for a given critique. + * + * @remarks + * [Api set: WordApi 1.8] + */ + export interface CritiquePopupOptions { + /** + * Gets the manifest resource ID of the string to use for branding. This branding text appears next to your add-in icon in the pop-up menu. + * + * @remarks + * [Api set: WordApi 1.8] + */ + brandingTextResourceId: string; + /** + * Gets the manifest resource ID of the string to use as the subtitle. + * + * @remarks + * [Api set: WordApi 1.8] + */ + subtitleResourceId: string; + /** + * Gets the suggestions to display in the critique pop-up menu. + * + * @remarks + * [Api set: WordApi 1.8] + */ + suggestions: string[]; + /** + * Gets the manifest resource ID of the string to use as the title. + * + * @remarks + * [Api set: WordApi 1.8] + */ + titleResourceId: string; + } + /** + * Critique that will be rendered as underline for the specified part of paragraph in the document. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export interface Critique { + /** + * Specifies the color scheme of the critique. + * + * @remarks + * [Api set: WordApi 1.7] + */ + colorScheme: Word.CritiqueColorScheme | "Red" | "Green" | "Blue" | "Lavender" | "Berry"; + /** + * Specifies the length of the critique inside paragraph. + * + * @remarks + * [Api set: WordApi 1.7] + */ + length: number; + /** + * Specifies the behavior of the pop-up menu for the critique. + * + * @remarks + * [Api set: WordApi 1.8] + */ + popupOptions?: Word.CritiquePopupOptions; + /** + * Specifies the start index of the critique inside paragraph. + * + * @remarks + * [Api set: WordApi 1.7] + */ + start: number; + } + /** + * Represents an annotation wrapper around critique displayed in the document. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export class CritiqueAnnotation extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the range of text that is annotated. + * + * @remarks + * [Api set: WordApi 1.7] + */ + readonly range: Word.Range; + /** + * Gets the critique that was passed when the annotation was inserted. + * + * @remarks + * [Api set: WordApi 1.7] + */ + readonly critique: Word.Critique; + /** + * Accepts the critique. This will change the annotation state to `accepted`. + * + * @remarks + * [Api set: WordApi 1.7] + */ + accept(): void; + /** + * Rejects the critique. This will change the annotation state to `rejected`. + * + * @remarks + * [Api set: WordApi 1.7] + */ + reject(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CritiqueAnnotationLoadOptions): Word.CritiqueAnnotation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CritiqueAnnotation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.CritiqueAnnotation; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CritiqueAnnotation; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.CritiqueAnnotation; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.CritiqueAnnotation` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CritiqueAnnotationData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.CritiqueAnnotationData; + } + /** + * Represents the state of the annotation. + * + * @remarks + * [Api set: WordApi 1.7] + */ + enum AnnotationState { + /** + * Created. + * @remarks + * [Api set: WordApi 1.7] + */ + created = "Created", + /** + * Accepted. + * @remarks + * [Api set: WordApi 1.7] + */ + accepted = "Accepted", + /** + * Rejected. + * @remarks + * [Api set: WordApi 1.7] + */ + rejected = "Rejected", + } + /** + * Annotations set produced by the add-in. Currently supporting only critiques. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export interface AnnotationSet { + /** + * Critiques. + * + * @remarks + * [Api set: WordApi 1.7] + */ + critiques: Word.Critique[]; + } + /** + * Represents an annotation attached to a paragraph. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export class Annotation extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the critique annotation object. + * + * @remarks + * [Api set: WordApi 1.7] + */ + readonly critiqueAnnotation: Word.CritiqueAnnotation; + /** + * Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. + * + * @remarks + * [Api set: WordApi 1.7] + */ + readonly id: string; + /** + * Gets the state of the annotation. + * + * @remarks + * [Api set: WordApi 1.7] + */ + readonly state: Word.AnnotationState | "Created" | "Accepted" | "Rejected"; + /** + * Deletes the annotation. + * + * @remarks + * [Api set: WordApi 1.7] + */ + delete(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.AnnotationLoadOptions): Word.Annotation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Annotation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Annotation; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Annotation; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Annotation; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.Annotation` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.AnnotationData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.AnnotationData; + } + /** + * Holds annotation information that is passed back on annotation added event. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export interface AnnotationInsertedEventArgs { + /** + * Specifies the annotation IDs for which the event was fired. + * + * @remarks + * [Api set: WordApi 1.7] + */ + ids: string[]; + } + /** + * Holds annotation information that is passed back on annotation inserted event. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export interface AnnotationClickedEventArgs { + /** + * Specifies the annotation ID for which the event was fired. + * + * @remarks + * [Api set: WordApi 1.7] + */ + id: string; + } + /** + * Holds annotation information that is passed back on annotation removed event. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export interface AnnotationRemovedEventArgs { + /** + * Specifies the annotation IDs for which the event was fired. + * + * @remarks + * [Api set: WordApi 1.7] + */ + ids: string[]; + } + /** + * Holds annotation information that is passed back on annotation hovered event. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export interface AnnotationHoveredEventArgs { + /** + * Specifies the annotation ID for which the event was fired. + * + * @remarks + * [Api set: WordApi 1.7] + */ + id: string; + } + /** + * Represents action information that's passed back on annotation pop-up action event. + * + * @remarks + * [Api set: WordApi 1.8] + */ + export interface AnnotationPopupActionEventArgs { + /** + * Specifies the chosen action in the pop-up menu. + * + * @remarks + * [Api set: WordApi 1.8] + */ + action: string; + /** + * Specifies the accepted suggestion (only populated when accepting a critique suggestion). + * + * @remarks + * [Api set: WordApi 1.8] + */ + critiqueSuggestion: string; + /** + * Specifies the annotation ID for which the event was fired. + * + * @remarks + * [Api set: WordApi 1.8] + */ + id: string; + } + /** + * Contains a collection of {@link Word.Annotation} objects. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export class AnnotationCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.Annotation[]; + /** + * Gets the first annotation in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.7] + */ + getFirst(): Word.Annotation; + /** + * Gets the first annotation in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. + For further information, + see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.7] + */ + getFirstOrNullObject(): Word.Annotation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.AnnotationCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.AnnotationCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.AnnotationCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.AnnotationCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.AnnotationCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.AnnotationCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.AnnotationCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.AnnotationCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.AnnotationCollectionData; + } + /** + * Represents the application object. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class Application extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Creates a new document by using an optional Base64-encoded .docx file. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param base64File - Optional. The Base64-encoded .docx file. The default value is null. + */ + createDocument(base64File?: string): Word.DocumentCreated; + /** + * Opens a document and displays it in a new tab or window. + The following are examples for the various supported clients and platforms. + + - Remote or cloud location example: `https://microsoft.sharepoint.com/some/path/Document.docx` + + - Local location examples for Windows: `C:\\Users\\Someone\\Documents\\Document.docx` (includes required escaped backslashes), `file://mycomputer/myfolder/Document.docx` + + - Local location example for Mac and iOS: `/User/someone/document.docx` + * + * @remarks + * [Api set: WordApi 1.6] + * + * @param filePath - Required. The absolute path of the .docx file. Word on the web only supports remote (cloud) locations, while Word on Windows, on Mac, and on iOS support local and remote locations. + */ + openDocument(filePath: string): void; + /** + * Parse styles from template Base64 file and return JSON format of retrieved styles as a string. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param base64File - Required. The template file. + */ + retrieveStylesFromBase64(base64File: string): OfficeExtension.ClientResult; + /** + * Create a new instance of the `Word.Application` object. + */ + static newObject(context: OfficeExtension.ClientRequestContext): Word.Application; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Application` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ApplicationData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + /** + * Represents the body of a document or a section. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class Body extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of rich text content control objects in the body. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * Gets the collection of endnotes in the body. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly endnotes: Word.NoteItemCollection; + /** + * Gets the collection of field objects in the body. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly fields: Word.FieldCollection; + /** + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly font: Word.Font; + /** + * Gets the collection of footnotes in the body. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly footnotes: Word.NoteItemCollection; + /** + * Gets the collection of InlinePicture objects in the body. The collection doesn't include floating images. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly inlinePictures: Word.InlinePictureCollection; + /** + * Gets the collection of list objects in the body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly lists: Word.ListCollection; + /** + * Gets the collection of paragraph objects in the body. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Important: Paragraphs in tables aren't returned for requirement sets 1.1 and 1.2. From requirement set 1.3, paragraphs in tables are also returned. + */ + readonly paragraphs: Word.ParagraphCollection; + /** + * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws an `ItemNotFound` error if there isn't a parent body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentBody: Word.Body; + /** + * Gets the parent body of the body. For example, a table cell body's parent body could be a header. If there isn't a parent body, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentBodyOrNullObject: Word.Body; + /** + * Gets the content control that contains the body. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the body. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the parent section of the body. Throws an `ItemNotFound` error if there isn't a parent section. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentSection: Word.Section; + /** + * Gets the parent section of the body. If there isn't a parent section, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentSectionOrNullObject: Word.Section; + /** + * Gets the collection of table objects in the body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly tables: Word.TableCollection; + /** + * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style: string; + /** + * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * Gets the text of the body. Use the insertText method to insert text. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly text: string; + /** + * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly type: Word.BodyType | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell" | "Footnote" | "Endnote" | "NoteItem"; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.BodyUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Body): void; + /** + * Clears the contents of the body object. The user can perform the undo operation on the cleared content. + * + * @remarks + * [Api set: WordApi 1.1] + */ + clear(): void; + /** + * Gets comments associated with the body. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getComments(): Word.CommentCollection; + /** + * Gets the currently supported content controls in the body. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. + * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. + * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. + * + * @param options - Optional. Options that define which content controls are returned. + */ + getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; + /** + * Gets an HTML representation of the body object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Body.getOoxml()` and convert the returned XML to HTML. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getHtml(): OfficeExtension.ClientResult; + /** + * Gets the OOXML (Office Open XML) representation of the body object. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getOoxml(): OfficeExtension.ClientResult; + /** + * Gets the whole body, or the starting or ending point of the body, as a range. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. + */ + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersionString - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersionString?: "Original" | "Current"): OfficeExtension.ClientResult; + /** + * Gets the collection of the TrackedChange objects in the body. + * + * @remarks + * [Api set: WordApi 1.6] + */ + getTrackedChanges(): Word.TrackedChangeCollection; + /** + * Inserts a break at the specified location in the main document. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param breakType - Required. The break type to add to the body. + * @param insertLocation - Required. The value must be 'Start' or 'End'. + */ + insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): void; + /** + * Wraps the Body object with a content control. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. + * + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. + */ + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; + /** + * Inserts a document into the body at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. + * + * @param base64File - Required. The Base64-encoded content of a .docx file. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts HTML at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param html - Required. The HTML to be inserted in the document. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts a picture into the body at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage - Required. The Base64-encoded image to be inserted in the body. + * @param insertLocation - Required. The value must be 'Start' or 'End'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): Word.InlinePicture; + /** + * Inserts OOXML at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param ooxml - Required. The OOXML to be inserted. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param paragraphText - Required. The paragraph text to be inserted. + * @param insertLocation - Required. The value must be 'Start' or 'End'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): Word.Paragraph; + /** + * Inserts a table with the specified number of rows and columns. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rowCount - Required. The number of rows in the table. + * @param columnCount - Required. The number of columns in the table. + * @param insertLocation - Required. The value must be 'Start' or 'End'. + * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End", values?: string[][]): Word.Table; + /** + * Inserts text into the body at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param text - Required. Text to be inserted. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Performs a search with the specified SearchOptions on the scope of the body object. The search results are a collection of range objects. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param searchText - Required. The search text. Can be a maximum of 255 characters. + * @param searchOptions - Optional. Options for the search. + */ + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + /** + * Selects the body and navigates the Word UI to it. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects the body and navigates the Word UI to it. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionModeString - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionModeString?: "Select" | "Start" | "End"): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.BodyLoadOptions): Word.Body; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Body; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Body; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Body; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Body; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Body` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.BodyData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.BodyData; + } + + + /** + * The data specific to content controls of type CheckBox. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export class CheckboxContentControl extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies the current state of the checkbox. + * + * @remarks + * [Api set: WordApi 1.7] + */ + isChecked: boolean; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.CheckboxContentControlUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.CheckboxContentControl): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CheckboxContentControlLoadOptions): Word.CheckboxContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CheckboxContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.CheckboxContentControl; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CheckboxContentControl; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.CheckboxContentControl; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.CheckboxContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CheckboxContentControlData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.CheckboxContentControlData; + } + /** + * Represents a comment in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export class Comment extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies the comment's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange: Word.CommentContentRange; + /** + * Gets the collection of reply objects associated with the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly replies: Word.CommentReplyCollection; + /** + * Gets the email of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly authorEmail: string; + /** + * Gets the name of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly authorName: string; + /** + * Specifies the comment's content as plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content: string; + /** + * Gets the creation date of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly creationDate: Date; + /** + * Gets the ID of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly id: string; + /** + * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. + * + * @remarks + * [Api set: WordApi 1.4] + */ + resolved: boolean; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.CommentUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Comment): void; + /** + * Deletes the comment and its replies. + * + * @remarks + * [Api set: WordApi 1.4] + */ + delete(): void; + /** + * Gets the range in the main document where the comment is on. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getRange(): Word.Range; + /** + * Adds a new reply to the end of the comment thread. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param replyText - Required. Reply text. + */ + reply(replyText: string): Word.CommentReply; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CommentLoadOptions): Word.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Comment; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Comment; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Comment; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Comment` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.CommentData; + } + /** + * Contains a collection of {@link Word.Comment} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export class CommentCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.Comment[]; + /** + * Gets the first comment in the collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getFirst(): Word.Comment; + /** + * Gets the first comment in the collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getFirstOrNullObject(): Word.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CommentCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CommentCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CommentCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CommentCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CommentCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.CommentCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.CommentCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.CommentCollectionData; + } + /** + * @remarks + * [Api set: WordApi 1.4] + */ + export class CommentContentRange extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies a value that indicates whether the comment text is bold. + * + * @remarks + * [Api set: WordApi 1.4] + */ + bold: boolean; + /** + * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + hyperlink: string; + /** + * Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly isEmpty: boolean; + /** + * Specifies a value that indicates whether the comment text is italicized. + * + * @remarks + * [Api set: WordApi 1.4] + */ + italic: boolean; + /** + * Specifies a value that indicates whether the comment text has a strikethrough. + * + * @remarks + * [Api set: WordApi 1.4] + */ + strikeThrough: boolean; + /** + * Gets the text of the comment range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly text: string; + /** + * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. + * + * @remarks + * [Api set: WordApi 1.4] + */ + underline: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.CommentContentRangeUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.CommentContentRange): void; + /** + * Inserts text into at the specified location. **Note**: For the modern comment, the content range tracked across context turns to empty if any revision to the comment is posted through the UI. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param text - Required. The text to be inserted in to the CommentContentRange. + * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertText(text: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.CommentContentRange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CommentContentRangeLoadOptions): Word.CommentContentRange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CommentContentRange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.CommentContentRange; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CommentContentRange; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.CommentContentRange; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.CommentContentRange` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentContentRangeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.CommentContentRangeData; + } + /** + * Represents a comment reply in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export class CommentReply extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies the commentReply's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange: Word.CommentContentRange; + /** + * Gets the parent comment of this reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentComment: Word.Comment; + /** + * Gets the email of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly authorEmail: string; + /** + * Gets the name of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly authorName: string; + /** + * Specifies the comment reply's content. The string is plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content: string; + /** + * Gets the creation date of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly creationDate: Date; + /** + * Gets the ID of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly id: string; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.CommentReplyUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.CommentReply): void; + /** + * Deletes the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + delete(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CommentReplyLoadOptions): Word.CommentReply; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CommentReply; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.CommentReply; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CommentReply; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.CommentReply; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.CommentReply` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentReplyData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.CommentReplyData; + } + /** + * Contains a collection of {@link Word.CommentReply} objects. Represents all comment replies in one comment thread. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export class CommentReplyCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.CommentReply[]; + /** + * Gets the first comment reply in the collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getFirst(): Word.CommentReply; + /** + * Gets the first comment reply in the collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getFirstOrNullObject(): Word.CommentReply; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CommentReplyCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CommentReplyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CommentReplyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CommentReplyCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CommentReplyCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.CommentReplyCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.CommentReplyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentReplyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.CommentReplyCollectionData; + } + /** + * Represents a content control. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text, plain text, and checkbox content controls are supported. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class ContentControl extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.7] + */ + readonly checkboxContentControl: Word.CheckboxContentControl; + /** + * Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly comboBoxContentControl: Word.ComboBoxContentControl; + /** + * Gets the collection of content control objects in the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly dropDownListContentControl: Word.DropDownListContentControl; + /** + * Gets the collection of endnotes in the content control. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly endnotes: Word.NoteItemCollection; + /** + * Gets the collection of field objects in the content control. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly fields: Word.FieldCollection; + /** + * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly font: Word.Font; + /** + * Gets the collection of footnotes in the content control. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly footnotes: Word.NoteItemCollection; + /** + * Gets the collection of InlinePicture objects in the content control. The collection doesn't include floating images. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly inlinePictures: Word.InlinePictureCollection; + /** + * Gets the collection of list objects in the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly lists: Word.ListCollection; + /** + * Gets the collection of paragraph objects in the content control. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Important: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this content control aren't returned. From requirement set 1.3, paragraphs in such tables are also returned. + */ + readonly paragraphs: Word.ParagraphCollection; + /** + * Gets the parent body of the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentBody: Word.Body; + /** + * Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the table that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCell: Word.TableCell; + /** + * Gets the table cell that contains the content control. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * Gets the table that contains the content control. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * Gets the collection of table objects in the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly tables: Word.TableCollection; + /** + * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + appearance: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; + /** + * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotDelete: boolean; + /** + * Specifies a value that indicates whether the user can edit the contents of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotEdit: boolean; + /** + * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color: string; + /** + * Gets an integer that represents the content control identifier. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly id: number; + /** + * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. + * + * @remarks + * [Api set: WordApi 1.1] + */ + placeholderText: string; + /** + * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * @remarks + * [Api set: WordApi 1.1] + */ + removeWhenEdited: boolean; + /** + * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style: string; + /** + * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly subtype: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText"; + /** + * Specifies a tag to identify a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + tag: string; + /** + * Gets the text of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly text: string; + /** + * Specifies the title for a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + title: string; + /** + * Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly type: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText"; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ContentControlUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.ContentControl): void; + /** + * Clears the contents of the content control. The user can perform the undo operation on the cleared content. + * + * @remarks + * [Api set: WordApi 1.1] + */ + clear(): void; + /** + * Deletes the content control and its content. If `keepContent` is set to true, the content isn't deleted. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param keepContent - Required. Indicates whether the content should be deleted with the content control. If `keepContent` is set to true, the content isn't deleted. + */ + delete(keepContent: boolean): void; + /** + * Gets comments associated with the content control. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getComments(): Word.CommentCollection; + /** + * Gets the currently supported child content controls in this content control. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. + * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. + * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. + * + * @param options - Optional. Options that define which content controls are returned. + */ + getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; + /** + * Gets an HTML representation of the content control object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `ContentControl.getOoxml()` and convert the returned XML to HTML. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getHtml(): OfficeExtension.ClientResult; + /** + * Gets the Office Open XML (OOXML) representation of the content control object. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getOoxml(): OfficeExtension.ClientResult; + /** + * Gets the whole content control, or the starting or ending point of the content control, as a range. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', 'Before', 'After', or 'Content'. + */ + getRange(rangeLocation?: Word.RangeLocation | "Whole" | "Start" | "End" | "Before" | "After" | "Content"): Word.Range; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersionString - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersionString?: "Original" | "Current"): OfficeExtension.ClientResult; + /** + * Gets the text ranges in the content control by using punctuation marks and/or other ending marks. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. + * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. + */ + getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; + /** + * Gets the collection of the TrackedChange objects in the content control. + * + * @remarks + * [Api set: WordApi 1.6] + */ + getTrackedChanges(): Word.TrackedChangeCollection; + /** + * Inserts a break at the specified location in the main document. This method cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param breakType - Required. Type of break. + * @param insertLocation - Required. The value must be 'Start', 'End', 'Before', or 'After'. + */ + insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): void; + /** + * Inserts a document into the content control at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. + * + * @param base64File - Required. The Base64-encoded content of a .docx file. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts HTML into the content control at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param html - Required. The HTML to be inserted in to the content control. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts an inline picture into the content control at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage - Required. The Base64-encoded image to be inserted in the content control. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.InlinePicture; + /** + * Inserts OOXML into the content control at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param ooxml - Required. The OOXML to be inserted in to the content control. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param paragraphText - Required. The paragraph text to be inserted. + * @param insertLocation - Required. The value must be 'Start', 'End', 'Before', or 'After'. 'Before' and 'After' cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): Word.Paragraph; + /** + * Inserts a table with the specified number of rows and columns into, or next to, a content control. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rowCount - Required. The number of rows in the table. + * @param columnCount - Required. The number of columns in the table. + * @param insertLocation - Required. The value must be 'Start', 'End', 'Before', or 'After'. 'Before' and 'After' cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. + * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After", values?: string[][]): Word.Table; + /** + * Inserts text into the content control at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param text - Required. The text to be inserted in to the content control. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Performs a search with the specified SearchOptions on the scope of the content control object. The search results are a collection of range objects. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param searchText - Required. The search text. + * @param searchOptions - Optional. Options for the search. + */ + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + /** + * Selects the content control. This causes Word to scroll to the selection. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects the content control. This causes Word to scroll to the selection. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionModeString - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionModeString?: "Select" | "Start" | "End"): void; + /** + * Splits the content control into child ranges by using delimiters. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param delimiters - Required. The delimiters as an array of strings. + * @param multiParagraphs - Optional. Indicates whether a returned child range can cover multiple paragraphs. Default is false which indicates that the paragraph boundaries are also used as delimiters. + * @param trimDelimiters - Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. + * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. + */ + split(delimiters: string[], multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ContentControlLoadOptions): Word.ContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ContentControl; + /** + * Occurs when data within the content control are changed. To get the new text, load this content control in the handler. To get the old text, do not load it. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @eventproperty + */ + readonly onDataChanged: OfficeExtension.EventHandlers; + /** + * Occurs when the content control is deleted. Do not load this content control in the handler, otherwise you won't be able to get its original properties. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @eventproperty + */ + readonly onDeleted: OfficeExtension.EventHandlers; + /** + * Occurs when the content control is entered. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @eventproperty + */ + readonly onEntered: OfficeExtension.EventHandlers; + /** + * Occurs when the content control is exited, for example, when the cursor leaves the content control. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @eventproperty + */ + readonly onExited: OfficeExtension.EventHandlers; + /** + * Occurs when selection within the content control is changed. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @eventproperty + */ + readonly onSelectionChanged: OfficeExtension.EventHandlers; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ContentControl; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ContentControl; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.ContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ContentControlData; + } + /** + * Contains a collection of {@link Word.ContentControl} objects. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text and plain text content controls are supported. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class ContentControlCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.ContentControl[]; + /** + * Gets the content controls that have the specified tracking state. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param changeTrackingStates - Required. An array of content control change tracking states. + */ + getByChangeTrackingStates(changeTrackingStates: Word.ChangeTrackingState[]): Word.ContentControlCollection; + /** + * Gets a content control by its identifier. Throws an `ItemNotFound` error if there isn't a content control with the identifier in this collection. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param id - Required. A content control identifier. + */ + getById(id: number): Word.ContentControl; + /** + * Gets a content control by its identifier. If there isn't a content control with the identifier in this collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param id - Required. A content control identifier. + */ + getByIdOrNullObject(id: number): Word.ContentControl; + /** + * Gets the content controls that have the specified tag. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param tag - Required. A tag set on a content control. + */ + getByTag(tag: string): Word.ContentControlCollection; + /** + * Gets the content controls that have the specified title. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param title - Required. The title of a content control. + */ + getByTitle(title: string): Word.ContentControlCollection; + /** + * Gets the content controls that have the specified types. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param types - Required. An array of content control types. + */ + getByTypes(types: Word.ContentControlType[]): Word.ContentControlCollection; + /** + * Gets the first content control in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.ContentControl; + /** + * Gets the first content control in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.ContentControl; + /** + * Gets a content control by its ID. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param id - The content control's ID. + */ + getItem(id: number): Word.ContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ContentControlCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ContentControlCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ContentControlCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ContentControlCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ContentControlCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ContentControlCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.ContentControlCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.ContentControlCollectionData; + } + /** + * Represents a list item in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class ContentControlListItem extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText: string; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index: number; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value: string; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ContentControlListItemUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.ContentControlListItem): void; + /** + * Deletes the list item. + * + * @remarks + * [Api set: WordApi 1.9] + */ + delete(): void; + /** + * Selects the list item and sets the text of the content control to the value of the list item. + * + * @remarks + * [Api set: WordApi 1.9] + */ + select(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ContentControlListItemLoadOptions): Word.ContentControlListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ContentControlListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ContentControlListItem; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ContentControlListItem; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ContentControlListItem; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ContentControlListItem` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ContentControlListItemData; + } + /** + * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class ContentControlListItemCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.ContentControlListItem[]; + /** + * Gets the first list item in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.9] + */ + getFirst(): Word.ContentControlListItem; + /** + * Gets the first list item in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. + For further information, + see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.9] + */ + getFirstOrNullObject(): Word.ContentControlListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ContentControlListItemCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ContentControlListItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ContentControlListItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ContentControlListItemCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ContentControlListItemCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ContentControlListItemCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ContentControlListItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.ContentControlListItemCollectionData; + } + /** + * Specifies the options that define which content controls are returned. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export interface ContentControlOptions { + /** + * An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. + * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9. + */ + types: Word.ContentControlType[]; + } + /** + * Represents a custom property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class CustomProperty extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the key of the custom property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly key: string; + /** + * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly type: Word.DocumentPropertyType | "String" | "Number" | "Date" | "Boolean"; + /** + * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). + * + * @remarks + * [Api set: WordApi 1.3] + */ + value: any; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.CustomPropertyUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.CustomProperty): void; + /** + * Deletes the custom property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + delete(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CustomPropertyLoadOptions): Word.CustomProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CustomProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.CustomProperty; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CustomProperty; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.CustomProperty; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.CustomProperty` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomPropertyData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.CustomPropertyData; + } + /** + * Contains the collection of {@link Word.CustomProperty} objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class CustomPropertyCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.CustomProperty[]; + /** + * Creates a new or sets an existing custom property. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param key - Required. The custom property's key, which is case-insensitive. + * @param value - Required. The custom property's value. + */ + add(key: string, value: any): Word.CustomProperty; + /** + * Deletes all custom properties in this collection. + * + * @remarks + * [Api set: WordApi 1.3] + */ + deleteAll(): void; + /** + * Gets the count of custom properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a custom property object by its key, which is case-insensitive. Throws an `ItemNotFound` error if the custom property doesn't exist. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param key - The key that identifies the custom property object. + */ + getItem(key: string): Word.CustomProperty; + /** + * Gets a custom property object by its key, which is case-insensitive. If the custom property doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param key - Required. The key that identifies the custom property object. + */ + getItemOrNullObject(key: string): Word.CustomProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CustomPropertyCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomPropertyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CustomPropertyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomPropertyCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CustomPropertyCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.CustomPropertyCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.CustomPropertyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomPropertyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.CustomPropertyCollectionData; + } + /** + * Represents a custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export class CustomXmlPart extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the ID of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly id: string; + /** + * Gets the namespace URI of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly namespaceUri: string; + /** + * Deletes the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + delete(): void; + /** + * Deletes an attribute with the given name from the element identified by xpath. + * + * @remarks + * [Api set: WordApi 1.4] + * + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @param xpath - Required. Absolute path to the single element in XPath notation. + * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". + * @param name - Required. Name of the attribute. + */ + deleteAttribute(xpath: string, namespaceMappings: { + [key: string]: string; + }, name: string): void; + /** + * Deletes the element identified by xpath. + * + * @remarks + * [Api set: WordApi 1.4] + * + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @param xpath - Required. Absolute path to the single element in XPath notation. + * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". + */ + deleteElement(xpath: string, namespaceMappings: { + [key: string]: string; + }): void; + /** + * Gets the full XML content of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getXml(): OfficeExtension.ClientResult; + /** + * Inserts an attribute with the given name and value to the element identified by xpath. + * + * @remarks + * [Api set: WordApi 1.4] + * + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @param xpath - Required. Absolute path to the single element in XPath notation. + * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". + * @param name - Required. Name of the attribute. + * @param value - Required. Value of the attribute. + */ + insertAttribute(xpath: string, namespaceMappings: { + [key: string]: string; + }, name: string, value: string): void; + /** + * Inserts the given XML under the parent element identified by xpath at child position index. + * + * @remarks + * [Api set: WordApi 1.4] + * + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @param xpath - Required. Absolute path to the single parent element in XPath notation. + * @param xml - Required. XML content to be inserted. + * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". + * @param index - Optional. Zero-based position at which the new XML to be inserted. If omitted, the XML will be appended as the last child of this parent. + */ + insertElement(xpath: string, xml: string, namespaceMappings: { + [key: string]: string; + }, index?: number): void; + /** + * Queries the XML content of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + * + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @param xpath - Required. An XPath query. + * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". + * @returns An array where each item represents an entry matched by the XPath query. + */ + query(xpath: string, namespaceMappings: { + [key: string]: string; + }): OfficeExtension.ClientResult; + /** + * Sets the full XML content of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param xml - Required. XML content to be set. + */ + setXml(xml: string): void; + /** + * Updates the value of an attribute with the given name of the element identified by xpath. + * + * @remarks + * [Api set: WordApi 1.4] + * + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @param xpath - Required. Absolute path to the single element in XPath notation. + * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". + * @param name - Required. Name of the attribute. + * @param value - Required. New value of the attribute. + */ + updateAttribute(xpath: string, namespaceMappings: { + [key: string]: string; + }, name: string, value: string): void; + /** + * Updates the XML of the element identified by xpath. + * + * @remarks + * [Api set: WordApi 1.4] + * + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @param xpath - Required. Absolute path to the single element in XPath notation. + * @param xml - Required. New XML content to be stored. + * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". + */ + updateElement(xpath: string, xml: string, namespaceMappings: { + [key: string]: string; + }): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CustomXmlPartLoadOptions): Word.CustomXmlPart; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CustomXmlPart; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.CustomXmlPart; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CustomXmlPart; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.CustomXmlPart; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.CustomXmlPart` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.CustomXmlPartData; + } + /** + * Contains the collection of {@link Word.CustomXmlPart} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export class CustomXmlPartCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.CustomXmlPart[]; + /** + * Adds a new custom XML part to the document. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param xml - Required. XML content. Must be a valid XML fragment. + */ + add(xml: string): Word.CustomXmlPart; + /** + * Gets a new scoped collection of custom XML parts whose namespaces match the given namespace. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param namespaceUri - Required. The namespace URI. + */ + getByNamespace(namespaceUri: string): Word.CustomXmlPartScopedCollection; + /** + * Gets the number of items in the collection. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a custom XML part based on its ID. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param id - ID or index of the custom XML part to be retrieved. + */ + getItem(id: string): Word.CustomXmlPart; + /** + * Gets a custom XML part based on its ID. If the CustomXmlPart doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param id - Required. ID of the object to be retrieved. + */ + getItemOrNullObject(id: string): Word.CustomXmlPart; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CustomXmlPartCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomXmlPartCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CustomXmlPartCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomXmlPartCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CustomXmlPartCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.CustomXmlPartCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.CustomXmlPartCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.CustomXmlPartCollectionData; + } + /** + * Contains the collection of {@link Word.CustomXmlPart} objects with a specific namespace. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export class CustomXmlPartScopedCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.CustomXmlPart[]; + /** + * Gets the number of items in the collection. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a custom XML part based on its ID. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param id - ID of the custom XML part to be retrieved. + */ + getItem(id: string): Word.CustomXmlPart; + /** + * Gets a custom XML part based on its ID. If the CustomXmlPart doesn't exist in the collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param id - Required. ID of the object to be retrieved. + */ + getItemOrNullObject(id: string): Word.CustomXmlPart; + /** + * If the collection contains exactly one item, this method returns it. Otherwise, this method produces an error. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getOnlyItem(): Word.CustomXmlPart; + /** + * If the collection contains exactly one item, this method returns it. Otherwise, this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getOnlyItemOrNullObject(): Word.CustomXmlPart; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CustomXmlPartScopedCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomXmlPartScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CustomXmlPartScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomXmlPartScopedCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CustomXmlPartScopedCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.CustomXmlPartScopedCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.CustomXmlPartScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.CustomXmlPartScopedCollectionData; + } + /** + * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class Document extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly body: Word.Body; + /** + * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * Gets the custom XML parts in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly customXmlParts: Word.CustomXmlPartCollection; + /** + * Gets the properties of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly properties: Word.DocumentProperties; + /** + * Gets the collection of section objects in the document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly sections: Word.SectionCollection; + /** + * Gets the add-in's settings in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly settings: Word.SettingCollection; + /** + * Specifies the ChangeTracking mode. + * + * @remarks + * [Api set: WordApi 1.4] + */ + changeTrackingMode: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; + /** + * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly saved: boolean; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.DocumentUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Document): void; + /** + * Adds a style into the document by name and type. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param name - Required. A string representing the style name. + * @param type - Required. The style type, including character, list, paragraph, or table. + */ + addStyle(name: string, type: Word.StyleType): Word.Style; + /** + * Adds a style into the document by name and type. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param name - Required. A string representing the style name. + * @param typeString - Required. The style type, including character, list, paragraph, or table. + */ + addStyle(name: string, typeString: "Character" | "List" | "Paragraph" | "Table"): Word.Style; + /** + * Closes the current document. + + Note: This API isn't supported in Word on the web. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param closeBehavior - Optional. The close behavior must be 'Save' or 'SkipSave'. Default value is 'Save'. + */ + close(closeBehavior?: Word.CloseBehavior): void; + /** + * Closes the current document. + + Note: This API isn't supported in Word on the web. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param closeBehaviorString - Optional. The close behavior must be 'Save' or 'SkipSave'. Default value is 'Save'. + */ + close(closeBehaviorString?: "Save" | "SkipSave"): void; + + /** + * Deletes a bookmark, if it exists, from the document. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param name - Required. The case-insensitive bookmark name. + */ + deleteBookmark(name: string): void; + /** + * Gets the annotation by ID. Throws an `ItemNotFound` error if annotation isn't found. + * + * @remarks + * [Api set: WordApi 1.7] + * + * @param id - The ID of the annotation to get. + */ + getAnnotationById(id: string): Word.Annotation; + /** + * Gets a bookmark's range. Throws an `ItemNotFound` error if the bookmark doesn't exist. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param name - Required. The case-insensitive bookmark name. + */ + getBookmarkRange(name: string): Word.Range; + /** + * Gets a bookmark's range. If the bookmark doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param name - Required. The case-insensitive bookmark name. + */ + getBookmarkRangeOrNullObject(name: string): Word.Range; + /** + * Gets the currently supported content controls in the document. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. + * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. + * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. + * + * @param options - Optional. Options that define which content controls are returned. + */ + getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; + /** + * Gets the document's endnotes in a single body. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getEndnoteBody(): Word.Body; + /** + * Gets the document's footnotes in a single body. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getFootnoteBody(): Word.Body; + /** + * Gets the paragraph by its unique local ID. Throws an `ItemNotFound` error if the collection is empty. + * + * @remarks + * [Api set: WordApi 1.6] + * + * @param id - Required. Unique local ID in standard 8-4-4-4-12 GUID format without curly braces. Note that the ID differs across sessions and coauthors. + */ + getParagraphByUniqueLocalId(id: string): Word.Paragraph; + /** + * Gets the current selection of the document. Multiple selections aren't supported. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getSelection(): Word.Range; + /** + * Gets a StyleCollection object that represents the whole style set of the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getStyles(): Word.StyleCollection; + /** + * Import styles from a JSON-formatted string. + * + * @remarks + * [Api set: WordApi 1.6] + * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * + * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. + */ + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult; + /** + * Import styles from a JSON-formatted string. + * + * @remarks + * [Api set: WordApi 1.6] + * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * + * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehaviorString - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. + */ + importStylesFromJson(stylesJson: string, importedStylesConflictBehaviorString?: "Ignore" | "Overwrite" | "CreateNew"): OfficeExtension.ClientResult; + /** + * Inserts a document into the target document at a specific location with additional properties. + Headers, footers, watermarks, and other section properties are copied by default. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. + * + * @param base64File - Required. The Base64-encoded content of a .docx file. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. + * @param insertFileOptions - Optional. The additional properties that should be imported to the destination document. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End", insertFileOptions?: Word.InsertFileOptions): Word.SectionCollection; + /** + * Saves the document. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApi 1.5. + * + * @param saveBehavior - Optional. The save behavior must be 'Save' or 'Prompt'. Default value is 'Save'. + * @param fileName - Optional. The file name (exclude file extension). Only takes effect for a new document. + */ + save(saveBehavior?: Word.SaveBehavior, fileName?: string): void; + /** + * Saves the document. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApi 1.5. + * + * @param saveBehaviorString - Optional. The save behavior must be 'Save' or 'Prompt'. Default value is 'Save'. + * @param fileName - Optional. The file name (exclude file extension). Only takes effect for a new document. + */ + save(saveBehaviorString?: "Save" | "Prompt", fileName?: string): void; + /** + * Performs a search with the specified search options on the scope of the whole document. The search results are a collection of range objects. + * + * @remarks + * [Api set: WordApi 1.7] + */ + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.DocumentLoadOptions): Word.Document; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Document; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Document; + /** + * Occurs when the user clicks an annotation (or selects it using **Alt+Down**). + * + * @remarks + * [Api set: WordApi 1.7] + * + * @eventproperty + */ + readonly onAnnotationClicked: OfficeExtension.EventHandlers; + /** + * Occurs when the user hovers the cursor over an annotation. + * + * @remarks + * [Api set: WordApi 1.7] + * + * @eventproperty + */ + readonly onAnnotationHovered: OfficeExtension.EventHandlers; + /** + * Occurs when the user adds one or more annotations. + * + * @remarks + * [Api set: WordApi 1.7] + * + * @eventproperty + */ + readonly onAnnotationInserted: OfficeExtension.EventHandlers; + /** + * Occurs when the user performs an action in an annotation pop-up menu. + * + * @remarks + * [Api set: WordApi 1.8] + * + * @eventproperty + */ + readonly onAnnotationPopupAction: OfficeExtension.EventHandlers; + /** + * Occurs when the user deletes one or more annotations. + * + * @remarks + * [Api set: WordApi 1.7] + * + * @eventproperty + */ + readonly onAnnotationRemoved: OfficeExtension.EventHandlers; + /** + * Occurs when a content control is added. Run context.sync() in the handler to get the new content control's properties. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @eventproperty + */ + readonly onContentControlAdded: OfficeExtension.EventHandlers; + /** + * Occurs when the user adds new paragraphs. + * + * @remarks + * [Api set: WordApi 1.6] + * + * @eventproperty + */ + readonly onParagraphAdded: OfficeExtension.EventHandlers; + /** + * Occurs when the user changes paragraphs. + * + * @remarks + * [Api set: WordApi 1.6] + * + * @eventproperty + */ + readonly onParagraphChanged: OfficeExtension.EventHandlers; + /** + * Occurs when the user deletes paragraphs. + * + * @remarks + * [Api set: WordApi 1.6] + * + * @eventproperty + */ + readonly onParagraphDeleted: OfficeExtension.EventHandlers; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Document; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Document; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Document` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.DocumentData; + } + /** + * The DocumentCreated object is the top level object created by Application.CreateDocument. A DocumentCreated object is a special Document object. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class DocumentCreated extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + + + + + + + + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.DocumentCreatedUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.DocumentCreated): void; + + + + + + + + + /** + * Opens the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + open(): void; + + + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.DocumentCreatedLoadOptions): Word.DocumentCreated; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.DocumentCreated; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.DocumentCreated; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.DocumentCreated; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.DocumentCreated; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.DocumentCreated` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentCreatedData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.DocumentCreatedData; + } + /** + * Represents document properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class DocumentProperties extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of custom properties of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly customProperties: Word.CustomPropertyCollection; + /** + * Gets the application name of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly applicationName: string; + /** + * Specifies the author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + author: string; + /** + * Specifies the category of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + category: string; + /** + * Specifies the Comments field in the metadata of the document. These have no connection to comments by users made in the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + comments: string; + /** + * Specifies the company of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + company: string; + /** + * Gets the creation date of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly creationDate: Date; + /** + * Specifies the format of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + format: string; + /** + * Specifies the keywords of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + keywords: string; + /** + * Gets the last author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly lastAuthor: string; + /** + * Gets the last print date of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly lastPrintDate: Date; + /** + * Gets the last save time of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly lastSaveTime: Date; + /** + * Specifies the manager of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + manager: string; + /** + * Gets the revision number of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly revisionNumber: string; + /** + * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly security: number; + /** + * Specifies the subject of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subject: string; + /** + * Gets the template of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly template: string; + /** + * Specifies the title of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + title: string; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.DocumentPropertiesUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.DocumentProperties): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.DocumentPropertiesLoadOptions): Word.DocumentProperties; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.DocumentProperties; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.DocumentProperties; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.DocumentProperties; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.DocumentProperties; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.DocumentProperties` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentPropertiesData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.DocumentPropertiesData; + } + /** + * The data specific to content controls of type DropDownList. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class DropDownListContentControl extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of list items in the dropdown list content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly listItems: Word.ContentControlListItemCollection; + /** + * Adds a new list item to this dropdown list content control and returns a {@link Word.ContentControlListItem} object. + * + * @remarks + * [Api set: WordApi 1.9] + * + * @param displayText - Required. Display text of the list item. + * @param value - Optional. Value of the list item. + * @param index - Optional. Index location of the new item in the list. If an item exists at the position specified, the existing item is pushed down in the list. If omitted, the new item is added to the end of the list. + */ + addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem; + /** + * Deletes all list items in this dropdown list content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + deleteAllListItems(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.DropDownListContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.DropDownListContentControl; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.DropDownListContentControl; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.DropDownListContentControl; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.DropDownListContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DropDownListContentControlData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.DropDownListContentControlData; + } + /** + * The data specific to content controls of type 'ComboBox'. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class ComboBoxContentControl extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of list items in the combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly listItems: Word.ContentControlListItemCollection; + /** + * Adds a new list item to this combo box content control and returns a {@link Word.ContentControlListItem} object. + * + * @remarks + * [Api set: WordApi 1.9] + * + * @param displayText - Required. Display text of the list item. + * @param value - Optional. Value of the list item. + * @param index - Optional. Index location of the new item in the list. If an item exists at the position specified, the existing item is pushed down in the list. If omitted, the new item is added to the end of the list. + */ + addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem; + /** + * Deletes all list items in this combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + deleteAllListItems(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ComboBoxContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ComboBoxContentControl; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ComboBoxContentControl; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ComboBoxContentControl; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ComboBoxContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ComboBoxContentControlData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ComboBoxContentControlData; + } + /** + * Represents a field. + * + * @remarks + * [Api set: WordApi 1.4] + * + * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField` API introduced in requirement set 1.5. + * Support for managing fields is similar to what's available in the Word UI. + * However, while the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}), + * the `Addin` field is editable. To learn more about Word UI clients that more fully support fields, + * see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. + */ + export class Field extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the parent body of the field. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentBody: Word.Body; + /** + * Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the table that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentTable: Word.Table; + /** + * Gets the table cell that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentTableCell: Word.TableCell; + /** + * Gets the table cell that contains the field. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * Gets the table that contains the field. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * Gets the field's result data. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly result: Word.Range; + /** + * Specifies the field's code instruction. + * + * @remarks + * [Api set: WordApi 1.4] + * + * Note: The ability to set the code was introduced in WordApi 1.5. + */ + code: string; + /** + * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. + * + * @remarks + * [Api set: WordApi 1.5] + */ + data: string; + /** + * Gets the field's kind. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly kind: Word.FieldKind | "None" | "Hot" | "Warm" | "Cold"; + /** + * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. + * + * @remarks + * [Api set: WordApi 1.5] + */ + locked: boolean; + + /** + * Gets the field's type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly type: Word.FieldType | "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined"; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.FieldUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Field): void; + /** + * Deletes the field. + * + * @remarks + * [Api set: WordApi 1.5] + */ + delete(): void; + /** + * Gets the next field. Throws an `ItemNotFound` error if this field is the last one. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getNext(): Word.Field; + /** + * Gets the next field. If this field is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getNextOrNullObject(): Word.Field; + /** + * Selects the field. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects the field. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param selectionModeString - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionModeString?: "Select" | "Start" | "End"): void; + /** + * Updates the field. + * + * @remarks + * [Api set: WordApi 1.5] + */ + updateResult(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.FieldLoadOptions): Word.Field; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Field; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Field; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Field; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Field; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Field` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FieldData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.FieldData; + } + /** + * Contains a collection of {@link Word.Field} objects. + * + * @remarks + * [Api set: WordApi 1.4] + * + * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField API` introduced in requirement set 1.5. + * Support for managing fields is similar to what's available in the Word UI. + * However, while the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}), + * the `Addin` field is editable. To learn more about Word UI clients that more fully support fields, + * see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. + */ + export class FieldCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.Field[]; + /** + * Gets the first field in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getFirst(): Word.Field; + /** + * Gets the first field in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getFirstOrNullObject(): Word.Field; + /** + * Gets the Field object collection including the specified types of fields. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param types - Required. An array of field types. + */ + getByTypes(types: Word.FieldType[]): Word.FieldCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.FieldCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.FieldCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.FieldCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.FieldCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.FieldCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.FieldCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.FieldCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FieldCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.FieldCollectionData; + } + /** + * Represents a font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class Font extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + bold: boolean; + /** + * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color: string; + /** + * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + doubleStrikeThrough: boolean; + /** + * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + highlightColor: string; + /** + * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + italic: boolean; + /** + * Specifies a value that represents the name of the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + name: string; + /** + * Specifies a value that represents the font size in points. + * + * @remarks + * [Api set: WordApi 1.1] + */ + size: number; + /** + * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + strikeThrough: boolean; + /** + * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + subscript: boolean; + /** + * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + superscript: boolean; + /** + * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. + * + * @remarks + * [Api set: WordApi 1.1] + */ + underline: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.FontUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Font): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.FontLoadOptions): Word.Font; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Font; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Font; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Font; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Font; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Font` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FontData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.FontData; + } + /** + * Represents an inline picture. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class InlinePicture extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the parent paragraph that contains the inline image. + * + * @remarks + * [Api set: WordApi 1.2] + */ + readonly paragraph: Word.Paragraph; + /** + * Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the table that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCell: Word.TableCell; + /** + * Gets the table cell that contains the inline image. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * Gets the table that contains the inline image. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * Specifies a string that represents the alternative text associated with the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextDescription: string; + /** + * Specifies a string that contains the title for the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextTitle: string; + /** + * Specifies a number that describes the height of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + height: number; + /** + * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.1] + */ + hyperlink: string; + + /** + * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lockAspectRatio: boolean; + /** + * Specifies a number that describes the width of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + width: number; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.InlinePictureUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.InlinePicture): void; + /** + * Deletes the inline picture from the document. + * + * @remarks + * [Api set: WordApi 1.2] + */ + delete(): void; + /** + * Gets the Base64-encoded string representation of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getBase64ImageSrc(): OfficeExtension.ClientResult; + /** + * Gets the next inline image. Throws an `ItemNotFound` error if this inline image is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNext(): Word.InlinePicture; + /** + * Gets the next inline image. If this inline image is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.InlinePicture; + /** + * Gets the picture, or the starting or ending point of the picture, as a range. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', or 'End'. + */ + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | "Whole" | "Start" | "End"): Word.Range; + /** + * Inserts a break at the specified location in the main document. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param breakType - Required. The break type to add. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + */ + insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; + /** + * Wraps the inline picture with a rich text content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + insertContentControl(): Word.ContentControl; + /** + * Inserts a document at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. + * + * @param base64File - Required. The Base64-encoded content of a .docx file. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; + /** + * Inserts HTML at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param html - Required. The HTML to be inserted. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + */ + insertHtml(html: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; + /** + * Inserts an inline picture at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. + * @param insertLocation - Required. The value must be 'Replace', 'Before', or 'After'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.before | Word.InsertLocation.after | "Replace" | "Before" | "After"): Word.InlinePicture; + /** + * Inserts OOXML at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param ooxml - Required. The OOXML to be inserted. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + */ + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param paragraphText - Required. The paragraph text to be inserted. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; + /** + * Inserts text at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param text - Required. Text to be inserted. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + */ + insertText(text: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; + /** + * Selects the inline picture. This causes Word to scroll to the selection. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects the inline picture. This causes Word to scroll to the selection. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param selectionModeString - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionModeString?: "Select" | "Start" | "End"): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.InlinePictureLoadOptions): Word.InlinePicture; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.InlinePicture; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.InlinePicture; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.InlinePicture; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.InlinePicture; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.InlinePicture` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.InlinePictureData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.InlinePictureData; + } + /** + * Contains a collection of {@link Word.InlinePicture} objects. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class InlinePictureCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.InlinePicture[]; + /** + * Gets the first inline image in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.InlinePicture; + /** + * Gets the first inline image in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.InlinePicture; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.InlinePictureCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.InlinePictureCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.InlinePictureCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.InlinePictureCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.InlinePictureCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.InlinePictureCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.InlinePictureCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.InlinePictureCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.InlinePictureCollectionData; + } + /** + * Contains a collection of {@link Word.Paragraph} objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class List extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets paragraphs in the list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly paragraphs: Word.ParagraphCollection; + /** + * Gets the list's id. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly id: number; + /** + * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly levelExistences: boolean[]; + /** + * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly levelTypes: Word.ListLevelType[]; + + /** + * Gets the paragraphs that occur at the specified level in the list. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param level - Required. The level in the list. + */ + getLevelParagraphs(level: number): Word.ParagraphCollection; + + /** + * Gets the bullet, number, or picture at the specified level as a string. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param level - Required. The level in the list. + */ + getLevelString(level: number): OfficeExtension.ClientResult; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param paragraphText - Required. The paragraph text to be inserted. + * @param insertLocation - Required. The value must be 'Start', 'End', 'Before', or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): Word.Paragraph; + + /** + * Sets the alignment of the bullet, number, or picture at the specified level in the list. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param level - Required. The level in the list. + * @param alignment - Required. The level alignment that must be 'Left', 'Centered', or 'Right'. + */ + setLevelAlignment(level: number, alignment: Word.Alignment): void; + /** + * Sets the alignment of the bullet, number, or picture at the specified level in the list. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param level - Required. The level in the list. + * @param alignmentString - Required. The level alignment that must be 'Left', 'Centered', or 'Right'. + */ + setLevelAlignment(level: number, alignmentString: "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"): void; + /** + * Sets the bullet format at the specified level in the list. If the bullet is 'Custom', the charCode is required. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param level - Required. The level in the list. + * @param listBullet - Required. The bullet. + * @param charCode - Optional. The bullet character's code value. Used only if the bullet is 'Custom'. + * @param fontName - Optional. The bullet's font name. Used only if the bullet is 'Custom'. + */ + setLevelBullet(level: number, listBullet: Word.ListBullet, charCode?: number, fontName?: string): void; + /** + * Sets the bullet format at the specified level in the list. If the bullet is 'Custom', the charCode is required. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param level - Required. The level in the list. + * @param listBulletString - Required. The bullet. + * @param charCode - Optional. The bullet character's code value. Used only if the bullet is 'Custom'. + * @param fontName - Optional. The bullet's font name. Used only if the bullet is 'Custom'. + */ + setLevelBullet(level: number, listBulletString: "Custom" | "Solid" | "Hollow" | "Square" | "Diamonds" | "Arrow" | "Checkmark", charCode?: number, fontName?: string): void; + /** + * Sets the two indents of the specified level in the list. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param level - Required. The level in the list. + * @param textIndent - Required. The text indent in points. It is the same as paragraph left indent. + * @param bulletNumberPictureIndent - Required. The relative indent, in points, of the bullet, number, or picture. It is the same as paragraph first line indent. + */ + setLevelIndents(level: number, textIndent: number, bulletNumberPictureIndent: number): void; + /** + * Sets the numbering format at the specified level in the list. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param level - Required. The level in the list. + * @param listNumbering - Required. The ordinal format. + * @param formatString - Optional. The numbering string format defined as an array of strings and/or integers. Each integer is a level of number type that is higher than or equal to this level. For example, an array of ["(", level - 1, ".", level, ")"] can define the format of "(2.c)", where 2 is the parent's item number and c is this level's item number. + */ + setLevelNumbering(level: number, listNumbering: Word.ListNumbering, formatString?: Array): void; + /** + * Sets the numbering format at the specified level in the list. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param level - Required. The level in the list. + * @param listNumberingString - Required. The ordinal format. + * @param formatString - Optional. The numbering string format defined as an array of strings and/or integers. Each integer is a level of number type that is higher than or equal to this level. For example, an array of ["(", level - 1, ".", level, ")"] can define the format of "(2.c)", where 2 is the parent's item number and c is this level's item number. + */ + setLevelNumbering(level: number, listNumberingString: "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter", formatString?: Array): void; + + /** + * Sets the starting number at the specified level in the list. Default value is 1. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param level - Required. The level in the list. + * @param startingNumber - Required. The number to start with. + */ + setLevelStartingNumber(level: number, startingNumber: number): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ListLoadOptions): Word.List; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.List; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.List; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.List; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.List; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.List` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ListData; + } + /** + * Contains a collection of {@link Word.List} objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class ListCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.List[]; + /** + * Gets a list by its identifier. Throws an `ItemNotFound` error if there isn't a list with the identifier in this collection. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param id - Required. A list identifier. + */ + getById(id: number): Word.List; + /** + * Gets a list by its identifier. If there isn't a list with the identifier in this collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param id - Required. A list identifier. + */ + getByIdOrNullObject(id: number): Word.List; + /** + * Gets the first list in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.List; + /** + * Gets the first list in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.List; + /** + * Gets a list object by its ID. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param id - The list's ID. + */ + getItem(id: number): Word.List; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ListCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ListCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ListCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ListCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ListCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ListCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.ListCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.ListCollectionData; + } + /** + * Represents the paragraph list item format. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class ListItem extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies the level of the item in the list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + level: number; + /** + * Gets the list item bullet, number, or picture as a string. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly listString: string; + /** + * Gets the list item order number in relation to its siblings. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly siblingIndex: number; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ListItemUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.ListItem): void; + /** + * Gets the list item parent, or the closest ancestor if the parent doesn't exist. Throws an `ItemNotFound` error if the list item has no ancestor. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param parentOnly - Optional. Specifies only the list item's parent will be returned. The default is false that specifies to get the lowest ancestor. + */ + getAncestor(parentOnly?: boolean): Word.Paragraph; + /** + * Gets the list item parent, or the closest ancestor if the parent doesn't exist. If the list item has no ancestor, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param parentOnly - Optional. Specifies only the list item's parent will be returned. The default is false that specifies to get the lowest ancestor. + */ + getAncestorOrNullObject(parentOnly?: boolean): Word.Paragraph; + /** + * Gets all descendant list items of the list item. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param directChildrenOnly - Optional. Specifies only the list item's direct children will be returned. The default is false that indicates to get all descendant items. + */ + getDescendants(directChildrenOnly?: boolean): Word.ParagraphCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ListItemLoadOptions): Word.ListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ListItem; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ListItem; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ListItem; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.ListItem` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListItemData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ListItemData; + } + + + + /** + * Represents a footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export class NoteItem extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly body: Word.Body; + /** + * Represents a footnote or endnote reference in the main document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly reference: Word.Range; + /** + * Represents the note item type: footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly type: Word.NoteItemType | "Footnote" | "Endnote"; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.NoteItemUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.NoteItem): void; + /** + * Deletes the note item. + * + * @remarks + * [Api set: WordApi 1.5] + */ + delete(): void; + /** + * Gets the next note item of the same type. Throws an `ItemNotFound` error if this note item is the last one. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getNext(): Word.NoteItem; + /** + * Gets the next note item of the same type. If this note item is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getNextOrNullObject(): Word.NoteItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.NoteItemLoadOptions): Word.NoteItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.NoteItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.NoteItem; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.NoteItem; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.NoteItem; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.NoteItem` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.NoteItemData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.NoteItemData; + } + /** + * Contains a collection of {@link Word.NoteItem} objects. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export class NoteItemCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.NoteItem[]; + /** + * Gets the first note item in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getFirst(): Word.NoteItem; + /** + * Gets the first note item in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getFirstOrNullObject(): Word.NoteItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.NoteItemCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.NoteItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.NoteItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.NoteItemCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.NoteItemCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.NoteItemCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.NoteItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.NoteItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.NoteItemCollectionData; + } + /** + * Represents a single paragraph in a selection, range, content control, or document body. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class Paragraph extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of content control objects in the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * Gets the collection of endnotes in the paragraph. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly endnotes: Word.NoteItemCollection; + /** + * Gets the collection of fields in the paragraph. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly fields: Word.FieldCollection; + /** + * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly font: Word.Font; + /** + * Gets the collection of footnotes in the paragraph. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly footnotes: Word.NoteItemCollection; + /** + * Gets the collection of InlinePicture objects in the paragraph. The collection doesn't include floating images. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly inlinePictures: Word.InlinePictureCollection; + /** + * Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph isn't in a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly list: Word.List; + /** + * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly listItem: Word.ListItem; + /** + * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly listItemOrNullObject: Word.ListItem; + /** + * Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly listOrNullObject: Word.List; + /** + * Gets the parent body of the paragraph. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentBody: Word.Body; + /** + * Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCell: Word.TableCell; + /** + * Gets the table cell that contains the paragraph. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * Gets the table that contains the paragraph. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * @remarks + * [Api set: WordApi 1.1] + */ + firstLineIndent: number; + /** + * Indicates the paragraph is the last one inside its parent body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly isLastParagraph: boolean; + /** + * Checks whether the paragraph is a list item. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly isListItem: boolean; + /** + * Specifies the left indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + leftIndent: number; + /** + * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineSpacing: number; + /** + * Specifies the amount of spacing, in grid lines, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitAfter: number; + /** + * Specifies the amount of spacing, in grid lines, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitBefore: number; + /** + * Specifies the outline level for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + outlineLevel: number; + /** + * Specifies the right indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + rightIndent: number; + /** + * Specifies the spacing, in points, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceAfter: number; + /** + * Specifies the spacing, in points, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceBefore: number; + /** + * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style: string; + /** + * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly tableNestingLevel: number; + /** + * Gets the text of the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly text: string; + /** + * Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. + * + * @remarks + * [Api set: WordApi 1.6] + */ + readonly uniqueLocalId: string; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ParagraphUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Paragraph): void; + /** + * Lets the paragraph join an existing list at the specified level. Fails if the paragraph cannot join the list or if the paragraph is already a list item. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param listId - Required. The ID of an existing list. + * @param level - Required. The level in the list. + */ + attachToList(listId: number, level: number): Word.List; + /** + * Clears the contents of the paragraph object. The user can perform the undo operation on the cleared content. + * + * @remarks + * [Api set: WordApi 1.1] + */ + clear(): void; + /** + * Deletes the paragraph and its content from the document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + delete(): void; + /** + * Moves this paragraph out of its list, if the paragraph is a list item. + * + * @remarks + * [Api set: WordApi 1.3] + */ + detachFromList(): void; + /** + * Gets annotations set on this Paragraph object. + * + * @remarks + * [Api set: WordApi 1.7] + */ + getAnnotations(): Word.AnnotationCollection; + /** + * Gets comments associated with the paragraph. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getComments(): Word.CommentCollection; + /** + * Gets the currently supported content controls in the paragraph. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. + * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. + * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. + * + * @param options - Optional. Options that define which content controls are returned. + */ + getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; + /** + * Gets an HTML representation of the paragraph object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Paragraph.getOoxml()` and convert the returned XML to HTML. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getHtml(): OfficeExtension.ClientResult; + /** + * Gets the next paragraph. Throws an `ItemNotFound` error if the paragraph is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNext(): Word.Paragraph; + /** + * Gets the next paragraph. If the paragraph is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.Paragraph; + /** + * Gets the Office Open XML (OOXML) representation of the paragraph object. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getOoxml(): OfficeExtension.ClientResult; + /** + * Gets the previous paragraph. Throws an `ItemNotFound` error if the paragraph is the first one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getPrevious(): Word.Paragraph; + /** + * Gets the previous paragraph. If the paragraph is the first one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getPreviousOrNullObject(): Word.Paragraph; + /** + * Gets the whole paragraph, or the starting or ending point of the paragraph, as a range. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. + */ + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersionString - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersionString?: "Original" | "Current"): OfficeExtension.ClientResult; + /** + * Returns the text of the paragraph. This excludes equations, graphics (e.g., images, videos, drawings), and special characters that mark various content (e.g., for content controls, fields, comments, footnotes, endnotes). + By default, hidden text and text marked as deleted are excluded. + * + * @remarks + * [Api set: WordApi 1.7] + * + * @param options - Optional. Options that define whether the final result should include hidden text and text marked as deleted. + */ + getText(options?: Word.GetTextOptions | { + IncludeHiddenText?: boolean; + IncludeTextMarkedAsDeleted?: boolean; + }): OfficeExtension.ClientResult; + /** + * Gets the text ranges in the paragraph by using punctuation marks and/or other ending marks. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. + * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. + */ + getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; + /** + * Gets the collection of the TrackedChange objects in the paragraph. + * + * @remarks + * [Api set: WordApi 1.6] + */ + getTrackedChanges(): Word.TrackedChangeCollection; + /** + * Inserts annotations on this Paragraph object. + * + * @remarks + * [Api set: WordApi 1.7] + * + * @param annotations - Annotations to set. + * @returns An array of the inserted annotations identifiers. + */ + insertAnnotations(annotations: Word.AnnotationSet): OfficeExtension.ClientResult; + /** + * Inserts a break at the specified location in the main document. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param breakType - Required. The break type to add to the document. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + */ + insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; + /** + * Wraps the Paragraph object with a content control. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. + * + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. + */ + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; + /** + * Inserts a document into the paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. + * + * @param base64File - Required. The Base64-encoded content of a .docx file. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts HTML into the paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param html - Required. The HTML to be inserted in the paragraph. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts a picture into the paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.InlinePicture; + /** + * Inserts OOXML into the paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param ooxml - Required. The OOXML to be inserted in the paragraph. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param paragraphText - Required. The paragraph text to be inserted. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; + /** + * Inserts a table with the specified number of rows and columns. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rowCount - Required. The number of rows in the table. + * @param columnCount - Required. The number of columns in the table. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; + /** + * Inserts text into the paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param text - Required. Text to be inserted. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Performs a search with the specified SearchOptions on the scope of the paragraph object. The search results are a collection of range objects. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param searchText - Required. The search text. + * @param searchOptions - Optional. Options for the search. + */ + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + /** + * Selects and navigates the Word UI to the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects and navigates the Word UI to the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionModeString - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionModeString?: "Select" | "Start" | "End"): void; + /** + * Splits the paragraph into child ranges by using delimiters. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param delimiters - Required. The delimiters as an array of strings. + * @param trimDelimiters - Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. + * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. + */ + split(delimiters: string[], trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; + /** + * Starts a new list with this paragraph. Fails if the paragraph is already a list item. + * + * @remarks + * [Api set: WordApi 1.3] + */ + startNewList(): Word.List; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ParagraphLoadOptions): Word.Paragraph; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Paragraph; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Paragraph; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Paragraph; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Paragraph; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Paragraph` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ParagraphData; + } + /** + * Contains a collection of {@link Word.Paragraph} objects. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class ParagraphCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.Paragraph[]; + /** + * Gets the first paragraph in this collection. Throws an `ItemNotFound` error if the collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.Paragraph; + /** + * Gets the first paragraph in this collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.Paragraph; + /** + * Gets the last paragraph in this collection. Throws an `ItemNotFound` error if the collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getLast(): Word.Paragraph; + /** + * Gets the last paragraph in this collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getLastOrNullObject(): Word.Paragraph; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ParagraphCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ParagraphCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ParagraphCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ParagraphCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ParagraphCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ParagraphCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.ParagraphCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.ParagraphCollectionData; + } + /** + * Represents a style of paragraph in a document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export class ParagraphFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies the alignment for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * @remarks + * [Api set: WordApi 1.5] + */ + firstLineIndent: number; + /** + * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepTogether: boolean; + /** + * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepWithNext: boolean; + /** + * Specifies the left indent. + * + * @remarks + * [Api set: WordApi 1.5] + */ + leftIndent: number; + /** + * Specifies the line spacing (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineSpacing: number; + /** + * Specifies the amount of spacing (in gridlines) after the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitAfter: number; + /** + * Specifies the amount of spacing (in gridlines) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitBefore: number; + /** + * Specifies whether left and right indents are the same width. + * + * @remarks + * [Api set: WordApi 1.5] + */ + mirrorIndents: boolean; + /** + * Specifies the outline level for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; + /** + * Specifies the right indent (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + rightIndent: number; + /** + * Specifies the amount of spacing (in points) after the specified paragraph or text column. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceAfter: number; + /** + * Specifies the spacing (in points) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceBefore: number; + /** + * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + widowControl: boolean; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ParagraphFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.ParagraphFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ParagraphFormatLoadOptions): Word.ParagraphFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ParagraphFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ParagraphFormat; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ParagraphFormat; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ParagraphFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.ParagraphFormat` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ParagraphFormatData; + } + /** + * Represents a contiguous area in a document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class Range extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of content control objects in the range. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * Gets the collection of endnotes in the range. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly endnotes: Word.NoteItemCollection; + /** + * Gets the collection of field objects in the range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly fields: Word.FieldCollection; + /** + * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly font: Word.Font; + /** + * Gets the collection of footnotes in the range. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly footnotes: Word.NoteItemCollection; + /** + * Gets the collection of inline picture objects in the range. + * + * @remarks + * [Api set: WordApi 1.2] + */ + readonly inlinePictures: Word.InlinePictureCollection; + /** + * Gets the collection of list objects in the range. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly lists: Word.ListCollection; + /** + * Gets the collection of paragraph objects in the range. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Important: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this range aren't returned. From requirement set 1.3, paragraphs in such tables are also returned. + */ + readonly paragraphs: Word.ParagraphCollection; + /** + * Gets the parent body of the range. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentBody: Word.Body; + /** + * Gets the currently supported content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the currently supported content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the table that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the table cell that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCell: Word.TableCell; + /** + * Gets the table cell that contains the range. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * Gets the table that contains the range. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * Gets the collection of table objects in the range. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly tables: Word.TableCollection; + /** + * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.3] + */ + hyperlink: string; + /** + * Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly isEmpty: boolean; + /** + * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style: string; + /** + * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * Gets the text of the range. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly text: string; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.RangeUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Range): void; + /** + * Clears the contents of the range object. The user can perform the undo operation on the cleared content. + * + * @remarks + * [Api set: WordApi 1.1] + */ + clear(): void; + /** + * Compares this range's location with another range's location. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param range - Required. The range to compare with this range. + */ + compareLocationWith(range: Word.Range): OfficeExtension.ClientResult; + /** + * Deletes the range and its content from the document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + delete(): void; + /** + * Returns a new range that extends from this range in either direction to cover another range. This range isn't changed. Throws an `ItemNotFound` error if the two ranges do not have a union. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param range - Required. Another range. + */ + expandTo(range: Word.Range): Word.Range; + /** + * Returns a new range that extends from this range in either direction to cover another range. This range isn't changed. If the two ranges don't have a union, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param range - Required. Another range. + */ + expandToOrNullObject(range: Word.Range): Word.Range; + /** + * Gets the names all bookmarks in or overlapping the range. A bookmark is hidden if its name starts with the underscore character. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param includeHidden - Optional. Indicates whether to include hidden bookmarks. Default is false which indicates that the hidden bookmarks are excluded. + * @param includeAdjacent - Optional. Indicates whether to include bookmarks that are adjacent to the range. Default is false which indicates that the adjacent bookmarks are excluded. + */ + getBookmarks(includeHidden?: boolean, includeAdjacent?: boolean): OfficeExtension.ClientResult; + /** + * Gets comments associated with the range. + * + * @remarks + * [Api set: WordApi 1.4] + * @returns + */ + getComments(): Word.CommentCollection; + /** + * Gets the currently supported content controls in the range. + * + * @remarks + * [Api set: WordApi 1.5] + * + * **Important**: If specific types are provided in the options parameter, only content controls of supported types are returned. + * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. + * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. + * + * @param options - Optional. Options that define which content controls are returned. + */ + getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; + /** + * Gets an HTML representation of the range object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Range.getOoxml()` and convert the returned XML to HTML. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getHtml(): OfficeExtension.ClientResult; + /** + * Gets hyperlink child ranges within the range. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getHyperlinkRanges(): Word.RangeCollection; + /** + * Gets the next text range by using punctuation marks and/or other ending marks. Throws an `ItemNotFound` error if this text range is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. + * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the returned range. Default is false which indicates that spacing characters at the start and end of the range are included. + */ + getNextTextRange(endingMarks: string[], trimSpacing?: boolean): Word.Range; + /** + * Gets the next text range by using punctuation marks and/or other ending marks. If this text range is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. + * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the returned range. Default is false which indicates that spacing characters at the start and end of the range are included. + */ + getNextTextRangeOrNullObject(endingMarks: string[], trimSpacing?: boolean): Word.Range; + /** + * Gets the OOXML representation of the range object. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getOoxml(): OfficeExtension.ClientResult; + /** + * Clones the range, or gets the starting or ending point of the range as a new range. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. + */ + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersionString - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersionString?: "Original" | "Current"): OfficeExtension.ClientResult; + /** + * Gets the text child ranges in the range by using punctuation marks and/or other ending marks. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. + * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. + */ + getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; + /** + * Gets the collection of the TrackedChange objects in the range. + * + * @remarks + * [Api set: WordApi 1.6] + */ + getTrackedChanges(): Word.TrackedChangeCollection; + /** + * Highlights the range temporarily without changing document content. + To highlight the text permanently, set the range's Font.HighlightColor. + * + * @remarks + * [Api set: WordApi 1.8] + */ + highlight(): void; + /** + * Inserts a bookmark on the range. If a bookmark of the same name exists somewhere, it is deleted first. + * + * @remarks + * [Api set: WordApi 1.4] + * + * Note: The conditions of inserting a bookmark are similar to doing so in the Word UI. To learn more about managing bookmarks in the Word UI, see {@link https://support.microsoft.com/office/f68d781f-0150-4583-a90e-a4009d99c2a0 | Add or delete bookmarks in a Word document or Outlook message}. + * + * @param name - Required. The case-insensitive bookmark name. Only alphanumeric and underscore characters are supported. It must begin with a letter but if you want to tag the bookmark as hidden, then start the name with an underscore character. Names can't be longer than 40 characters. + */ + insertBookmark(name: string): void; + /** + * Inserts a break at the specified location in the main document. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param breakType - Required. The break type to add. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + */ + insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; + /** + * Insert a comment on the range. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param commentText - Required. The comment text to be inserted. + * @returns comment object + */ + insertComment(commentText: string): Word.Comment; + /** + * Wraps the Range object with a content control. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. + * + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. + */ + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; + /** + * Inserts an endnote. The endnote reference is placed after the range. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param insertText - Optional. Text to be inserted into the endnote body. The default is "". + */ + insertEndnote(insertText?: string): Word.NoteItem; + /** + * Inserts a field at the specified location. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Important: + * + * In Word on Windows and on Mac, the API supports inserting and managing all types listed in {@link Word.FieldType} except `Word.FieldType.others`. + * + * In Word on the web, the API supports inserting and managing the following field types. + * + * - `Word.FieldType.addin` + * + * - `Word.FieldType.date` + * + * - `Word.FieldType.hyperlink` + * + * - `Word.FieldType.toc` + * + * @param insertLocation - Required. The location relative to the range where the field will be inserted. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + * @param fieldType - Optional. Can be any FieldType constant. The default value is Empty. + * @param text - Optional. Additional properties or options if needed for specified field type. + * @param removeFormatting - Optional. `true` to remove the formatting that's applied to the field during updates, `false` otherwise. The default value is `false`. + */ + insertField(insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After", fieldType?: Word.FieldType, text?: string, removeFormatting?: boolean): Word.Field; + /** + * Inserts a field at the specified location. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Important: + * + * In Word on Windows and on Mac, the API supports inserting and managing all types listed in {@link Word.FieldType} except `Word.FieldType.others`. + * + * In Word on the web, the API supports inserting and managing the following field types. + * + * - `Word.FieldType.addin` + * + * - `Word.FieldType.date` + * + * - `Word.FieldType.hyperlink` + * + * - `Word.FieldType.toc` + * + * @param insertLocation - Required. The location relative to the range where the field will be inserted. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + * @param fieldTypeString - Optional. Can be any FieldType constant. The default value is Empty. + * @param text - Optional. Additional properties or options if needed for specified field type. + * @param removeFormatting - Optional. `true` to remove the formatting that's applied to the field during updates, `false` otherwise. The default value is `false`. + */ + insertField(insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After", fieldTypeString?: "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined", text?: string, removeFormatting?: boolean): Word.Field; + /** + * Inserts a document at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. + * + * @param base64File - Required. The Base64-encoded content of a .docx file. + * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; + /** + * Inserts a footnote. The footnote reference is placed after the range. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param insertText - Optional. Text to be inserted into the footnote body. The default is "". + */ + insertFootnote(insertText?: string): Word.NoteItem; + /** + * Inserts HTML at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param html - Required. The HTML to be inserted. + * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertHtml(html: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; + /** + * Inserts a picture at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. + * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.InlinePicture; + /** + * Inserts OOXML at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param ooxml - Required. The OOXML to be inserted. + * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param paragraphText - Required. The paragraph text to be inserted. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; + /** + * Inserts a table with the specified number of rows and columns. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rowCount - Required. The number of rows in the table. + * @param columnCount - Required. The number of columns in the table. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; + /** + * Inserts text at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param text - Required. Text to be inserted. + * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertText(text: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; + /** + * Returns a new range as the intersection of this range with another range. This range isn't changed. Throws an `ItemNotFound` error if the two ranges aren't overlapped or adjacent. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param range - Required. Another range. + */ + intersectWith(range: Word.Range): Word.Range; + /** + * Returns a new range as the intersection of this range with another range. This range isn't changed. If the two ranges aren't overlapped or adjacent, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param range - Required. Another range. + */ + intersectWithOrNullObject(range: Word.Range): Word.Range; + /** + * Removes the highlight added by the Highlight function if any. + * + * @remarks + * [Api set: WordApi 1.8] + */ + removeHighlight(): void; + /** + * Performs a search with the specified SearchOptions on the scope of the range object. The search results are a collection of range objects. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param searchText - Required. The search text. + * @param searchOptions - Optional. Options for the search. + */ + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + /** + * Selects and navigates the Word UI to the range. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects and navigates the Word UI to the range. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionModeString - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionModeString?: "Select" | "Start" | "End"): void; + /** + * Splits the range into child ranges by using delimiters. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param delimiters - Required. The delimiters as an array of strings. + * @param multiParagraphs - Optional. Indicates whether a returned child range can cover multiple paragraphs. Default is false which indicates that the paragraph boundaries are also used as delimiters. + * @param trimDelimiters - Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. + * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. + */ + split(delimiters: string[], multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.RangeLoadOptions): Word.Range; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Range; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Range; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Range; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Range; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Range` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.RangeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.RangeData; + } + /** + * Contains a collection of {@link Word.Range} objects. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class RangeCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.Range[]; + /** + * Gets the first range in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.Range; + /** + * Gets the first range in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.Range; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.RangeCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.RangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.RangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.RangeCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.RangeCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.RangeCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.RangeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.RangeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.RangeCollectionData; + } + /** + * Specifies the options to determine what to copy when inserting a file. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export interface InsertFileOptions { + /** + * Represents whether the change tracking mode status from the source document should be imported. + * + * @remarks + * [Api set: WordApi 1.5] + */ + importChangeTrackingMode?: boolean; + /** + * Represents whether the custom properties from the source document should be imported. Overwrites existing properties with the same name. + * + * @remarks + * [Api set: WordApi 1.6] + */ + importCustomProperties?: boolean; + /** + * Represents whether the custom XML parts from the source document should be imported. + * + * @remarks + * [Api set: WordApi 1.6] + */ + importCustomXmlParts?: boolean; + /** + * Represents whether to import the Different Odd and Even Pages setting for the header and footer from the source document. + * + * @remarks + * [Api set: WordApi 1.7] + */ + importDifferentOddEvenPages?: boolean; + /** + * Represents whether the page color and other background information from the source document should be imported. + * + * @remarks + * [Api set: WordApi 1.5] + */ + importPageColor?: boolean; + /** + * Represents whether the paragraph spacing from the source document should be imported. + * + * @remarks + * [Api set: WordApi 1.5] + */ + importParagraphSpacing?: boolean; + /** + * Represents whether the styles from the source document should be imported. + * + * @remarks + * [Api set: WordApi 1.5] + */ + importStyles?: boolean; + /** + * Represents whether the theme from the source document should be imported. + * + * @remarks + * [Api set: WordApi 1.5] + */ + importTheme?: boolean; + } + /** + * Specifies the options to be included in a search operation. + To learn more about how to use search options in the Word JavaScript APIs, read {@link https://learn.microsoft.com/office/dev/add-ins/word/search-option-guidance | Use search options to find text in your Word add-in}. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class SearchOptions extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignorePunct: boolean; + /** + * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignoreSpace: boolean; + /** + * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchCase: boolean; + /** + * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchPrefix: boolean; + /** + * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchSuffix: boolean; + /** + * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWholeWord: boolean; + /** + * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWildcards: boolean; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.SearchOptionsUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.SearchOptions): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.SearchOptionsLoadOptions): Word.SearchOptions; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.SearchOptions; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.SearchOptions; + /** + * Create a new instance of the `Word.SearchOptions` object. + */ + static newObject(context: OfficeExtension.ClientRequestContext): Word.SearchOptions; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.SearchOptions` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SearchOptionsData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.SearchOptionsData; + } + /** + * Specifies the options to be included in a getText operation. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export interface GetTextOptions { + /** + * Specifies a value that indicates whether to include hidden text in the result of the GetText method. The default value is False. + * + * @remarks + * [Api set: WordApi 1.7] + */ + includeHiddenText?: boolean; + /** + * Specifies a value that indicates whether to include text marked as deleted in the result of the GetText method. The default value is False. + * + * @remarks + * [Api set: WordApi 1.7] + */ + includeTextMarkedAsDeleted?: boolean; + } + + /** + * Represents a section in a Word document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class Section extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the body object of the section. This doesn't include the header/footer and other section metadata. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly body: Word.Body; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.SectionUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Section): void; + /** + * Gets one of the section's footers. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param type - Required. The type of footer to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. + */ + getFooter(type: Word.HeaderFooterType): Word.Body; + /** + * Gets one of the section's footers. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param typeString - Required. The type of footer to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. + */ + getFooter(typeString: "Primary" | "FirstPage" | "EvenPages"): Word.Body; + /** + * Gets one of the section's headers. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param type - Required. The type of header to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. + */ + getHeader(type: Word.HeaderFooterType): Word.Body; + /** + * Gets one of the section's headers. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param typeString - Required. The type of header to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. + */ + getHeader(typeString: "Primary" | "FirstPage" | "EvenPages"): Word.Body; + /** + * Gets the next section. Throws an `ItemNotFound` error if this section is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNext(): Word.Section; + /** + * Gets the next section. If this section is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.Section; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.SectionLoadOptions): Word.Section; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Section; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Section; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Section; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Section; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Section` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SectionData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.SectionData; + } + /** + * Contains the collection of the document's {@link Word.Section} objects. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class SectionCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.Section[]; + /** + * Gets the first section in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.Section; + /** + * Gets the first section in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.Section; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.SectionCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.SectionCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.SectionCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.SectionCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.SectionCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.SectionCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.SectionCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SectionCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.SectionCollectionData; + } + /** + * Represents a setting of the add-in. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export class Setting extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the key of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly key: string; + /** + * Specifies the value of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + value: any; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.SettingUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Setting): void; + /** + * Deletes the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + delete(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.SettingLoadOptions): Word.Setting; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Setting; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Setting; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Setting; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Setting; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Setting` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SettingData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.SettingData; + } + /** + * Contains the collection of {@link Word.Setting} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export class SettingCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.Setting[]; + /** + * Creates a new setting or sets an existing setting. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param key - Required. The setting's key, which is case-sensitive. + * @param value - Required. The setting's value. + */ + add(key: string, value: any): Word.Setting; + /** + * Deletes all settings in this add-in. + * + * @remarks + * [Api set: WordApi 1.4] + */ + deleteAll(): void; + /** + * Gets the count of settings. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a setting object by its key, which is case-sensitive. Throws an `ItemNotFound` error if the setting doesn't exist. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param key - The key that identifies the setting object. + */ + getItem(key: string): Word.Setting; + /** + * Gets a setting object by its key, which is case-sensitive. If the setting doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param key - Required. The key that identifies the setting object. + */ + getItemOrNullObject(key: string): Word.Setting; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.SettingCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.SettingCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.SettingCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.SettingCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.SettingCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.SettingCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.SettingCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SettingCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.SettingCollectionData; + } + /** + * Contains a collection of {@link Word.Style} objects. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export class StyleCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.Style[]; + /** + * Get the style object by its name. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param name - Required. The style name. + */ + getByName(name: string): Word.Style; + /** + * If the corresponding style doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param name - Required. The style name. + */ + getByNameOrNullObject(name: string): Word.Style; + /** + * Gets the number of the styles in the collection. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a style object by its index in the collection. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param index - A number that identifies the index location of a style object. + */ + getItem(index: number): Word.Style; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.StyleCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.StyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.StyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.StyleCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.StyleCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.StyleCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.StyleCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.StyleCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.StyleCollectionData; + } + /** + * Represents a style in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class Style extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + + /** + * Gets a font object that represents the character formatting of the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly font: Word.Font; + + /** + * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly paragraphFormat: Word.ParagraphFormat; + /** + * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. + * + * @remarks + * [Api set: WordApi 1.6] + */ + readonly shading: Word.Shading; + /** + * Gets a TableStyle object representing Style properties that can be applied to a table. + * + * @remarks + * [Api set: WordApi 1.6] + */ + readonly tableStyle: Word.TableStyle; + /** + * Specifies the name of an existing style to use as the base formatting of another style. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. + */ + baseStyle: string; + /** + * Gets whether the specified style is a built-in style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly builtIn: boolean; + /** + * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly inUse: boolean; + /** + * Gets whether a style is a linked style that can be used for both paragraph and character formatting. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly linked: boolean; + /** + * Gets the name of a style in the language of the user. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly nameLocal: string; + /** + * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. + */ + nextParagraphStyle: string; + /** + * Specifies the priority. + * + * @remarks + * [Api set: WordApi 1.5] + */ + priority: number; + /** + * Specifies whether the style corresponds to an available quick style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + quickStyle: boolean; + /** + * Gets the style type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly type: Word.StyleType | "Character" | "List" | "Paragraph" | "Table"; + /** + * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + unhideWhenUsed: boolean; + /** + * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. + * + * @remarks + * [Api set: WordApi 1.5] + */ + visibility: boolean; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.StyleUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Style): void; + /** + * Deletes the style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + delete(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.StyleLoadOptions): Word.Style; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Style; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Style; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Style; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Style; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Style` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.StyleData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.StyleData; + } + /** + * Represents the shading object. + * + * @remarks + * [Api set: WordApi 1.6] + */ + export class Shading extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi 1.6] + */ + backgroundPatternColor: string; + + + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ShadingUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Shading): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ShadingLoadOptions): Word.Shading; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Shading; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Shading; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Shading; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Shading; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Shading` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShadingData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ShadingData; + } + /** + * Represents a table in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class Table extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of endnotes in the table. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly endnotes: Word.NoteItemCollection; + /** + * Gets the collection of field objects in the table. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly fields: Word.FieldCollection; + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly font: Word.Font; + /** + * Gets the collection of footnotes in the table. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly footnotes: Word.NoteItemCollection; + /** + * Gets the parent body of the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentBody: Word.Body; + /** + * Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the table that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the table cell that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCell: Word.TableCell; + /** + * Gets the table cell that contains this table. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * Gets the table that contains this table. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * Gets all of the table rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly rows: Word.TableRowCollection; + /** + * Gets the child tables nested one level deeper. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly tables: Word.TableCollection; + /** + * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the number of header rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + headerRowCount: number; + /** + * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Indicates whether all of the table rows are uniform. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly isUniform: boolean; + /** + * Gets the nesting level of the table. Top-level tables have level 1. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly nestingLevel: number; + /** + * Gets the number of rows in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly rowCount: number; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor: string; + /** + * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + style: string; + /** + * Specifies whether the table has banded columns. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedColumns: boolean; + /** + * Specifies whether the table has banded rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedRows: boolean; + /** + * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * Specifies whether the table has a first column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleFirstColumn: boolean; + /** + * Specifies whether the table has a last column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleLastColumn: boolean; + /** + * Specifies whether the table has a total (last) row with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleTotalRow: boolean; + /** + * Specifies the text values in the table, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values: string[][]; + /** + * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * Specifies the width of the table in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width: number; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.TableUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Table): void; + /** + * Adds columns to the start or end of the table, using the first or last existing column as a template. This is applicable to uniform tables. The string values, if specified, are set in the newly inserted rows. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param insertLocation - Required. It must be 'Start' or 'End', corresponding to the appropriate side of the table. + * @param columnCount - Required. Number of columns to add. + * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + addColumns(insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End", columnCount: number, values?: string[][]): void; + /** + * Adds rows to the start or end of the table, using the first or last existing row as a template. The string values, if specified, are set in the newly inserted rows. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param insertLocation - Required. It must be 'Start' or 'End'. + * @param rowCount - Required. Number of rows to add. + * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + addRows(insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End", rowCount: number, values?: string[][]): Word.TableRowCollection; + /** + * Autofits the table columns to the width of the window. + * + * @remarks + * [Api set: WordApi 1.3] + */ + autoFitWindow(): void; + /** + * Clears the contents of the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + clear(): void; + /** + * Deletes the entire table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + delete(): void; + /** + * Deletes specific columns. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param columnIndex - Required. The first column to delete. + * @param columnCount - Optional. The number of columns to delete. Default 1. + */ + deleteColumns(columnIndex: number, columnCount?: number): void; + /** + * Deletes specific rows. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rowIndex - Required. The first row to delete. + * @param rowCount - Optional. The number of rows to delete. Default 1. + */ + deleteRows(rowIndex: number, rowCount?: number): void; + /** + * Distributes the column widths evenly. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + */ + distributeColumns(): void; + /** + * Gets the border style for the specified border. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param borderLocation - Required. The border location. + */ + getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; + /** + * Gets the border style for the specified border. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param borderLocationString - Required. The border location. + */ + getBorder(borderLocationString: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"): Word.TableBorder; + /** + * Gets the table cell at a specified row and column. Throws an `ItemNotFound` error if the specified table cell doesn't exist. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rowIndex - Required. The index of the row. + * @param cellIndex - Required. The index of the cell in the row. + */ + getCell(rowIndex: number, cellIndex: number): Word.TableCell; + /** + * Gets the table cell at a specified row and column. If the specified table cell doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rowIndex - Required. The index of the row. + * @param cellIndex - Required. The index of the cell in the row. + */ + getCellOrNullObject(rowIndex: number, cellIndex: number): Word.TableCell; + /** + * Gets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; + /** + * Gets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocationString - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocationString: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; + /** + * Gets the next table. Throws an `ItemNotFound` error if this table is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNext(): Word.Table; + /** + * Gets the next table. If this table is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.Table; + /** + * Gets the paragraph after the table. Throws an `ItemNotFound` error if there isn't a paragraph after the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getParagraphAfter(): Word.Paragraph; + /** + * Gets the paragraph after the table. If there isn't a paragraph after the table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getParagraphAfterOrNullObject(): Word.Paragraph; + /** + * Gets the paragraph before the table. Throws an `ItemNotFound` error if there isn't a paragraph before the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getParagraphBefore(): Word.Paragraph; + /** + * Gets the paragraph before the table. If there isn't a paragraph before the table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getParagraphBeforeOrNullObject(): Word.Paragraph; + /** + * Gets the range that contains this table, or the range at the start or end of the table. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', or 'After'. + */ + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | "Whole" | "Start" | "End" | "After"): Word.Range; + /** + * Inserts a content control on the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + insertContentControl(): Word.ContentControl; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param paragraphText - Required. The paragraph text to be inserted. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; + /** + * Inserts a table with the specified number of rows and columns. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rowCount - Required. The number of rows in the table. + * @param columnCount - Required. The number of columns in the table. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; + /** + * Merges the cells bounded inclusively by a first and last cell. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param topRow - Required. The row of the first cell + * @param firstCell - Required. The index of the first cell in its row + * @param bottomRow - Required. The row of the last cell + * @param lastCell - Required. The index of the last cell in its row + */ + mergeCells(topRow: number, firstCell: number, bottomRow: number, lastCell: number): Word.TableCell; + /** + * Performs a search with the specified SearchOptions on the scope of the table object. The search results are a collection of range objects. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param searchText - Required. The search text. + * @param searchOptions - Optional. Options for the search. + */ + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + /** + * Selects the table, or the position at the start or end of the table, and navigates the Word UI to it. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects the table, or the position at the start or end of the table, and navigates the Word UI to it. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param selectionModeString - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionModeString?: "Select" | "Start" | "End"): void; + /** + * Sets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + * @param cellPadding - Required. The cell padding. + */ + setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; + /** + * Sets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocationString - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + * @param cellPadding - Required. The cell padding. + */ + setCellPadding(cellPaddingLocationString: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableLoadOptions): Word.Table; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Table; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Table; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Table; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Table; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Table` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.TableData; + } + /** + * Represents the TableStyle object. + * + * @remarks + * [Api set: WordApi 1.6] + */ + export class TableStyle extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + + + /** + * Specifies the amount of space to add between the contents and the bottom borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + bottomCellMargin: number; + /** + * Specifies the spacing (in points) between the cells in a table style. + * + * @remarks + * [Api set: WordApi 1.6] + */ + cellSpacing: number; + /** + * Specifies the amount of space to add between the contents and the left borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + leftCellMargin: number; + /** + * Specifies the amount of space to add between the contents and the right borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + rightCellMargin: number; + /** + * Specifies the amount of space to add between the contents and the top borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + topCellMargin: number; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.TableStyleUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.TableStyle): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableStyleLoadOptions): Word.TableStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.TableStyle; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableStyle; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.TableStyle; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.TableStyle` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableStyleData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.TableStyleData; + } + /** + * Contains the collection of the document's Table objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class TableCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.Table[]; + /** + * Gets the first table in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.Table; + /** + * Gets the first table in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.Table; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.TableCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.TableCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.TableCollectionData; + } + /** + * Represents a row in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class TableRow extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets cells. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly cells: Word.TableCellCollection; + /** + * Gets the collection of endnotes in the table row. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly endnotes: Word.NoteItemCollection; + /** + * Gets the collection of field objects in the table row. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly fields: Word.FieldCollection; + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly font: Word.Font; + /** + * Gets the collection of footnotes in the table row. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly footnotes: Word.NoteItemCollection; + /** + * Gets parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the number of cells in the row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly cellCount: number; + /** + * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly isHeader: boolean; + /** + * Specifies the preferred height of the row in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + preferredHeight: number; + /** + * Gets the index of the row in its parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly rowIndex: number; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor: string; + /** + * Specifies the text values in the row, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values: string[][]; + /** + * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.TableRowUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.TableRow): void; + /** + * Clears the contents of the row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + clear(): void; + /** + * Deletes the entire row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + delete(): void; + /** + * Gets the border style of the cells in the row. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param borderLocation - Required. The border location. + */ + getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; + /** + * Gets the border style of the cells in the row. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param borderLocationString - Required. The border location. + */ + getBorder(borderLocationString: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"): Word.TableBorder; + /** + * Gets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; + /** + * Gets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocationString - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocationString: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; + /** + * Gets the next row. Throws an `ItemNotFound` error if this row is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNext(): Word.TableRow; + /** + * Gets the next row. If this row is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.TableRow; + + /** + * Inserts rows using this row as a template. If values are specified, inserts the values into the new rows. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param insertLocation - Required. Where the new rows should be inserted, relative to the current row. It must be 'Before' or 'After'. + * @param rowCount - Required. Number of rows to add + * @param values - Optional. Strings to insert in the new rows, specified as a 2D array. The number of cells in each row must not exceed the number of cells in the existing row. + */ + insertRows(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", rowCount: number, values?: string[][]): Word.TableRowCollection; + /** + * Merges the row into one cell. + * + * @remarks + * [Api set: WordApi 1.4] + */ + merge(): Word.TableCell; + /** + * Performs a search with the specified SearchOptions on the scope of the row. The search results are a collection of range objects. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param searchText - Required. The search text. + * @param searchOptions - Optional. Options for the search. + */ + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + /** + * Selects the row and navigates the Word UI to it. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects the row and navigates the Word UI to it. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param selectionModeString - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionModeString?: "Select" | "Start" | "End"): void; + /** + * Sets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + * @param cellPadding - Required. The cell padding. + */ + setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; + /** + * Sets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocationString - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + * @param cellPadding - Required. The cell padding. + */ + setCellPadding(cellPaddingLocationString: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableRowLoadOptions): Word.TableRow; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableRow; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.TableRow; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableRow; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.TableRow; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.TableRow` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableRowData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.TableRowData; + } + /** + * Contains the collection of the document's TableRow objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class TableRowCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.TableRow[]; + /** + * Gets the first row in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.TableRow; + /** + * Gets the first row in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.TableRow; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableRowCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableRowCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableRowCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableRowCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableRowCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.TableRowCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.TableRowCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableRowCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.TableRowCollectionData; + } + /** + * Represents a table cell in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class TableCell extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the body object of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly body: Word.Body; + /** + * Gets the parent row of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentRow: Word.TableRow; + /** + * Gets the parent table of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the index of the cell in its row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly cellIndex: number; + /** + * Specifies the width of the cell's column in points. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + */ + columnWidth: number; + /** + * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Gets the index of the cell's row in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly rowIndex: number; + /** + * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor: string; + /** + * Specifies the text of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + value: string; + /** + * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * Gets the width of the cell in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly width: number; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.TableCellUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.TableCell): void; + /** + * Deletes the column containing this cell. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + */ + deleteColumn(): void; + /** + * Deletes the row containing this cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + deleteRow(): void; + /** + * Gets the border style for the specified border. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param borderLocation - Required. The border location. + */ + getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; + /** + * Gets the border style for the specified border. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param borderLocationString - Required. The border location. + */ + getBorder(borderLocationString: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"): Word.TableBorder; + /** + * Gets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; + /** + * Gets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocationString - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocationString: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; + /** + * Gets the next cell. Throws an `ItemNotFound` error if this cell is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNext(): Word.TableCell; + /** + * Gets the next cell. If this cell is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.TableCell; + /** + * Adds columns to the left or right of the cell, using the cell's column as a template. This is applicable to uniform tables. The string values, if specified, are set in the newly inserted rows. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param insertLocation - Required. It must be 'Before' or 'After'. + * @param columnCount - Required. Number of columns to add. + * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertColumns(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", columnCount: number, values?: string[][]): void; + /** + * Inserts rows above or below the cell, using the cell's row as a template. The string values, if specified, are set in the newly inserted rows. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param insertLocation - Required. It must be 'Before' or 'After'. + * @param rowCount - Required. Number of rows to add. + * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertRows(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", rowCount: number, values?: string[][]): Word.TableRowCollection; + /** + * Sets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + * @param cellPadding - Required. The cell padding. + */ + setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; + /** + * Sets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocationString - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + * @param cellPadding - Required. The cell padding. + */ + setCellPadding(cellPaddingLocationString: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void; + /** + * Splits the cell into the specified number of rows and columns. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param rowCount - Required. The number of rows to split into. Must be a divisor of the number of underlying rows. + * @param columnCount - Required. The number of columns to split into. + */ + split(rowCount: number, columnCount: number): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableCellLoadOptions): Word.TableCell; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableCell; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.TableCell; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableCell; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.TableCell; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.TableCell` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCellData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.TableCellData; + } + /** + * Contains the collection of the document's TableCell objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class TableCellCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.TableCell[]; + /** + * Gets the first table cell in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.TableCell; + /** + * Gets the first table cell in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.TableCell; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableCellCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableCellCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableCellCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableCellCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableCellCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.TableCellCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.TableCellCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCellCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.TableCellCollectionData; + } + /** + * Specifies the border style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class TableBorder extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies the table border color. + * + * @remarks + * [Api set: WordApi 1.3] + */ + color: string; + /** + * Specifies the type of the table border. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; + /** + * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width: number; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.TableBorderUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.TableBorder): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableBorderLoadOptions): Word.TableBorder; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableBorder; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.TableBorder; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableBorder; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.TableBorder; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.TableBorder` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableBorderData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.TableBorderData; + } + /** + * Represents a tracked change in a Word document. + * + * @remarks + * [Api set: WordApi 1.6] + */ + export class TrackedChange extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the author of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + readonly author: string; + /** + * Gets the date of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + readonly date: Date; + /** + * Gets the text of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + readonly text: string; + /** + * Gets the type of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + readonly type: Word.TrackedChangeType | "None" | "Added" | "Deleted" | "Formatted"; + /** + * Accepts the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + accept(): void; + /** + * Gets the next tracked change. Throws an `ItemNotFound` error if this tracked change is the last one. + * + * @remarks + * [Api set: WordApi 1.6] + */ + getNext(): Word.TrackedChange; + /** + * Gets the next tracked change. If this tracked change is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.6] + */ + getNextOrNullObject(): Word.TrackedChange; + /** + * Gets the range of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | "Whole" | "Start" | "End"): Word.Range; + /** + * Rejects the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + reject(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TrackedChangeLoadOptions): Word.TrackedChange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TrackedChange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.TrackedChange; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TrackedChange; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.TrackedChange; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.TrackedChange` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TrackedChangeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.TrackedChangeData; + } + /** + * Contains a collection of {@link Word.TrackedChange} objects. + * + * @remarks + * [Api set: WordApi 1.6] + */ + export class TrackedChangeCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.TrackedChange[]; + /** + * Accepts all the tracked changes in the collection. + * + * @remarks + * [Api set: WordApi 1.6] + */ + acceptAll(): void; + /** + * Gets the first TrackedChange in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.6] + */ + getFirst(): Word.TrackedChange; + /** + * Gets the first TrackedChange in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.6] + */ + getFirstOrNullObject(): Word.TrackedChange; + /** + * Rejects all the tracked changes in the collection. + * + * @remarks + * [Api set: WordApi 1.6] + */ + rejectAll(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TrackedChangeCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TrackedChangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TrackedChangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TrackedChangeCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TrackedChangeCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.TrackedChangeCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.TrackedChangeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TrackedChangeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.TrackedChangeCollectionData; + } + /** + * ChangeTracking mode. + * + * @remarks + * [Api set: WordApi 1.4] + */ + enum ChangeTrackingMode { + /** + * ChangeTracking is turned off. + * @remarks + * [Api set: WordApi 1.4] + */ + off = "Off", + /** + * ChangeTracking is turned on for everyone. + * @remarks + * [Api set: WordApi 1.4] + */ + trackAll = "TrackAll", + /** + * Tracking is turned on for my changes only. + * @remarks + * [Api set: WordApi 1.4] + */ + trackMineOnly = "TrackMineOnly", + } + /** + * Specify the current version or the original version of the text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + enum ChangeTrackingVersion { + /** + * @remarks + * [Api set: WordApi 1.4] + */ + original = "Original", + /** + * @remarks + * [Api set: WordApi 1.4] + */ + current = "Current", + } + /** + * Specify the track state when ChangeTracking is on. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum ChangeTrackingState { + /** + * @remarks + * [Api set: WordApi 1.5] + */ + unknown = "Unknown", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + normal = "Normal", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + added = "Added", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + deleted = "Deleted", + } + /** + * TrackedChange type. + * + * @remarks + * [Api set: WordApi 1.6] + */ + enum TrackedChangeType { + /** + * No revision. + * @remarks + * [Api set: WordApi 1.6] + */ + none = "None", + /** + * Add change. + * @remarks + * [Api set: WordApi 1.6] + */ + added = "Added", + /** + * Delete change. + * @remarks + * [Api set: WordApi 1.6] + */ + deleted = "Deleted", + /** + * Format change. + * @remarks + * [Api set: WordApi 1.6] + */ + formatted = "Formatted", + } + /** + * Note item type + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum NoteItemType { + /** + * @remarks + * [Api set: WordApi 1.5] + */ + footnote = "Footnote", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + endnote = "Endnote", + } + /** + * Provides information about the type of a raised event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum EventType { + /** + * ContentControlDeleted represents the event that the content control has been deleted. + * @remarks + * [Api set: WordApi 1.5] + */ + contentControlDeleted = "ContentControlDeleted", + /** + * ContentControlSelectionChanged represents the event that the selection in the content control has been changed. + * @remarks + * [Api set: WordApi 1.5] + */ + contentControlSelectionChanged = "ContentControlSelectionChanged", + /** + * ContentControlDataChanged represents the event that the data in the content control have been changed. + * @remarks + * [Api set: WordApi 1.5] + */ + contentControlDataChanged = "ContentControlDataChanged", + /** + * ContentControlAdded represents the event a content control has been added to the document. + * @remarks + * [Api set: WordApi 1.5] + */ + contentControlAdded = "ContentControlAdded", + /** + * Represents that a content control has been entered. + * @remarks + * [Api set: WordApi 1.5] + */ + contentControlEntered = "ContentControlEntered", + /** + * Represents that a content control has been exited. + * @remarks + * [Api set: WordApi 1.5] + */ + contentControlExited = "ContentControlExited", + /** + * Represents that one or more new paragraphs were added. + * @remarks + * [Api set: WordApi 1.6] + */ + paragraphAdded = "ParagraphAdded", + /** + * Represents that one or more paragraphs were changed. + * @remarks + * [Api set: WordApi 1.6] + */ + paragraphChanged = "ParagraphChanged", + /** + * Represents that one or more paragraphs were deleted. + * @remarks + * [Api set: WordApi 1.6] + */ + paragraphDeleted = "ParagraphDeleted", + /** + * Represents that an annotation was clicked (or selected with **Alt+Down**) in the document. + * @remarks + * [Api set: WordApi 1.7] + */ + annotationClicked = "AnnotationClicked", + /** + * Represents that an annotation was hovered over in the document. + * @remarks + * [Api set: WordApi 1.7] + */ + annotationHovered = "AnnotationHovered", + /** + * Represents that one or more annotations were added in the document. + * @remarks + * [Api set: WordApi 1.7] + */ + annotationInserted = "AnnotationInserted", + /** + * Represents that one or more annotations were deleted from the document. + * @remarks + * [Api set: WordApi 1.7] + */ + annotationRemoved = "AnnotationRemoved", + /** + * Represents an action in the annotation pop-up. + * @remarks + * [Api set: WordApi 1.8] + */ + annotationPopupAction = "AnnotationPopupAction", + } + /** + * An enum that specifies an event's source. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum EventSource { + /** + * @remarks + * [Api set: WordApi 1.5] + */ + local = "Local", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + remote = "Remote", + } + /** + * Provides information about the content control that raised contentControlAdded event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export interface ContentControlAddedEventArgs { + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.5] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about the content control that raised contentControlDataChanged event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export interface ContentControlDataChangedEventArgs { + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.5] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about the content control that raised contentControlDeleted event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export interface ContentControlDeletedEventArgs { + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.5] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about the content control that raised contentControlEntered event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export interface ContentControlEnteredEventArgs { + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.5] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about the content control that raised contentControlExited event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export interface ContentControlExitedEventArgs { + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.5] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about the content control that raised contentControlSelectionChanged event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export interface ContentControlSelectionChangedEventArgs { + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.5] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about the paragraphs that raised the paragraphAdded event. + * + * @remarks + * [Api set: WordApi 1.6] + */ + export interface ParagraphAddedEventArgs { + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.6] + */ + source: Word.EventSource | "Local" | "Remote"; + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.6] + */ + type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; + /** + * Gets the unique IDs of the involved paragraphs. IDs are in standard 8-4-4-4-12 GUID format without curly braces and differ across sessions and coauthors. + * + * @remarks + * [Api set: WordApi 1.6] + */ + uniqueLocalIds: string[]; + } + /** + * Provides information about the paragraphs that raised the paragraphChanged event. + * + * @remarks + * [Api set: WordApi 1.6] + */ + export interface ParagraphChangedEventArgs { + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.6] + */ + source: Word.EventSource | "Local" | "Remote"; + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.6] + */ + type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; + /** + * Gets the unique IDs of the involved paragraphs. IDs are in standard 8-4-4-4-12 GUID format without curly braces and differ across sessions and coauthors. + * + * @remarks + * [Api set: WordApi 1.6] + */ + uniqueLocalIds: string[]; + } + /** + * Provides information about the paragraphs that raised the paragraphDeleted event. + * + * @remarks + * [Api set: WordApi 1.6] + */ + export interface ParagraphDeletedEventArgs { + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.6] + */ + source: Word.EventSource | "Local" | "Remote"; + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.6] + */ + type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; + /** + * Gets the unique IDs of the involved paragraphs. IDs are in standard 8-4-4-4-12 GUID format without curly braces and differ across sessions and coauthors. + * + * @remarks + * [Api set: WordApi 1.6] + */ + uniqueLocalIds: string[]; + } + /** + * Specifies supported content control types and subtypes. + * + * @remarks + * [Api set: WordApi 1.1] + */ + enum ContentControlType { + /** + * @remarks + * [Api set: WordApi 1.1] + */ + unknown = "Unknown", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + richTextInline = "RichTextInline", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + richTextParagraphs = "RichTextParagraphs", + /** + * Contains a whole cell. + * @remarks + * [Api set: WordApi 1.1] + */ + richTextTableCell = "RichTextTableCell", + /** + * Contains a whole row. + * @remarks + * [Api set: WordApi 1.1] + */ + richTextTableRow = "RichTextTableRow", + /** + * Contains a whole table. + * @remarks + * [Api set: WordApi 1.1] + */ + richTextTable = "RichTextTable", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + plainTextInline = "PlainTextInline", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + plainTextParagraph = "PlainTextParagraph", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + picture = "Picture", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + buildingBlockGallery = "BuildingBlockGallery", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + checkBox = "CheckBox", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + comboBox = "ComboBox", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + dropDownList = "DropDownList", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + datePicker = "DatePicker", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + repeatingSection = "RepeatingSection", + /** + * Identifies a rich text content control. + * @remarks + * [Api set: WordApi 1.1] + */ + richText = "RichText", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + plainText = "PlainText", + } + /** + * ContentControl appearance. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Content control appearance options are BoundingBox, Tags, or Hidden. + */ + enum ContentControlAppearance { + /** + * Represents a content control shown as a shaded rectangle or bounding box (with optional title). + * @remarks + * [Api set: WordApi 1.1] + */ + boundingBox = "BoundingBox", + /** + * Represents a content control shown as start and end markers. + * @remarks + * [Api set: WordApi 1.1] + */ + tags = "Tags", + /** + * Represents a content control that isn't shown. + * @remarks + * [Api set: WordApi 1.1] + */ + hidden = "Hidden", + } + /** + * The supported styles for underline format. + * + * @remarks + * [Api set: WordApi 1.1] + */ + enum UnderlineType { + /** + * @remarks + * [Api set: WordApi 1.1] + */ + mixed = "Mixed", + /** + * No underline. + * @remarks + * [Api set: WordApi 1.1] + */ + none = "None", + /** + * Warning: hidden has been deprecated. + * @deprecated Hidden is no longer supported. + * @remarks + * [Api set: WordApi 1.1] + */ + hidden = "Hidden", + /** + * Warning: dotLine has been deprecated. + * @deprecated DotLine is no longer supported. + * @remarks + * [Api set: WordApi 1.1] + */ + dotLine = "DotLine", + /** + * A single underline. This is the default value. + * @remarks + * [Api set: WordApi 1.1] + */ + single = "Single", + /** + * Only underline individual words. + * @remarks + * [Api set: WordApi 1.1] + */ + word = "Word", + /** + * A double underline. + * @remarks + * [Api set: WordApi 1.1] + */ + double = "Double", + /** + * A single thick underline. + * @remarks + * [Api set: WordApi 1.1] + */ + thick = "Thick", + /** + * A dotted underline. + * @remarks + * [Api set: WordApi 1.1] + */ + dotted = "Dotted", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + dottedHeavy = "DottedHeavy", + /** + * A single dash underline. + * @remarks + * [Api set: WordApi 1.1] + */ + dashLine = "DashLine", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + dashLineHeavy = "DashLineHeavy", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + dashLineLong = "DashLineLong", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + dashLineLongHeavy = "DashLineLongHeavy", + /** + * An alternating dot-dash underline. + * @remarks + * [Api set: WordApi 1.1] + */ + dotDashLine = "DotDashLine", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + dotDashLineHeavy = "DotDashLineHeavy", + /** + * An alternating dot-dot-dash underline. + * @remarks + * [Api set: WordApi 1.1] + */ + twoDotDashLine = "TwoDotDashLine", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + twoDotDashLineHeavy = "TwoDotDashLineHeavy", + /** + * A single wavy underline. + * @remarks + * [Api set: WordApi 1.1] + */ + wave = "Wave", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + waveHeavy = "WaveHeavy", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + waveDouble = "WaveDouble", + } + /** + * Specifies the form of a break. + * + * @remarks + * [Api set: WordApi 1.1] + */ + enum BreakType { + /** + * Page break at the insertion point. + * @remarks + * [Api set: WordApi 1.1] + */ + page = "Page", + /** + * Warning: next has been deprecated. Use sectionNext instead. + * @deprecated Use sectionNext instead. + * @remarks + * [Api set: WordApi 1.1] + */ + next = "Next", + /** + * Section break on next page. + * @remarks + * [Api set: WordApi 1.1] + */ + sectionNext = "SectionNext", + /** + * New section without a corresponding page break. + * @remarks + * [Api set: WordApi 1.1] + */ + sectionContinuous = "SectionContinuous", + /** + * Section break with the next section beginning on the next even-numbered page. If the section break falls on an even-numbered page, Word leaves the next odd-numbered page blank. + * @remarks + * [Api set: WordApi 1.1] + */ + sectionEven = "SectionEven", + /** + * Section break with the next section beginning on the next odd-numbered page. If the section break falls on an odd-numbered page, Word leaves the next even-numbered page blank. + * @remarks + * [Api set: WordApi 1.1] + */ + sectionOdd = "SectionOdd", + /** + * Line break. + * @remarks + * [Api set: WordApi 1.1] + */ + line = "Line", + } + /** + * The insertion location types. + * + * @remarks + * [Api set: WordApi 1.1] + * + * To be used with an API call, such as `obj.insertSomething(newStuff, location);`. + * If the location is "Before" or "After", the new content will be outside of the modified object. + * If the location is "Start" or "End", the new content will be included as part of the modified object. + */ + enum InsertLocation { + /** + * Add content before the contents of the calling object. + * @remarks + * [Api set: WordApi 1.1] + */ + before = "Before", + /** + * Add content after the contents of the calling object. + * @remarks + * [Api set: WordApi 1.1] + */ + after = "After", + /** + * Prepend content to the contents of the calling object. + * @remarks + * [Api set: WordApi 1.1] + */ + start = "Start", + /** + * Append content to the contents of the calling object. + * @remarks + * [Api set: WordApi 1.1] + */ + end = "End", + /** + * Replace the contents of the current object. + * @remarks + * [Api set: WordApi 1.1] + */ + replace = "Replace", + } + /** + * @remarks + * [Api set: WordApi 1.1] + */ + enum Alignment { + /** + * @remarks + * [Api set: WordApi 1.1] + */ + mixed = "Mixed", + /** + * Unknown alignment. + * @remarks + * [Api set: WordApi 1.1] + */ + unknown = "Unknown", + /** + * Alignment to the left. + * @remarks + * [Api set: WordApi 1.1] + */ + left = "Left", + /** + * Alignment to the center. + * @remarks + * [Api set: WordApi 1.1] + */ + centered = "Centered", + /** + * Alignment to the right. + * @remarks + * [Api set: WordApi 1.1] + */ + right = "Right", + /** + * Fully justified alignment. + * @remarks + * [Api set: WordApi 1.1] + */ + justified = "Justified", + } + /** + * @remarks + * [Api set: WordApi 1.1] + */ + enum HeaderFooterType { + /** + * Returns the header or footer on all pages of a section, but excludes the first page or even pages if they are different. + * @remarks + * [Api set: WordApi 1.1] + */ + primary = "Primary", + /** + * Returns the header or footer on the first page of a section. + * @remarks + * [Api set: WordApi 1.1] + */ + firstPage = "FirstPage", + /** + * Returns all headers or footers on even-numbered pages of a section. + * @remarks + * [Api set: WordApi 1.1] + */ + evenPages = "EvenPages", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum BodyType { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + unknown = "Unknown", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + mainDoc = "MainDoc", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + section = "Section", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + header = "Header", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + footer = "Footer", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + tableCell = "TableCell", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + footnote = "Footnote", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + endnote = "Endnote", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + noteItem = "NoteItem", + } + /** + * This enum sets where the cursor (insertion point) in the document is after a selection. + * + * @remarks + * [Api set: WordApi 1.1] + */ + enum SelectionMode { + /** + * The entire range is selected. + * @remarks + * [Api set: WordApi 1.1] + */ + select = "Select", + /** + * The cursor is at the beginning of the selection (just before the start of the selected range). + * @remarks + * [Api set: WordApi 1.1] + */ + start = "Start", + /** + * The cursor is at the end of the selection (just after the end of the selected range). + * @remarks + * [Api set: WordApi 1.1] + */ + end = "End", + } + + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum RangeLocation { + /** + * The object's whole range. If the object is a paragraph content control or table content control, the EOP or Table characters after the content control are also included. + * @remarks + * [Api set: WordApi 1.3] + */ + whole = "Whole", + /** + * The starting point of the object. For content control, it is the point after the opening tag. + * @remarks + * [Api set: WordApi 1.3] + */ + start = "Start", + /** + * The ending point of the object. For paragraph, it is the point before the EOP. For content control, it is the point before the closing tag. + * @remarks + * [Api set: WordApi 1.3] + */ + end = "End", + /** + * For content control only. It is the point before the opening tag. + * @remarks + * [Api set: WordApi 1.3] + */ + before = "Before", + /** + * The point after the object. If the object is a paragraph content control or table content control, it is the point after the EOP or Table characters. + * @remarks + * [Api set: WordApi 1.3] + */ + after = "After", + /** + * The range between 'Start' and 'End'. + * @remarks + * [Api set: WordApi 1.3] + */ + content = "Content", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum LocationRelation { + /** + * Indicates that this instance and the range are in different sub-documents. + * @remarks + * [Api set: WordApi 1.3] + */ + unrelated = "Unrelated", + /** + * Indicates that this instance and the range represent the same range. + * @remarks + * [Api set: WordApi 1.3] + */ + equal = "Equal", + /** + * Indicates that this instance contains the range and that it shares the same start character. The range doesn't share the same end character as this instance. + * @remarks + * [Api set: WordApi 1.3] + */ + containsStart = "ContainsStart", + /** + * Indicates that this instance contains the range and that it shares the same end character. The range doesn't share the same start character as this instance. + * @remarks + * [Api set: WordApi 1.3] + */ + containsEnd = "ContainsEnd", + /** + * Indicates that this instance contains the range, with the exception of the start and end character of this instance. + * @remarks + * [Api set: WordApi 1.3] + */ + contains = "Contains", + /** + * Indicates that this instance is inside the range and that it shares the same start character. The range doesn't share the same end character as this instance. + * @remarks + * [Api set: WordApi 1.3] + */ + insideStart = "InsideStart", + /** + * Indicates that this instance is inside the range and that it shares the same end character. The range doesn't share the same start character as this instance. + * @remarks + * [Api set: WordApi 1.3] + */ + insideEnd = "InsideEnd", + /** + * Indicates that this instance is inside the range. The range doesn't share the same start and end characters as this instance. + * @remarks + * [Api set: WordApi 1.3] + */ + inside = "Inside", + /** + * Indicates that this instance occurs before, and is adjacent to, the range. + * @remarks + * [Api set: WordApi 1.3] + */ + adjacentBefore = "AdjacentBefore", + /** + * Indicates that this instance starts before the range and overlaps the range's first character. + * @remarks + * [Api set: WordApi 1.3] + */ + overlapsBefore = "OverlapsBefore", + /** + * Indicates that this instance occurs before the range. + * @remarks + * [Api set: WordApi 1.3] + */ + before = "Before", + /** + * Indicates that this instance occurs after, and is adjacent to, the range. + * @remarks + * [Api set: WordApi 1.3] + */ + adjacentAfter = "AdjacentAfter", + /** + * Indicates that this instance starts inside the range and overlaps the range’s last character. + * @remarks + * [Api set: WordApi 1.3] + */ + overlapsAfter = "OverlapsAfter", + /** + * Indicates that this instance occurs after the range. + * @remarks + * [Api set: WordApi 1.3] + */ + after = "After", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum BorderLocation { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + top = "Top", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + left = "Left", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + bottom = "Bottom", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + right = "Right", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + insideHorizontal = "InsideHorizontal", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + insideVertical = "InsideVertical", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + inside = "Inside", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + outside = "Outside", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + all = "All", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum CellPaddingLocation { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + top = "Top", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + left = "Left", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + bottom = "Bottom", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + right = "Right", + } + + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum BorderType { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + mixed = "Mixed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + none = "None", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + single = "Single", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + double = "Double", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + dotted = "Dotted", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + dashed = "Dashed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + dotDashed = "DotDashed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + dot2Dashed = "Dot2Dashed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + triple = "Triple", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thinThickSmall = "ThinThickSmall", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thickThinSmall = "ThickThinSmall", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thinThickThinSmall = "ThinThickThinSmall", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thinThickMed = "ThinThickMed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thickThinMed = "ThickThinMed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thinThickThinMed = "ThinThickThinMed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thinThickLarge = "ThinThickLarge", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thickThinLarge = "ThickThinLarge", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thinThickThinLarge = "ThinThickThinLarge", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + wave = "Wave", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + doubleWave = "DoubleWave", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + dashedSmall = "DashedSmall", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + dashDotStroked = "DashDotStroked", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + threeDEmboss = "ThreeDEmboss", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + threeDEngrave = "ThreeDEngrave", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum VerticalAlignment { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + mixed = "Mixed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + top = "Top", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + center = "Center", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + bottom = "Bottom", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum ListLevelType { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + bullet = "Bullet", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + number = "Number", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + picture = "Picture", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum ListBullet { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + custom = "Custom", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + solid = "Solid", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + hollow = "Hollow", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + square = "Square", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + diamonds = "Diamonds", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + arrow = "Arrow", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + checkmark = "Checkmark", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum ListNumbering { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + none = "None", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + arabic = "Arabic", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + upperRoman = "UpperRoman", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + lowerRoman = "LowerRoman", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + upperLetter = "UpperLetter", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + lowerLetter = "LowerLetter", + } + /** + * Represents the built-in style in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + * + * Important: This enum was renamed from `Style` to `BuiltInStyleName` in WordApi 1.5. + */ + enum BuiltInStyleName { + /** + * Mixed styles or other style not in this list. + * @remarks + * [Api set: WordApi 1.3] + */ + other = "Other", + /** + * Reset character and paragraph style to default. + * @remarks + * [Api set: WordApi 1.3] + */ + normal = "Normal", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading1 = "Heading1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading2 = "Heading2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading3 = "Heading3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading4 = "Heading4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading5 = "Heading5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading6 = "Heading6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading7 = "Heading7", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading8 = "Heading8", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading9 = "Heading9", + /** + * Table-of-content level 1. + * @remarks + * [Api set: WordApi 1.3] + */ + toc1 = "Toc1", + /** + * Table-of-content level 2. + * @remarks + * [Api set: WordApi 1.3] + */ + toc2 = "Toc2", + /** + * Table-of-content level 3. + * @remarks + * [Api set: WordApi 1.3] + */ + toc3 = "Toc3", + /** + * Table-of-content level 4. + * @remarks + * [Api set: WordApi 1.3] + */ + toc4 = "Toc4", + /** + * Table-of-content level 5. + * @remarks + * [Api set: WordApi 1.3] + */ + toc5 = "Toc5", + /** + * Table-of-content level 6. + * @remarks + * [Api set: WordApi 1.3] + */ + toc6 = "Toc6", + /** + * Table-of-content level 7. + * @remarks + * [Api set: WordApi 1.3] + */ + toc7 = "Toc7", + /** + * Table-of-content level 8. + * @remarks + * [Api set: WordApi 1.3] + */ + toc8 = "Toc8", + /** + * Table-of-content level 9. + * @remarks + * [Api set: WordApi 1.3] + */ + toc9 = "Toc9", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + footnoteText = "FootnoteText", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + header = "Header", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + footer = "Footer", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + caption = "Caption", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + footnoteReference = "FootnoteReference", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + endnoteReference = "EndnoteReference", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + endnoteText = "EndnoteText", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + title = "Title", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + subtitle = "Subtitle", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + hyperlink = "Hyperlink", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + strong = "Strong", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + emphasis = "Emphasis", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + noSpacing = "NoSpacing", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listParagraph = "ListParagraph", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + quote = "Quote", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + intenseQuote = "IntenseQuote", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + subtleEmphasis = "SubtleEmphasis", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + intenseEmphasis = "IntenseEmphasis", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + subtleReference = "SubtleReference", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + intenseReference = "IntenseReference", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + bookTitle = "BookTitle", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + bibliography = "Bibliography", + /** + * Table-of-content heading. + * @remarks + * [Api set: WordApi 1.3] + */ + tocHeading = "TocHeading", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + tableGrid = "TableGrid", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + plainTable1 = "PlainTable1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + plainTable2 = "PlainTable2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + plainTable3 = "PlainTable3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + plainTable4 = "PlainTable4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + plainTable5 = "PlainTable5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + tableGridLight = "TableGridLight", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light = "GridTable1Light", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light_Accent1 = "GridTable1Light_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light_Accent2 = "GridTable1Light_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light_Accent3 = "GridTable1Light_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light_Accent4 = "GridTable1Light_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light_Accent5 = "GridTable1Light_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light_Accent6 = "GridTable1Light_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2 = "GridTable2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2_Accent1 = "GridTable2_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2_Accent2 = "GridTable2_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2_Accent3 = "GridTable2_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2_Accent4 = "GridTable2_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2_Accent5 = "GridTable2_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2_Accent6 = "GridTable2_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3 = "GridTable3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3_Accent1 = "GridTable3_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3_Accent2 = "GridTable3_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3_Accent3 = "GridTable3_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3_Accent4 = "GridTable3_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3_Accent5 = "GridTable3_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3_Accent6 = "GridTable3_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4 = "GridTable4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4_Accent1 = "GridTable4_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4_Accent2 = "GridTable4_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4_Accent3 = "GridTable4_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4_Accent4 = "GridTable4_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4_Accent5 = "GridTable4_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4_Accent6 = "GridTable4_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark = "GridTable5Dark", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark_Accent1 = "GridTable5Dark_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark_Accent2 = "GridTable5Dark_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark_Accent3 = "GridTable5Dark_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark_Accent4 = "GridTable5Dark_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark_Accent5 = "GridTable5Dark_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark_Accent6 = "GridTable5Dark_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful = "GridTable6Colorful", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful_Accent1 = "GridTable6Colorful_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful_Accent2 = "GridTable6Colorful_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful_Accent3 = "GridTable6Colorful_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful_Accent4 = "GridTable6Colorful_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful_Accent5 = "GridTable6Colorful_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful_Accent6 = "GridTable6Colorful_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful = "GridTable7Colorful", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful_Accent1 = "GridTable7Colorful_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful_Accent2 = "GridTable7Colorful_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful_Accent3 = "GridTable7Colorful_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful_Accent4 = "GridTable7Colorful_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful_Accent5 = "GridTable7Colorful_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful_Accent6 = "GridTable7Colorful_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light = "ListTable1Light", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light_Accent1 = "ListTable1Light_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light_Accent2 = "ListTable1Light_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light_Accent3 = "ListTable1Light_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light_Accent4 = "ListTable1Light_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light_Accent5 = "ListTable1Light_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light_Accent6 = "ListTable1Light_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2 = "ListTable2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2_Accent1 = "ListTable2_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2_Accent2 = "ListTable2_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2_Accent3 = "ListTable2_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2_Accent4 = "ListTable2_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2_Accent5 = "ListTable2_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2_Accent6 = "ListTable2_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3 = "ListTable3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3_Accent1 = "ListTable3_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3_Accent2 = "ListTable3_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3_Accent3 = "ListTable3_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3_Accent4 = "ListTable3_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3_Accent5 = "ListTable3_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3_Accent6 = "ListTable3_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4 = "ListTable4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4_Accent1 = "ListTable4_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4_Accent2 = "ListTable4_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4_Accent3 = "ListTable4_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4_Accent4 = "ListTable4_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4_Accent5 = "ListTable4_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4_Accent6 = "ListTable4_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark = "ListTable5Dark", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark_Accent1 = "ListTable5Dark_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark_Accent2 = "ListTable5Dark_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark_Accent3 = "ListTable5Dark_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark_Accent4 = "ListTable5Dark_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark_Accent5 = "ListTable5Dark_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark_Accent6 = "ListTable5Dark_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful = "ListTable6Colorful", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful_Accent1 = "ListTable6Colorful_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful_Accent2 = "ListTable6Colorful_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful_Accent3 = "ListTable6Colorful_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful_Accent4 = "ListTable6Colorful_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful_Accent5 = "ListTable6Colorful_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful_Accent6 = "ListTable6Colorful_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful = "ListTable7Colorful", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful_Accent1 = "ListTable7Colorful_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful_Accent2 = "ListTable7Colorful_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful_Accent3 = "ListTable7Colorful_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful_Accent4 = "ListTable7Colorful_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful_Accent5 = "ListTable7Colorful_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful_Accent6 = "ListTable7Colorful_Accent6", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum DocumentPropertyType { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + string = "String", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + number = "Number", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + date = "Date", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + boolean = "Boolean", + } + /** + * Represents the type of style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum StyleType { + /** + * Represents that the style is a character style. + * @remarks + * [Api set: WordApi 1.5] + */ + character = "Character", + /** + * Represents that the style is a list style. Currently supported on desktop. + * @remarks + * [Api set: WordApi 1.5] + */ + list = "List", + /** + * Represents that the style is a paragraph style. + * @remarks + * [Api set: WordApi 1.5] + */ + paragraph = "Paragraph", + /** + * Represents that the style is a table style. + * @remarks + * [Api set: WordApi 1.5] + */ + table = "Table", + } + /** + * Represents the outline levels. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum OutlineLevel { + /** + * Represents outline level 1. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel1 = "OutlineLevel1", + /** + * Represents outline level 2. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel2 = "OutlineLevel2", + /** + * Represents outline level 3. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel3 = "OutlineLevel3", + /** + * Represents outline level 4. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel4 = "OutlineLevel4", + /** + * Represents outline level 5. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel5 = "OutlineLevel5", + /** + * Represents outline level 6. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel6 = "OutlineLevel6", + /** + * Represents outline level 7. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel7 = "OutlineLevel7", + /** + * Represents outline level 8. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel8 = "OutlineLevel8", + /** + * Represents outline level 9. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel9 = "OutlineLevel9", + /** + * Represents outline level body text, not an outline level. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevelBodyText = "OutlineLevelBodyText", + } + /** + * Specifies the close behavior for `Document.close`. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum CloseBehavior { + /** + * Saves the changes before closing the document. + * @remarks + * [Api set: WordApi 1.5] + */ + save = "Save", + /** + * Discard the possible changes when closing the document. + * @remarks + * [Api set: WordApi 1.5] + */ + skipSave = "SkipSave", + } + /** + * Specifies the save behavior for `Document.save`. + * + * @remarks + * [Api set: WordApi 1.1] + */ + enum SaveBehavior { + /** + * Saves the document without prompting the user. If it's a new document, + it will be saved with the default name or specified name in the default location. + * @remarks + * [Api set: WordApi 1.1] + */ + save = "Save", + /** + * Displays the "Save As" dialog to the user if the document hasn't been saved. + Won't take effect if the document was previously saved. + * @remarks + * [Api set: WordApi 1.1] + */ + prompt = "Prompt", + } + /** + * Represents the type of Field. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum FieldType { + /** + * Represents that the field type is Add-in. + * @remarks + * [Api set: WordApi 1.5] + */ + addin = "Addin", + /** + * Represents that the field type is AddressBlock. + * @remarks + * [Api set: WordApi 1.5] + */ + addressBlock = "AddressBlock", + /** + * Represents that the field type is Advance. + * @remarks + * [Api set: WordApi 1.5] + */ + advance = "Advance", + /** + * Represents that the field type is Ask. + * @remarks + * [Api set: WordApi 1.5] + */ + ask = "Ask", + /** + * Represents that the field type is Author. + * @remarks + * [Api set: WordApi 1.5] + */ + author = "Author", + /** + * Represents that the field type is AutoText. + * @remarks + * [Api set: WordApi 1.5] + */ + autoText = "AutoText", + /** + * Represents that the field type is AutoTextList. + * @remarks + * [Api set: WordApi 1.5] + */ + autoTextList = "AutoTextList", + /** + * Represents that the field type is Barcode. + * @remarks + * [Api set: WordApi 1.5] + */ + barCode = "BarCode", + /** + * Represents that the field type is Bibliography. + * @remarks + * [Api set: WordApi 1.5] + */ + bibliography = "Bibliography", + /** + * Represents that the field type is BidiOutline. + * @remarks + * [Api set: WordApi 1.5] + */ + bidiOutline = "BidiOutline", + /** + * Represents that the field type is Citation. + * @remarks + * [Api set: WordApi 1.5] + */ + citation = "Citation", + /** + * Represents that the field type is Comments. + * @remarks + * [Api set: WordApi 1.5] + */ + comments = "Comments", + /** + * Represents that the field type is Compare. + * @remarks + * [Api set: WordApi 1.5] + */ + compare = "Compare", + /** + * Represents that the field type is CreateDate. + * @remarks + * [Api set: WordApi 1.5] + */ + createDate = "CreateDate", + /** + * Represents that the field type is Data. + * @remarks + * [Api set: WordApi 1.5] + */ + data = "Data", + /** + * Represents that the field type is Database. + * @remarks + * [Api set: WordApi 1.5] + */ + database = "Database", + /** + * Represents that the field type is Date. + * @remarks + * [Api set: WordApi 1.5] + */ + date = "Date", + /** + * Represents that the field type is DisplayBarcode. + * @remarks + * [Api set: WordApi 1.5] + */ + displayBarcode = "DisplayBarcode", + /** + * Represents that the field type is DocumentProperty + * @remarks + * [Api set: WordApi 1.5] + */ + docProperty = "DocProperty", + /** + * Represents that the field type is DocumentVariable. + * @remarks + * [Api set: WordApi 1.5] + */ + docVariable = "DocVariable", + /** + * Represents that the field type is EditTime. + * @remarks + * [Api set: WordApi 1.5] + */ + editTime = "EditTime", + /** + * Represents that the field type is Embedded. + * @remarks + * [Api set: WordApi 1.5] + */ + embedded = "Embedded", + /** + * Represents that the field type is Equation. + * @remarks + * [Api set: WordApi 1.5] + */ + eq = "EQ", + /** + * Represents that the field type is Expression. + * @remarks + * [Api set: WordApi 1.5] + */ + expression = "Expression", + /** + * Represents that the field type is FileName. + * @remarks + * [Api set: WordApi 1.5] + */ + fileName = "FileName", + /** + * Represents that the field type is FileSize. + * @remarks + * [Api set: WordApi 1.5] + */ + fileSize = "FileSize", + /** + * Represents that the field type is FillIn. + * @remarks + * [Api set: WordApi 1.5] + */ + fillIn = "FillIn", + /** + * Represents that the field type is FormCheckbox. + * @remarks + * [Api set: WordApi 1.5] + */ + formCheckbox = "FormCheckbox", + /** + * Represents that the field type is FormDropdown. + * @remarks + * [Api set: WordApi 1.5] + */ + formDropdown = "FormDropdown", + /** + * Represents that the field type is FormText. + * @remarks + * [Api set: WordApi 1.5] + */ + formText = "FormText", + /** + * Represents that the field type is GotoButton. + * @remarks + * [Api set: WordApi 1.5] + */ + gotoButton = "GotoButton", + /** + * Represents that the field type is GreetingLine. + * @remarks + * [Api set: WordApi 1.5] + */ + greetingLine = "GreetingLine", + /** + * Represents that the field type is Hyperlink. + * @remarks + * [Api set: WordApi 1.5] + */ + hyperlink = "Hyperlink", + /** + * Represents that the field type is If. + * @remarks + * [Api set: WordApi 1.5] + */ + if = "If", + /** + * Represents that the field type is Import. + * @remarks + * [Api set: WordApi 1.5] + */ + import = "Import", + /** + * Represents that the field type is Include. + * @remarks + * [Api set: WordApi 1.5] + */ + include = "Include", + /** + * Represents that the field type is IncludePicture. + * @remarks + * [Api set: WordApi 1.5] + */ + includePicture = "IncludePicture", + /** + * Represents that the field type is IncludeText. + * @remarks + * [Api set: WordApi 1.5] + */ + includeText = "IncludeText", + /** + * Represents that the field type is Index. + * @remarks + * [Api set: WordApi 1.5] + */ + index = "Index", + /** + * Represents that the field type is Information. + * @remarks + * [Api set: WordApi 1.5] + */ + info = "Info", + /** + * Represents that the field type is Keywords. + * @remarks + * [Api set: WordApi 1.5] + */ + keywords = "Keywords", + /** + * Represents that the field type is LastSavedBy. + * @remarks + * [Api set: WordApi 1.5] + */ + lastSavedBy = "LastSavedBy", + /** + * Represents that the field type is Link. + * @remarks + * [Api set: WordApi 1.5] + */ + link = "Link", + /** + * Represents that the field type is ListNumber. + * @remarks + * [Api set: WordApi 1.5] + */ + listNum = "ListNum", + /** + * Represents that the field type is MacroButton. + * @remarks + * [Api set: WordApi 1.5] + */ + macroButton = "MacroButton", + /** + * Represents that the field type is MergeBarcode. + * @remarks + * [Api set: WordApi 1.5] + */ + mergeBarcode = "MergeBarcode", + /** + * Represents that the field type is MergeField. + * @remarks + * [Api set: WordApi 1.5] + */ + mergeField = "MergeField", + /** + * Represents that the field type is MergeRecord. + * @remarks + * [Api set: WordApi 1.5] + */ + mergeRec = "MergeRec", + /** + * Represents that the field type is MergeSequence. + * @remarks + * [Api set: WordApi 1.5] + */ + mergeSeq = "MergeSeq", + /** + * Represents that the field type is Next. + * @remarks + * [Api set: WordApi 1.5] + */ + next = "Next", + /** + * Represents that the field type is NextIf. + * @remarks + * [Api set: WordApi 1.5] + */ + nextIf = "NextIf", + /** + * Represents that the field type is NoteReference. + * @remarks + * [Api set: WordApi 1.5] + */ + noteRef = "NoteRef", + /** + * Represents that the field type is NumberOfCharacters. + * @remarks + * [Api set: WordApi 1.5] + */ + numChars = "NumChars", + /** + * Represents that the field type is NumberOfPages. + * @remarks + * [Api set: WordApi 1.5] + */ + numPages = "NumPages", + /** + * Represents that the field type is NumberOfWords. + * @remarks + * [Api set: WordApi 1.5] + */ + numWords = "NumWords", + /** + * Represents that the field type is ActiveXControl. + * @remarks + * [Api set: WordApi 1.5] + */ + ocx = "OCX", + /** + * Represents that the field type is Page. + * @remarks + * [Api set: WordApi 1.5] + */ + page = "Page", + /** + * Represents that the field type is PageReference. + * @remarks + * [Api set: WordApi 1.5] + */ + pageRef = "PageRef", + /** + * Represents that the field type is Print. + * @remarks + * [Api set: WordApi 1.5] + */ + print = "Print", + /** + * Represents that the field type is PrintDate. + * @remarks + * [Api set: WordApi 1.5] + */ + printDate = "PrintDate", + /** + * Represents that the field type is Private. + * @remarks + * [Api set: WordApi 1.5] + */ + private = "Private", + /** + * Represents that the field type is Quote. + * @remarks + * [Api set: WordApi 1.5] + */ + quote = "Quote", + /** + * Represents that the field type is ReferencedDocument. + * @remarks + * [Api set: WordApi 1.5] + */ + rd = "RD", + /** + * Represents that the field type is Reference. + * @remarks + * [Api set: WordApi 1.5] + */ + ref = "Ref", + /** + * Represents that the field type is RevisionNumber. + * @remarks + * [Api set: WordApi 1.5] + */ + revNum = "RevNum", + /** + * Represents that the field type is SaveDate. + * @remarks + * [Api set: WordApi 1.5] + */ + saveDate = "SaveDate", + /** + * Represents that the field type is Section. + * @remarks + * [Api set: WordApi 1.5] + */ + section = "Section", + /** + * Represents that the field type is SectionPages. + * @remarks + * [Api set: WordApi 1.5] + */ + sectionPages = "SectionPages", + /** + * Represents that the field type is Sequence. + * @remarks + * [Api set: WordApi 1.5] + */ + seq = "Seq", + /** + * Represents that the field type is Set. + * @remarks + * [Api set: WordApi 1.5] + */ + set = "Set", + /** + * Represents that the field type is Shape. + * @remarks + * [Api set: WordApi 1.5] + */ + shape = "Shape", + /** + * Represents that the field type is SkipIf. + * @remarks + * [Api set: WordApi 1.5] + */ + skipIf = "SkipIf", + /** + * Represents that the field type is StyleReference. + * @remarks + * [Api set: WordApi 1.5] + */ + styleRef = "StyleRef", + /** + * Represents that the field type is Subject. + * @remarks + * [Api set: WordApi 1.5] + */ + subject = "Subject", + /** + * Represents that the field type is Subscriber. + * @remarks + * [Api set: WordApi 1.5] + */ + subscriber = "Subscriber", + /** + * Represents that the field type is Symbol. + * @remarks + * [Api set: WordApi 1.5] + */ + symbol = "Symbol", + /** + * Represents that the field type is TableOfAuthoritiesEntry. + * @remarks + * [Api set: WordApi 1.5] + */ + ta = "TA", + /** + * Represents that the field type is TableOfContentsEntry. + * @remarks + * [Api set: WordApi 1.5] + */ + tc = "TC", + /** + * Represents that the field type is Template. + * @remarks + * [Api set: WordApi 1.5] + */ + template = "Template", + /** + * Represents that the field type is Time. + * @remarks + * [Api set: WordApi 1.5] + */ + time = "Time", + /** + * Represents that the field type is Title. + * @remarks + * [Api set: WordApi 1.5] + */ + title = "Title", + /** + * Represents that the field type is TableOfAuthorities. + * @remarks + * [Api set: WordApi 1.5] + */ + toa = "TOA", + /** + * Represents that the field type is TableOfContents. + * @remarks + * [Api set: WordApi 1.5] + */ + toc = "TOC", + /** + * Represents that the field type is UserAddress. + * @remarks + * [Api set: WordApi 1.5] + */ + userAddress = "UserAddress", + /** + * Represents that the field type is UserInitials. + * @remarks + * [Api set: WordApi 1.5] + */ + userInitials = "UserInitials", + /** + * Represents that the field type is UserName. + * @remarks + * [Api set: WordApi 1.5] + */ + userName = "UserName", + /** + * Represents that the field type is IndexEntry. + * @remarks + * [Api set: WordApi 1.5] + */ + xe = "XE", + /** + * Represents that the field type is Empty. + * @remarks + * [Api set: WordApi 1.5] + */ + empty = "Empty", + /** + * Represents the field types not supported by the Office JavaScript API. + * @remarks + * [Api set: WordApi 1.5] + */ + others = "Others", + /** + * Represents that the field type is Undefined. + * @remarks + * [Api set: WordApi 1.5] + */ + undefined = "Undefined", + } + /** + * Represents the kind of field. Indicates how the field works in relation to updating. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum FieldKind { + /** + * Represents that the field is invalid. For example, a pair of field characters with nothing inside. + * @remarks + * [Api set: WordApi 1.5] + */ + none = "None", + /** + * Represents that the field is automatically updated each time it's displayed or each time the page is reformatted, but which can also be manually updated. + * @remarks + * [Api set: WordApi 1.5] + */ + hot = "Hot", + /** + * Represents that the field is automatically updated when the source changes or the field can be manually updated. + * @remarks + * [Api set: WordApi 1.5] + */ + warm = "Warm", + /** + * Represents that the field doesn't have a result. + * @remarks + * [Api set: WordApi 1.5] + */ + cold = "Cold", + } + + + + + + enum ErrorCodes { + accessDenied = "AccessDenied", + generalException = "GeneralException", + invalidArgument = "InvalidArgument", + itemNotFound = "ItemNotFound", + notAllowed = "NotAllowed", + notImplemented = "NotImplemented", + searchDialogIsOpen = "SearchDialogIsOpen", + searchStringInvalidOrTooLong = "SearchStringInvalidOrTooLong", + } + export namespace Interfaces { + /** + * Provides ways to load properties of only a subset of members of a collection. + */ + export interface CollectionLoadOptions { + /** + * Specify the number of items in the queried collection to be included in the result. + */ + $top?: number; + /** + * Specify the number of items in the collection that are to be skipped and not included in the result. If top is specified, the selection of result will start after skipping the specified number of items. + */ + $skip?: number; + } + /** An interface for updating data on the `AnnotationCollection` object, for use in `annotationCollection.set({ ... })`. */ + export interface AnnotationCollectionUpdateData { + items?: Word.Interfaces.AnnotationData[]; + } + /** An interface for updating data on the `Body` object, for use in `body.set({ ... })`. */ + export interface BodyUpdateData { + /** + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + } + /** An interface for updating data on the `Border` object, for use in `border.set({ ... })`. */ + export interface BorderUpdateData { + + + + + } + /** An interface for updating data on the `BorderCollection` object, for use in `borderCollection.set({ ... })`. */ + export interface BorderCollectionUpdateData { + + + + + + + items?: Word.Interfaces.BorderData[]; + } + /** An interface for updating data on the `CheckboxContentControl` object, for use in `checkboxContentControl.set({ ... })`. */ + export interface CheckboxContentControlUpdateData { + /** + * Specifies the current state of the checkbox. + * + * @remarks + * [Api set: WordApi 1.7] + */ + isChecked?: boolean; + } + /** An interface for updating data on the `Comment` object, for use in `comment.set({ ... })`. */ + export interface CommentUpdateData { + /** + * Specifies the comment's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeUpdateData; + /** + * Specifies the comment's content as plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: string; + /** + * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. + * + * @remarks + * [Api set: WordApi 1.4] + */ + resolved?: boolean; + } + /** An interface for updating data on the `CommentCollection` object, for use in `commentCollection.set({ ... })`. */ + export interface CommentCollectionUpdateData { + items?: Word.Interfaces.CommentData[]; + } + /** An interface for updating data on the `CommentContentRange` object, for use in `commentContentRange.set({ ... })`. */ + export interface CommentContentRangeUpdateData { + /** + * Specifies a value that indicates whether the comment text is bold. + * + * @remarks + * [Api set: WordApi 1.4] + */ + bold?: boolean; + /** + * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + hyperlink?: string; + /** + * Specifies a value that indicates whether the comment text is italicized. + * + * @remarks + * [Api set: WordApi 1.4] + */ + italic?: boolean; + /** + * Specifies a value that indicates whether the comment text has a strikethrough. + * + * @remarks + * [Api set: WordApi 1.4] + */ + strikeThrough?: boolean; + /** + * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. + * + * @remarks + * [Api set: WordApi 1.4] + */ + underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; + } + /** An interface for updating data on the `CommentReply` object, for use in `commentReply.set({ ... })`. */ + export interface CommentReplyUpdateData { + /** + * Specifies the commentReply's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeUpdateData; + /** + * Gets the parent comment of this reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentComment?: Word.Interfaces.CommentUpdateData; + /** + * Specifies the comment reply's content. The string is plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: string; + } + /** An interface for updating data on the `CommentReplyCollection` object, for use in `commentReplyCollection.set({ ... })`. */ + export interface CommentReplyCollectionUpdateData { + items?: Word.Interfaces.CommentReplyData[]; + } + /** An interface for updating data on the `ContentControl` object, for use in `contentControl.set({ ... })`. */ + export interface ContentControlUpdateData { + /** + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.7] + */ + checkboxContentControl?: Word.Interfaces.CheckboxContentControlUpdateData; + /** + * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + appearance?: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; + /** + * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * Specifies a value that indicates whether the user can edit the contents of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. + * + * @remarks + * [Api set: WordApi 1.1] + */ + placeholderText?: string; + /** + * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * @remarks + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * Specifies a tag to identify a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + tag?: string; + /** + * Specifies the title for a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + title?: string; + } + /** An interface for updating data on the `ContentControlCollection` object, for use in `contentControlCollection.set({ ... })`. */ + export interface ContentControlCollectionUpdateData { + items?: Word.Interfaces.ContentControlData[]; + } + /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ + export interface ContentControlListItemUpdateData { + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: string; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: number; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: string; + } + /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ + export interface ContentControlListItemCollectionUpdateData { + items?: Word.Interfaces.ContentControlListItemData[]; + } + /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ + export interface CustomPropertyUpdateData { + /** + * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: any; + } + /** An interface for updating data on the `CustomPropertyCollection` object, for use in `customPropertyCollection.set({ ... })`. */ + export interface CustomPropertyCollectionUpdateData { + items?: Word.Interfaces.CustomPropertyData[]; + } + /** An interface for updating data on the `CustomXmlPartCollection` object, for use in `customXmlPartCollection.set({ ... })`. */ + export interface CustomXmlPartCollectionUpdateData { + items?: Word.Interfaces.CustomXmlPartData[]; + } + /** An interface for updating data on the `CustomXmlPartScopedCollection` object, for use in `customXmlPartScopedCollection.set({ ... })`. */ + export interface CustomXmlPartScopedCollectionUpdateData { + items?: Word.Interfaces.CustomXmlPartData[]; + } + /** An interface for updating data on the `Document` object, for use in `document.set({ ... })`. */ + export interface DocumentUpdateData { + /** + * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. + * + * @remarks + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyUpdateData; + /** + * Gets the properties of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesUpdateData; + /** + * Specifies the ChangeTracking mode. + * + * @remarks + * [Api set: WordApi 1.4] + */ + changeTrackingMode?: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; + } + /** An interface for updating data on the `DocumentCreated` object, for use in `documentCreated.set({ ... })`. */ + export interface DocumentCreatedUpdateData { + + + } + /** An interface for updating data on the `DocumentProperties` object, for use in `documentProperties.set({ ... })`. */ + export interface DocumentPropertiesUpdateData { + /** + * Specifies the author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + author?: string; + /** + * Specifies the category of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + category?: string; + /** + * Specifies the Comments field in the metadata of the document. These have no connection to comments by users made in the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + comments?: string; + /** + * Specifies the company of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + company?: string; + /** + * Specifies the format of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + format?: string; + /** + * Specifies the keywords of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + keywords?: string; + /** + * Specifies the manager of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + manager?: string; + /** + * Specifies the subject of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subject?: string; + /** + * Specifies the title of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + title?: string; + } + /** An interface for updating data on the `Field` object, for use in `field.set({ ... })`. */ + export interface FieldUpdateData { + /** + * Gets the field's result data. + * + * @remarks + * [Api set: WordApi 1.4] + */ + result?: Word.Interfaces.RangeUpdateData; + /** + * Specifies the field's code instruction. + * + * @remarks + * [Api set: WordApi 1.4] + * + * Note: The ability to set the code was introduced in WordApi 1.5. + */ + code?: string; + /** + * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. + * + * @remarks + * [Api set: WordApi 1.5] + */ + data?: string; + /** + * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. + * + * @remarks + * [Api set: WordApi 1.5] + */ + locked?: boolean; + + } + /** An interface for updating data on the `FieldCollection` object, for use in `fieldCollection.set({ ... })`. */ + export interface FieldCollectionUpdateData { + items?: Word.Interfaces.FieldData[]; + } + /** An interface for updating data on the `Font` object, for use in `font.set({ ... })`. */ + export interface FontUpdateData { + /** + * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + bold?: boolean; + /** + * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + doubleStrikeThrough?: boolean; + /** + * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + highlightColor?: string; + /** + * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + italic?: boolean; + /** + * Specifies a value that represents the name of the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + name?: string; + /** + * Specifies a value that represents the font size in points. + * + * @remarks + * [Api set: WordApi 1.1] + */ + size?: number; + /** + * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + strikeThrough?: boolean; + /** + * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + subscript?: boolean; + /** + * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + superscript?: boolean; + /** + * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. + * + * @remarks + * [Api set: WordApi 1.1] + */ + underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; + } + /** An interface for updating data on the `InlinePicture` object, for use in `inlinePicture.set({ ... })`. */ + export interface InlinePictureUpdateData { + /** + * Specifies a string that represents the alternative text associated with the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextDescription?: string; + /** + * Specifies a string that contains the title for the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextTitle?: string; + /** + * Specifies a number that describes the height of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + height?: number; + /** + * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.1] + */ + hyperlink?: string; + /** + * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * Specifies a number that describes the width of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + width?: number; + } + /** An interface for updating data on the `InlinePictureCollection` object, for use in `inlinePictureCollection.set({ ... })`. */ + export interface InlinePictureCollectionUpdateData { + items?: Word.Interfaces.InlinePictureData[]; + } + /** An interface for updating data on the `ListCollection` object, for use in `listCollection.set({ ... })`. */ + export interface ListCollectionUpdateData { + items?: Word.Interfaces.ListData[]; + } + /** An interface for updating data on the `ListItem` object, for use in `listItem.set({ ... })`. */ + export interface ListItemUpdateData { + /** + * Specifies the level of the item in the list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + level?: number; + } + /** An interface for updating data on the `ListLevel` object, for use in `listLevel.set({ ... })`. */ + export interface ListLevelUpdateData { + + + + + + + + + + + + } + /** An interface for updating data on the `ListLevelCollection` object, for use in `listLevelCollection.set({ ... })`. */ + export interface ListLevelCollectionUpdateData { + items?: Word.Interfaces.ListLevelData[]; + } + /** An interface for updating data on the `ListTemplate` object, for use in `listTemplate.set({ ... })`. */ + export interface ListTemplateUpdateData { + + } + /** An interface for updating data on the `NoteItem` object, for use in `noteItem.set({ ... })`. */ + export interface NoteItemUpdateData { + /** + * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + body?: Word.Interfaces.BodyUpdateData; + /** + * Represents a footnote or endnote reference in the main document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + reference?: Word.Interfaces.RangeUpdateData; + } + /** An interface for updating data on the `NoteItemCollection` object, for use in `noteItemCollection.set({ ... })`. */ + export interface NoteItemCollectionUpdateData { + items?: Word.Interfaces.NoteItemData[]; + } + /** An interface for updating data on the `Paragraph` object, for use in `paragraph.set({ ... })`. */ + export interface ParagraphUpdateData { + /** + * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemUpdateData; + /** + * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemUpdateData; + /** + * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * @remarks + * [Api set: WordApi 1.1] + */ + firstLineIndent?: number; + /** + * Specifies the left indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + leftIndent?: number; + /** + * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineSpacing?: number; + /** + * Specifies the amount of spacing, in grid lines, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: number; + /** + * Specifies the amount of spacing, in grid lines, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: number; + /** + * Specifies the outline level for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + outlineLevel?: number; + /** + * Specifies the right indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + rightIndent?: number; + /** + * Specifies the spacing, in points, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceAfter?: number; + /** + * Specifies the spacing, in points, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceBefore?: number; + /** + * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + } + /** An interface for updating data on the `ParagraphCollection` object, for use in `paragraphCollection.set({ ... })`. */ + export interface ParagraphCollectionUpdateData { + items?: Word.Interfaces.ParagraphData[]; + } + /** An interface for updating data on the `ParagraphFormat` object, for use in `paragraphFormat.set({ ... })`. */ + export interface ParagraphFormatUpdateData { + /** + * Specifies the alignment for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * @remarks + * [Api set: WordApi 1.5] + */ + firstLineIndent?: number; + /** + * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepTogether?: boolean; + /** + * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepWithNext?: boolean; + /** + * Specifies the left indent. + * + * @remarks + * [Api set: WordApi 1.5] + */ + leftIndent?: number; + /** + * Specifies the line spacing (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineSpacing?: number; + /** + * Specifies the amount of spacing (in gridlines) after the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitAfter?: number; + /** + * Specifies the amount of spacing (in gridlines) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitBefore?: number; + /** + * Specifies whether left and right indents are the same width. + * + * @remarks + * [Api set: WordApi 1.5] + */ + mirrorIndents?: boolean; + /** + * Specifies the outline level for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel?: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; + /** + * Specifies the right indent (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + rightIndent?: number; + /** + * Specifies the amount of spacing (in points) after the specified paragraph or text column. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceAfter?: number; + /** + * Specifies the spacing (in points) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceBefore?: number; + /** + * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + widowControl?: boolean; + } + /** An interface for updating data on the `Range` object, for use in `range.set({ ... })`. */ + export interface RangeUpdateData { + /** + * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.3] + */ + hyperlink?: string; + /** + * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + } + /** An interface for updating data on the `RangeCollection` object, for use in `rangeCollection.set({ ... })`. */ + export interface RangeCollectionUpdateData { + items?: Word.Interfaces.RangeData[]; + } + /** An interface for updating data on the `SearchOptions` object, for use in `searchOptions.set({ ... })`. */ + export interface SearchOptionsUpdateData { + /** + * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignorePunct?: boolean; + /** + * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignoreSpace?: boolean; + /** + * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchCase?: boolean; + /** + * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchPrefix?: boolean; + /** + * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchSuffix?: boolean; + /** + * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWholeWord?: boolean; + /** + * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWildcards?: boolean; + } + /** An interface for updating data on the `Section` object, for use in `section.set({ ... })`. */ + export interface SectionUpdateData { + /** + * Gets the body object of the section. This doesn't include the header/footer and other section metadata. + * + * @remarks + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyUpdateData; + } + /** An interface for updating data on the `SectionCollection` object, for use in `sectionCollection.set({ ... })`. */ + export interface SectionCollectionUpdateData { + items?: Word.Interfaces.SectionData[]; + } + /** An interface for updating data on the `Setting` object, for use in `setting.set({ ... })`. */ + export interface SettingUpdateData { + /** + * Specifies the value of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + value?: any; + } + /** An interface for updating data on the `SettingCollection` object, for use in `settingCollection.set({ ... })`. */ + export interface SettingCollectionUpdateData { + items?: Word.Interfaces.SettingData[]; + } + /** An interface for updating data on the `StyleCollection` object, for use in `styleCollection.set({ ... })`. */ + export interface StyleCollectionUpdateData { + items?: Word.Interfaces.StyleData[]; + } + /** An interface for updating data on the `Style` object, for use in `style.set({ ... })`. */ + export interface StyleUpdateData { + + /** + * Gets a font object that represents the character formatting of the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + font?: Word.Interfaces.FontUpdateData; + + /** + * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + paragraphFormat?: Word.Interfaces.ParagraphFormatUpdateData; + /** + * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. + * + * @remarks + * [Api set: WordApi 1.6] + */ + shading?: Word.Interfaces.ShadingUpdateData; + /** + * Gets a TableStyle object representing Style properties that can be applied to a table. + * + * @remarks + * [Api set: WordApi 1.6] + */ + tableStyle?: Word.Interfaces.TableStyleUpdateData; + /** + * Specifies the name of an existing style to use as the base formatting of another style. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. + */ + baseStyle?: string; + /** + * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. + */ + nextParagraphStyle?: string; + /** + * Specifies the priority. + * + * @remarks + * [Api set: WordApi 1.5] + */ + priority?: number; + /** + * Specifies whether the style corresponds to an available quick style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + quickStyle?: boolean; + /** + * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + unhideWhenUsed?: boolean; + /** + * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. + * + * @remarks + * [Api set: WordApi 1.5] + */ + visibility?: boolean; + } + /** An interface for updating data on the `Shading` object, for use in `shading.set({ ... })`. */ + export interface ShadingUpdateData { + /** + * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi 1.6] + */ + backgroundPatternColor?: string; + + + } + /** An interface for updating data on the `Table` object, for use in `table.set({ ... })`. */ + export interface TableUpdateData { + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the number of header rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + headerRowCount?: number; + /** + * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + style?: string; + /** + * Specifies whether the table has banded columns. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedColumns?: boolean; + /** + * Specifies whether the table has banded rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedRows?: boolean; + /** + * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * Specifies whether the table has a first column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleFirstColumn?: boolean; + /** + * Specifies whether the table has a last column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleLastColumn?: boolean; + /** + * Specifies whether the table has a total (last) row with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleTotalRow?: boolean; + /** + * Specifies the text values in the table, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: string[][]; + /** + * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * Specifies the width of the table in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: number; + } + /** An interface for updating data on the `TableStyle` object, for use in `tableStyle.set({ ... })`. */ + export interface TableStyleUpdateData { + + + /** + * Specifies the amount of space to add between the contents and the bottom borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + bottomCellMargin?: number; + /** + * Specifies the spacing (in points) between the cells in a table style. + * + * @remarks + * [Api set: WordApi 1.6] + */ + cellSpacing?: number; + /** + * Specifies the amount of space to add between the contents and the left borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + leftCellMargin?: number; + /** + * Specifies the amount of space to add between the contents and the right borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + rightCellMargin?: number; + /** + * Specifies the amount of space to add between the contents and the top borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + topCellMargin?: number; + } + /** An interface for updating data on the `TableCollection` object, for use in `tableCollection.set({ ... })`. */ + export interface TableCollectionUpdateData { + items?: Word.Interfaces.TableData[]; + } + /** An interface for updating data on the `TableRow` object, for use in `tableRow.set({ ... })`. */ + export interface TableRowUpdateData { + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the preferred height of the row in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + preferredHeight?: number; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * Specifies the text values in the row, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: string[][]; + /** + * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + } + /** An interface for updating data on the `TableRowCollection` object, for use in `tableRowCollection.set({ ... })`. */ + export interface TableRowCollectionUpdateData { + items?: Word.Interfaces.TableRowData[]; + } + /** An interface for updating data on the `TableCell` object, for use in `tableCell.set({ ... })`. */ + export interface TableCellUpdateData { + /** + * Gets the body object of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyUpdateData; + /** + * Specifies the width of the cell's column in points. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + */ + columnWidth?: number; + /** + * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * Specifies the text of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: string; + /** + * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + } + /** An interface for updating data on the `TableCellCollection` object, for use in `tableCellCollection.set({ ... })`. */ + export interface TableCellCollectionUpdateData { + items?: Word.Interfaces.TableCellData[]; + } + /** An interface for updating data on the `TableBorder` object, for use in `tableBorder.set({ ... })`. */ + export interface TableBorderUpdateData { + /** + * Specifies the table border color. + * + * @remarks + * [Api set: WordApi 1.3] + */ + color?: string; + /** + * Specifies the type of the table border. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; + /** + * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: number; + } + /** An interface for updating data on the `TrackedChangeCollection` object, for use in `trackedChangeCollection.set({ ... })`. */ + export interface TrackedChangeCollectionUpdateData { + items?: Word.Interfaces.TrackedChangeData[]; + } + /** An interface describing the data returned by calling `critiqueAnnotation.toJSON()`. */ + export interface CritiqueAnnotationData { + /** + * Gets the critique that was passed when the annotation was inserted. + * + * @remarks + * [Api set: WordApi 1.7] + */ + critique?: Word.Critique; + } + /** An interface describing the data returned by calling `annotation.toJSON()`. */ + export interface AnnotationData { + /** + * Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. + * + * @remarks + * [Api set: WordApi 1.7] + */ + id?: string; + /** + * Gets the state of the annotation. + * + * @remarks + * [Api set: WordApi 1.7] + */ + state?: Word.AnnotationState | "Created" | "Accepted" | "Rejected"; + } + /** An interface describing the data returned by calling `annotationCollection.toJSON()`. */ + export interface AnnotationCollectionData { + items?: Word.Interfaces.AnnotationData[]; + } + /** An interface describing the data returned by calling `body.toJSON()`. */ + export interface BodyData { + /** + * Gets the collection of rich text content control objects in the body. + * + * @remarks + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * Gets the collection of field objects in the body. + * + * @remarks + * [Api set: WordApi 1.4] + */ + fields?: Word.Interfaces.FieldData[]; + /** + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontData; + /** + * Gets the collection of InlinePicture objects in the body. The collection doesn't include floating images. + * + * @remarks + * [Api set: WordApi 1.1] + */ + inlinePictures?: Word.Interfaces.InlinePictureData[]; + /** + * Gets the collection of list objects in the body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lists?: Word.Interfaces.ListData[]; + /** + * Gets the collection of paragraph objects in the body. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Important: Paragraphs in tables aren't returned for requirement sets 1.1 and 1.2. From requirement set 1.3, paragraphs in tables are also returned. + */ + paragraphs?: Word.Interfaces.ParagraphData[]; + /** + * Gets the collection of table objects in the body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + tables?: Word.Interfaces.TableData[]; + /** + * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * Gets the text of the body. Use the insertText method to insert text. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: string; + /** + * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: Word.BodyType | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell" | "Footnote" | "Endnote" | "NoteItem"; + } + /** An interface describing the data returned by calling `border.toJSON()`. */ + export interface BorderData { + + + + + + } + /** An interface describing the data returned by calling `borderCollection.toJSON()`. */ + export interface BorderCollectionData { + items?: Word.Interfaces.BorderData[]; + } + /** An interface describing the data returned by calling `checkboxContentControl.toJSON()`. */ + export interface CheckboxContentControlData { + /** + * Specifies the current state of the checkbox. + * + * @remarks + * [Api set: WordApi 1.7] + */ + isChecked?: boolean; + } + /** An interface describing the data returned by calling `comment.toJSON()`. */ + export interface CommentData { + /** + * Specifies the comment's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeData; + /** + * Gets the collection of reply objects associated with the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + replies?: Word.Interfaces.CommentReplyData[]; + /** + * Gets the email of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorEmail?: string; + /** + * Gets the name of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorName?: string; + /** + * Specifies the comment's content as plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: string; + /** + * Gets the creation date of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + creationDate?: Date; + /** + * Gets the ID of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: string; + /** + * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. + * + * @remarks + * [Api set: WordApi 1.4] + */ + resolved?: boolean; + } + /** An interface describing the data returned by calling `commentCollection.toJSON()`. */ + export interface CommentCollectionData { + items?: Word.Interfaces.CommentData[]; + } + /** An interface describing the data returned by calling `commentContentRange.toJSON()`. */ + export interface CommentContentRangeData { + /** + * Specifies a value that indicates whether the comment text is bold. + * + * @remarks + * [Api set: WordApi 1.4] + */ + bold?: boolean; + /** + * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + hyperlink?: string; + /** + * Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.4] + */ + isEmpty?: boolean; + /** + * Specifies a value that indicates whether the comment text is italicized. + * + * @remarks + * [Api set: WordApi 1.4] + */ + italic?: boolean; + /** + * Specifies a value that indicates whether the comment text has a strikethrough. + * + * @remarks + * [Api set: WordApi 1.4] + */ + strikeThrough?: boolean; + /** + * Gets the text of the comment range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + text?: string; + /** + * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. + * + * @remarks + * [Api set: WordApi 1.4] + */ + underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; + } + /** An interface describing the data returned by calling `commentReply.toJSON()`. */ + export interface CommentReplyData { + /** + * Specifies the commentReply's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeData; + /** + * Gets the parent comment of this reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentComment?: Word.Interfaces.CommentData; + /** + * Gets the email of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorEmail?: string; + /** + * Gets the name of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorName?: string; + /** + * Specifies the comment reply's content. The string is plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: string; + /** + * Gets the creation date of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + creationDate?: Date; + /** + * Gets the ID of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: string; + } + /** An interface describing the data returned by calling `commentReplyCollection.toJSON()`. */ + export interface CommentReplyCollectionData { + items?: Word.Interfaces.CommentReplyData[]; + } + /** An interface describing the data returned by calling `contentControl.toJSON()`. */ + export interface ContentControlData { + /** + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.7] + */ + checkboxContentControl?: Word.Interfaces.CheckboxContentControlData; + /** + * Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + comboBoxContentControl?: Word.Interfaces.ComboBoxContentControlData; + /** + * Gets the collection of content control objects in the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + dropDownListContentControl?: Word.Interfaces.DropDownListContentControlData; + /** + * Gets the collection of field objects in the content control. + * + * @remarks + * [Api set: WordApi 1.4] + */ + fields?: Word.Interfaces.FieldData[]; + /** + * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontData; + /** + * Gets the collection of InlinePicture objects in the content control. The collection doesn't include floating images. + * + * @remarks + * [Api set: WordApi 1.1] + */ + inlinePictures?: Word.Interfaces.InlinePictureData[]; + /** + * Gets the collection of list objects in the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lists?: Word.Interfaces.ListData[]; + /** + * Gets the collection of paragraph objects in the content control. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Important: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this content control aren't returned. From requirement set 1.3, paragraphs in such tables are also returned. + */ + paragraphs?: Word.Interfaces.ParagraphData[]; + /** + * Gets the collection of table objects in the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + tables?: Word.Interfaces.TableData[]; + /** + * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + appearance?: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; + /** + * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * Specifies a value that indicates whether the user can edit the contents of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * Gets an integer that represents the content control identifier. + * + * @remarks + * [Api set: WordApi 1.1] + */ + id?: number; + /** + * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. + * + * @remarks + * [Api set: WordApi 1.1] + */ + placeholderText?: string; + /** + * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * @remarks + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subtype?: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText"; + /** + * Specifies a tag to identify a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + tag?: string; + /** + * Gets the text of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: string; + /** + * Specifies the title for a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + title?: string; + /** + * Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. + * + * @remarks + * [Api set: WordApi 1.1] + */ + type?: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText"; + } + /** An interface describing the data returned by calling `contentControlCollection.toJSON()`. */ + export interface ContentControlCollectionData { + items?: Word.Interfaces.ContentControlData[]; + } + /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ + export interface ContentControlListItemData { + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: string; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: number; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: string; + } + /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ + export interface ContentControlListItemCollectionData { + items?: Word.Interfaces.ContentControlListItemData[]; + } + /** An interface describing the data returned by calling `customProperty.toJSON()`. */ + export interface CustomPropertyData { + /** + * Gets the key of the custom property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + key?: string; + /** + * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: Word.DocumentPropertyType | "String" | "Number" | "Date" | "Boolean"; + /** + * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: any; + } + /** An interface describing the data returned by calling `customPropertyCollection.toJSON()`. */ + export interface CustomPropertyCollectionData { + items?: Word.Interfaces.CustomPropertyData[]; + } + /** An interface describing the data returned by calling `customXmlPart.toJSON()`. */ + export interface CustomXmlPartData { + /** + * Gets the ID of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: string; + /** + * Gets the namespace URI of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + namespaceUri?: string; + } + /** An interface describing the data returned by calling `customXmlPartCollection.toJSON()`. */ + export interface CustomXmlPartCollectionData { + items?: Word.Interfaces.CustomXmlPartData[]; + } + /** An interface describing the data returned by calling `customXmlPartScopedCollection.toJSON()`. */ + export interface CustomXmlPartScopedCollectionData { + items?: Word.Interfaces.CustomXmlPartData[]; + } + /** An interface describing the data returned by calling `document.toJSON()`. */ + export interface DocumentData { + /** + * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. + * + * @remarks + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyData; + /** + * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. + * + * @remarks + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * Gets the custom XML parts in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + customXmlParts?: Word.Interfaces.CustomXmlPartData[]; + /** + * Gets the properties of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesData; + /** + * Gets the collection of section objects in the document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + sections?: Word.Interfaces.SectionData[]; + /** + * Gets the add-in's settings in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + settings?: Word.Interfaces.SettingData[]; + /** + * Specifies the ChangeTracking mode. + * + * @remarks + * [Api set: WordApi 1.4] + */ + changeTrackingMode?: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; + /** + * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. + * + * @remarks + * [Api set: WordApi 1.1] + */ + saved?: boolean; + } + /** An interface describing the data returned by calling `documentCreated.toJSON()`. */ + export interface DocumentCreatedData { + + + + + + + + } + /** An interface describing the data returned by calling `documentProperties.toJSON()`. */ + export interface DocumentPropertiesData { + /** + * Gets the collection of custom properties of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + customProperties?: Word.Interfaces.CustomPropertyData[]; + /** + * Gets the application name of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + applicationName?: string; + /** + * Specifies the author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + author?: string; + /** + * Specifies the category of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + category?: string; + /** + * Specifies the Comments field in the metadata of the document. These have no connection to comments by users made in the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + comments?: string; + /** + * Specifies the company of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + company?: string; + /** + * Gets the creation date of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + creationDate?: Date; + /** + * Specifies the format of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + format?: string; + /** + * Specifies the keywords of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + keywords?: string; + /** + * Gets the last author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lastAuthor?: string; + /** + * Gets the last print date of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lastPrintDate?: Date; + /** + * Gets the last save time of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lastSaveTime?: Date; + /** + * Specifies the manager of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + manager?: string; + /** + * Gets the revision number of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + revisionNumber?: string; + /** + * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. + * + * @remarks + * [Api set: WordApi 1.3] + */ + security?: number; + /** + * Specifies the subject of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subject?: string; + /** + * Gets the template of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + template?: string; + /** + * Specifies the title of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + title?: string; + } + /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ + export interface DropDownListContentControlData { + } + /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ + export interface ComboBoxContentControlData { + } + /** An interface describing the data returned by calling `field.toJSON()`. */ + export interface FieldData { + /** + * Gets the field's result data. + * + * @remarks + * [Api set: WordApi 1.4] + */ + result?: Word.Interfaces.RangeData; + /** + * Specifies the field's code instruction. + * + * @remarks + * [Api set: WordApi 1.4] + * + * Note: The ability to set the code was introduced in WordApi 1.5. + */ + code?: string; + /** + * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. + * + * @remarks + * [Api set: WordApi 1.5] + */ + data?: string; + /** + * Gets the field's kind. + * + * @remarks + * [Api set: WordApi 1.5] + */ + kind?: Word.FieldKind | "None" | "Hot" | "Warm" | "Cold"; + /** + * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. + * + * @remarks + * [Api set: WordApi 1.5] + */ + locked?: boolean; + + /** + * Gets the field's type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: Word.FieldType | "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined"; + } + /** An interface describing the data returned by calling `fieldCollection.toJSON()`. */ + export interface FieldCollectionData { + items?: Word.Interfaces.FieldData[]; + } + /** An interface describing the data returned by calling `font.toJSON()`. */ + export interface FontData { + /** + * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + bold?: boolean; + /** + * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + doubleStrikeThrough?: boolean; + /** + * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + highlightColor?: string; + /** + * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + italic?: boolean; + /** + * Specifies a value that represents the name of the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + name?: string; + /** + * Specifies a value that represents the font size in points. + * + * @remarks + * [Api set: WordApi 1.1] + */ + size?: number; + /** + * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + strikeThrough?: boolean; + /** + * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + subscript?: boolean; + /** + * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + superscript?: boolean; + /** + * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. + * + * @remarks + * [Api set: WordApi 1.1] + */ + underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; + } + /** An interface describing the data returned by calling `inlinePicture.toJSON()`. */ + export interface InlinePictureData { + /** + * Specifies a string that represents the alternative text associated with the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextDescription?: string; + /** + * Specifies a string that contains the title for the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextTitle?: string; + /** + * Specifies a number that describes the height of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + height?: number; + /** + * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.1] + */ + hyperlink?: string; + + /** + * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * Specifies a number that describes the width of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + width?: number; + } + /** An interface describing the data returned by calling `inlinePictureCollection.toJSON()`. */ + export interface InlinePictureCollectionData { + items?: Word.Interfaces.InlinePictureData[]; + } + /** An interface describing the data returned by calling `list.toJSON()`. */ + export interface ListData { + /** + * Gets paragraphs in the list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + paragraphs?: Word.Interfaces.ParagraphData[]; + /** + * Gets the list's id. + * + * @remarks + * [Api set: WordApi 1.3] + */ + id?: number; + /** + * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. + * + * @remarks + * [Api set: WordApi 1.3] + */ + levelExistences?: boolean[]; + /** + * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + levelTypes?: Word.ListLevelType[]; + } + /** An interface describing the data returned by calling `listCollection.toJSON()`. */ + export interface ListCollectionData { + items?: Word.Interfaces.ListData[]; + } + /** An interface describing the data returned by calling `listItem.toJSON()`. */ + export interface ListItemData { + /** + * Specifies the level of the item in the list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + level?: number; + /** + * Gets the list item bullet, number, or picture as a string. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listString?: string; + /** + * Gets the list item order number in relation to its siblings. + * + * @remarks + * [Api set: WordApi 1.3] + */ + siblingIndex?: number; + } + /** An interface describing the data returned by calling `listLevel.toJSON()`. */ + export interface ListLevelData { + + + + + + + + + + + + } + /** An interface describing the data returned by calling `listLevelCollection.toJSON()`. */ + export interface ListLevelCollectionData { + items?: Word.Interfaces.ListLevelData[]; + } + /** An interface describing the data returned by calling `listTemplate.toJSON()`. */ + export interface ListTemplateData { + + + } + /** An interface describing the data returned by calling `noteItem.toJSON()`. */ + export interface NoteItemData { + /** + * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + body?: Word.Interfaces.BodyData; + /** + * Represents a footnote or endnote reference in the main document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + reference?: Word.Interfaces.RangeData; + /** + * Represents the note item type: footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: Word.NoteItemType | "Footnote" | "Endnote"; + } + /** An interface describing the data returned by calling `noteItemCollection.toJSON()`. */ + export interface NoteItemCollectionData { + items?: Word.Interfaces.NoteItemData[]; + } + /** An interface describing the data returned by calling `paragraph.toJSON()`. */ + export interface ParagraphData { + /** + * Gets the collection of fields in the paragraph. + * + * @remarks + * [Api set: WordApi 1.4] + */ + fields?: Word.Interfaces.FieldData[]; + /** + * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontData; + /** + * Gets the collection of InlinePicture objects in the paragraph. The collection doesn't include floating images. + * + * @remarks + * [Api set: WordApi 1.1] + */ + inlinePictures?: Word.Interfaces.InlinePictureData[]; + /** + * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemData; + /** + * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemData; + /** + * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * @remarks + * [Api set: WordApi 1.1] + */ + firstLineIndent?: number; + /** + * Indicates the paragraph is the last one inside its parent body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isLastParagraph?: boolean; + /** + * Checks whether the paragraph is a list item. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isListItem?: boolean; + /** + * Specifies the left indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + leftIndent?: number; + /** + * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineSpacing?: number; + /** + * Specifies the amount of spacing, in grid lines, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: number; + /** + * Specifies the amount of spacing, in grid lines, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: number; + /** + * Specifies the outline level for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + outlineLevel?: number; + /** + * Specifies the right indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + rightIndent?: number; + /** + * Specifies the spacing, in points, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceAfter?: number; + /** + * Specifies the spacing, in points, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceBefore?: number; + /** + * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + tableNestingLevel?: number; + /** + * Gets the text of the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: string; + /** + * Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. + * + * @remarks + * [Api set: WordApi 1.6] + */ + uniqueLocalId?: string; + } + /** An interface describing the data returned by calling `paragraphCollection.toJSON()`. */ + export interface ParagraphCollectionData { + items?: Word.Interfaces.ParagraphData[]; + } + /** An interface describing the data returned by calling `paragraphFormat.toJSON()`. */ + export interface ParagraphFormatData { + /** + * Specifies the alignment for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * @remarks + * [Api set: WordApi 1.5] + */ + firstLineIndent?: number; + /** + * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepTogether?: boolean; + /** + * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepWithNext?: boolean; + /** + * Specifies the left indent. + * + * @remarks + * [Api set: WordApi 1.5] + */ + leftIndent?: number; + /** + * Specifies the line spacing (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineSpacing?: number; + /** + * Specifies the amount of spacing (in gridlines) after the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitAfter?: number; + /** + * Specifies the amount of spacing (in gridlines) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitBefore?: number; + /** + * Specifies whether left and right indents are the same width. + * + * @remarks + * [Api set: WordApi 1.5] + */ + mirrorIndents?: boolean; + /** + * Specifies the outline level for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel?: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; + /** + * Specifies the right indent (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + rightIndent?: number; + /** + * Specifies the amount of spacing (in points) after the specified paragraph or text column. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceAfter?: number; + /** + * Specifies the spacing (in points) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceBefore?: number; + /** + * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + widowControl?: boolean; + } + /** An interface describing the data returned by calling `range.toJSON()`. */ + export interface RangeData { + /** + * Gets the collection of field objects in the range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + fields?: Word.Interfaces.FieldData[]; + /** + * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontData; + /** + * Gets the collection of inline picture objects in the range. + * + * @remarks + * [Api set: WordApi 1.2] + */ + inlinePictures?: Word.Interfaces.InlinePictureData[]; + /** + * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.3] + */ + hyperlink?: string; + /** + * Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isEmpty?: boolean; + /** + * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * Gets the text of the range. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: string; + } + /** An interface describing the data returned by calling `rangeCollection.toJSON()`. */ + export interface RangeCollectionData { + items?: Word.Interfaces.RangeData[]; + } + /** An interface describing the data returned by calling `searchOptions.toJSON()`. */ + export interface SearchOptionsData { + /** + * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignorePunct?: boolean; + /** + * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignoreSpace?: boolean; + /** + * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchCase?: boolean; + /** + * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchPrefix?: boolean; + /** + * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchSuffix?: boolean; + /** + * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWholeWord?: boolean; + /** + * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWildcards?: boolean; + } + /** An interface describing the data returned by calling `section.toJSON()`. */ + export interface SectionData { + /** + * Gets the body object of the section. This doesn't include the header/footer and other section metadata. + * + * @remarks + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyData; + } + /** An interface describing the data returned by calling `sectionCollection.toJSON()`. */ + export interface SectionCollectionData { + items?: Word.Interfaces.SectionData[]; + } + /** An interface describing the data returned by calling `setting.toJSON()`. */ + export interface SettingData { + /** + * Gets the key of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + key?: string; + /** + * Specifies the value of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + value?: any; + } + /** An interface describing the data returned by calling `settingCollection.toJSON()`. */ + export interface SettingCollectionData { + items?: Word.Interfaces.SettingData[]; + } + /** An interface describing the data returned by calling `styleCollection.toJSON()`. */ + export interface StyleCollectionData { + items?: Word.Interfaces.StyleData[]; + } + /** An interface describing the data returned by calling `style.toJSON()`. */ + export interface StyleData { + + /** + * Gets a font object that represents the character formatting of the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + font?: Word.Interfaces.FontData; + + /** + * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + paragraphFormat?: Word.Interfaces.ParagraphFormatData; + /** + * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. + * + * @remarks + * [Api set: WordApi 1.6] + */ + shading?: Word.Interfaces.ShadingData; + /** + * Gets a TableStyle object representing Style properties that can be applied to a table. + * + * @remarks + * [Api set: WordApi 1.6] + */ + tableStyle?: Word.Interfaces.TableStyleData; + /** + * Specifies the name of an existing style to use as the base formatting of another style. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. + */ + baseStyle?: string; + /** + * Gets whether the specified style is a built-in style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + builtIn?: boolean; + /** + * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + inUse?: boolean; + /** + * Gets whether a style is a linked style that can be used for both paragraph and character formatting. + * + * @remarks + * [Api set: WordApi 1.5] + */ + linked?: boolean; + /** + * Gets the name of a style in the language of the user. + * + * @remarks + * [Api set: WordApi 1.5] + */ + nameLocal?: string; + /** + * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. + */ + nextParagraphStyle?: string; + /** + * Specifies the priority. + * + * @remarks + * [Api set: WordApi 1.5] + */ + priority?: number; + /** + * Specifies whether the style corresponds to an available quick style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + quickStyle?: boolean; + /** + * Gets the style type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: Word.StyleType | "Character" | "List" | "Paragraph" | "Table"; + /** + * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + unhideWhenUsed?: boolean; + /** + * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. + * + * @remarks + * [Api set: WordApi 1.5] + */ + visibility?: boolean; + } + /** An interface describing the data returned by calling `shading.toJSON()`. */ + export interface ShadingData { + /** + * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi 1.6] + */ + backgroundPatternColor?: string; + + + } + /** An interface describing the data returned by calling `table.toJSON()`. */ + export interface TableData { + /** + * Gets the collection of field objects in the table. + * + * @remarks + * [Api set: WordApi 1.4] + */ + fields?: Word.Interfaces.FieldData[]; + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontData; + /** + * Gets all of the table rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rows?: Word.Interfaces.TableRowData[]; + /** + * Gets the child tables nested one level deeper. + * + * @remarks + * [Api set: WordApi 1.3] + */ + tables?: Word.Interfaces.TableData[]; + /** + * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the number of header rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + headerRowCount?: number; + /** + * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Indicates whether all of the table rows are uniform. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isUniform?: boolean; + /** + * Gets the nesting level of the table. Top-level tables have level 1. + * + * @remarks + * [Api set: WordApi 1.3] + */ + nestingLevel?: number; + /** + * Gets the number of rows in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowCount?: number; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + style?: string; + /** + * Specifies whether the table has banded columns. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedColumns?: boolean; + /** + * Specifies whether the table has banded rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedRows?: boolean; + /** + * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * Specifies whether the table has a first column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleFirstColumn?: boolean; + /** + * Specifies whether the table has a last column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleLastColumn?: boolean; + /** + * Specifies whether the table has a total (last) row with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleTotalRow?: boolean; + /** + * Specifies the text values in the table, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: string[][]; + /** + * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * Specifies the width of the table in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: number; + } + /** An interface describing the data returned by calling `tableStyle.toJSON()`. */ + export interface TableStyleData { + + + /** + * Specifies the amount of space to add between the contents and the bottom borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + bottomCellMargin?: number; + /** + * Specifies the spacing (in points) between the cells in a table style. + * + * @remarks + * [Api set: WordApi 1.6] + */ + cellSpacing?: number; + /** + * Specifies the amount of space to add between the contents and the left borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + leftCellMargin?: number; + /** + * Specifies the amount of space to add between the contents and the right borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + rightCellMargin?: number; + /** + * Specifies the amount of space to add between the contents and the top borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + topCellMargin?: number; + } + /** An interface describing the data returned by calling `tableCollection.toJSON()`. */ + export interface TableCollectionData { + items?: Word.Interfaces.TableData[]; + } + /** An interface describing the data returned by calling `tableRow.toJSON()`. */ + export interface TableRowData { + /** + * Gets cells. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cells?: Word.Interfaces.TableCellData[]; + /** + * Gets the collection of field objects in the table row. + * + * @remarks + * [Api set: WordApi 1.4] + */ + fields?: Word.Interfaces.FieldData[]; + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontData; + /** + * Gets the number of cells in the row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cellCount?: number; + /** + * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isHeader?: boolean; + /** + * Specifies the preferred height of the row in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + preferredHeight?: number; + /** + * Gets the index of the row in its parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowIndex?: number; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * Specifies the text values in the row, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: string[][]; + /** + * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + } + /** An interface describing the data returned by calling `tableRowCollection.toJSON()`. */ + export interface TableRowCollectionData { + items?: Word.Interfaces.TableRowData[]; + } + /** An interface describing the data returned by calling `tableCell.toJSON()`. */ + export interface TableCellData { + /** + * Gets the body object of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyData; + /** + * Gets the index of the cell in its row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cellIndex?: number; + /** + * Specifies the width of the cell's column in points. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + */ + columnWidth?: number; + /** + * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Gets the index of the cell's row in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowIndex?: number; + /** + * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * Specifies the text of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: string; + /** + * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * Gets the width of the cell in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: number; + } + /** An interface describing the data returned by calling `tableCellCollection.toJSON()`. */ + export interface TableCellCollectionData { + items?: Word.Interfaces.TableCellData[]; + } + /** An interface describing the data returned by calling `tableBorder.toJSON()`. */ + export interface TableBorderData { + /** + * Specifies the table border color. + * + * @remarks + * [Api set: WordApi 1.3] + */ + color?: string; + /** + * Specifies the type of the table border. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; + /** + * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: number; + } + /** An interface describing the data returned by calling `trackedChange.toJSON()`. */ + export interface TrackedChangeData { + /** + * Gets the author of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + author?: string; + /** + * Gets the date of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + date?: Date; + /** + * Gets the text of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + text?: string; + /** + * Gets the type of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + type?: Word.TrackedChangeType | "None" | "Added" | "Deleted" | "Formatted"; + } + /** An interface describing the data returned by calling `trackedChangeCollection.toJSON()`. */ + export interface TrackedChangeCollectionData { + items?: Word.Interfaces.TrackedChangeData[]; + } + /** + * Represents an annotation wrapper around critique displayed in the document. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export interface CritiqueAnnotationLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the range of text that is annotated. + * + * @remarks + * [Api set: WordApi 1.7] + */ + range?: Word.Interfaces.RangeLoadOptions; + /** + * Gets the critique that was passed when the annotation was inserted. + * + * @remarks + * [Api set: WordApi 1.7] + */ + critique?: boolean; + } + /** + * Represents an annotation attached to a paragraph. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export interface AnnotationLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the critique annotation object. + * + * @remarks + * [Api set: WordApi 1.7] + */ + critiqueAnnotation?: Word.Interfaces.CritiqueAnnotationLoadOptions; + /** + * Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. + * + * @remarks + * [Api set: WordApi 1.7] + */ + id?: boolean; + /** + * Gets the state of the annotation. + * + * @remarks + * [Api set: WordApi 1.7] + */ + state?: boolean; + } + /** + * Contains a collection of {@link Word.Annotation} objects. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export interface AnnotationCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the critique annotation object. + * + * @remarks + * [Api set: WordApi 1.7] + */ + critiqueAnnotation?: Word.Interfaces.CritiqueAnnotationLoadOptions; + /** + * For EACH ITEM in the collection: Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. + * + * @remarks + * [Api set: WordApi 1.7] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Gets the state of the annotation. + * + * @remarks + * [Api set: WordApi 1.7] + */ + state?: boolean; + } + /** + * Represents the body of a document or a section. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface BodyLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws an `ItemNotFound` error if there isn't a parent body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the parent body of the body. For example, a table cell body's parent body could be a header. If there isn't a parent body, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBodyOrNullObject?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the content control that contains the body. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the body. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the parent section of the body. Throws an `ItemNotFound` error if there isn't a parent section. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentSection?: Word.Interfaces.SectionLoadOptions; + /** + * Gets the parent section of the body. If there isn't a parent section, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentSectionOrNullObject?: Word.Interfaces.SectionLoadOptions; + /** + * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * Gets the text of the body. Use the insertText method to insert text. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: boolean; + } + + + /** + * The data specific to content controls of type CheckBox. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export interface CheckboxContentControlLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the current state of the checkbox. + * + * @remarks + * [Api set: WordApi 1.7] + */ + isChecked?: boolean; + } + /** + * Represents a comment in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export interface CommentLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the comment's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; + /** + * Gets the email of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorEmail?: boolean; + /** + * Gets the name of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorName?: boolean; + /** + * Specifies the comment's content as plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: boolean; + /** + * Gets the creation date of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + creationDate?: boolean; + /** + * Gets the ID of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + /** + * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. + * + * @remarks + * [Api set: WordApi 1.4] + */ + resolved?: boolean; + } + /** + * Contains a collection of {@link Word.Comment} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export interface CommentCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the comment's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; + /** + * For EACH ITEM in the collection: Gets the email of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorEmail?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorName?: boolean; + /** + * For EACH ITEM in the collection: Specifies the comment's content as plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: boolean; + /** + * For EACH ITEM in the collection: Gets the creation date of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + creationDate?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. + * + * @remarks + * [Api set: WordApi 1.4] + */ + resolved?: boolean; + } + /** + * @remarks + * [Api set: WordApi 1.4] + */ + export interface CommentContentRangeLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies a value that indicates whether the comment text is bold. + * + * @remarks + * [Api set: WordApi 1.4] + */ + bold?: boolean; + /** + * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + hyperlink?: boolean; + /** + * Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.4] + */ + isEmpty?: boolean; + /** + * Specifies a value that indicates whether the comment text is italicized. + * + * @remarks + * [Api set: WordApi 1.4] + */ + italic?: boolean; + /** + * Specifies a value that indicates whether the comment text has a strikethrough. + * + * @remarks + * [Api set: WordApi 1.4] + */ + strikeThrough?: boolean; + /** + * Gets the text of the comment range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + text?: boolean; + /** + * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. + * + * @remarks + * [Api set: WordApi 1.4] + */ + underline?: boolean; + } + /** + * Represents a comment reply in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export interface CommentReplyLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the commentReply's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; + /** + * Gets the parent comment of this reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentComment?: Word.Interfaces.CommentLoadOptions; + /** + * Gets the email of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorEmail?: boolean; + /** + * Gets the name of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorName?: boolean; + /** + * Specifies the comment reply's content. The string is plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: boolean; + /** + * Gets the creation date of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + creationDate?: boolean; + /** + * Gets the ID of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + } + /** + * Contains a collection of {@link Word.CommentReply} objects. Represents all comment replies in one comment thread. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export interface CommentReplyCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the commentReply's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent comment of this reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentComment?: Word.Interfaces.CommentLoadOptions; + /** + * For EACH ITEM in the collection: Gets the email of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorEmail?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorName?: boolean; + /** + * For EACH ITEM in the collection: Specifies the comment reply's content. The string is plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: boolean; + /** + * For EACH ITEM in the collection: Gets the creation date of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + creationDate?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + } + /** + * Represents a content control. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text, plain text, and checkbox content controls are supported. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface ContentControlLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.7] + */ + checkboxContentControl?: Word.Interfaces.CheckboxContentControlLoadOptions; + /** + * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Gets the parent body of the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the table that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table cell that contains the content control. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table that contains the content control. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + appearance?: boolean; + /** + * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * Specifies a value that indicates whether the user can edit the contents of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: boolean; + /** + * Gets an integer that represents the content control identifier. + * + * @remarks + * [Api set: WordApi 1.1] + */ + id?: boolean; + /** + * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. + * + * @remarks + * [Api set: WordApi 1.1] + */ + placeholderText?: boolean; + /** + * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * @remarks + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subtype?: boolean; + /** + * Specifies a tag to identify a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + tag?: boolean; + /** + * Gets the text of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * Specifies the title for a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + title?: boolean; + /** + * Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. + * + * @remarks + * [Api set: WordApi 1.1] + */ + type?: boolean; + } + /** + * Contains a collection of {@link Word.ContentControl} objects. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text and plain text content controls are supported. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface ContentControlCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.7] + */ + checkboxContentControl?: Word.Interfaces.CheckboxContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent body of the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the content control. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the content control. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + appearance?: boolean; + /** + * For EACH ITEM in the collection: Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * For EACH ITEM in the collection: Specifies a value that indicates whether the user can edit the contents of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * For EACH ITEM in the collection: Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: boolean; + /** + * For EACH ITEM in the collection: Gets an integer that represents the content control identifier. + * + * @remarks + * [Api set: WordApi 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. + * + * @remarks + * [Api set: WordApi 1.1] + */ + placeholderText?: boolean; + /** + * For EACH ITEM in the collection: Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * @remarks + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * For EACH ITEM in the collection: Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * For EACH ITEM in the collection: Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * For EACH ITEM in the collection: Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subtype?: boolean; + /** + * For EACH ITEM in the collection: Specifies a tag to identify a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + tag?: boolean; + /** + * For EACH ITEM in the collection: Gets the text of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * For EACH ITEM in the collection: Specifies the title for a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + title?: boolean; + /** + * For EACH ITEM in the collection: Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. + * + * @remarks + * [Api set: WordApi 1.1] + */ + type?: boolean; + } + /** + * Represents a list item in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export interface ContentControlListItemLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: boolean; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: boolean; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: boolean; + } + /** + * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export interface ContentControlListItemCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: boolean; + /** + * For EACH ITEM in the collection: Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: boolean; + /** + * For EACH ITEM in the collection: Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: boolean; + } + /** + * Represents a custom property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface CustomPropertyLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the key of the custom property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + key?: boolean; + /** + * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: boolean; + /** + * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: boolean; + } + /** + * Contains the collection of {@link Word.CustomProperty} objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface CustomPropertyCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the key of the custom property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + key?: boolean; + /** + * For EACH ITEM in the collection: Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: boolean; + /** + * For EACH ITEM in the collection: Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: boolean; + } + /** + * Represents a custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export interface CustomXmlPartLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the ID of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + /** + * Gets the namespace URI of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + namespaceUri?: boolean; + } + /** + * Contains the collection of {@link Word.CustomXmlPart} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export interface CustomXmlPartCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Gets the namespace URI of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + namespaceUri?: boolean; + } + /** + * Contains the collection of {@link Word.CustomXmlPart} objects with a specific namespace. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export interface CustomXmlPartScopedCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Gets the namespace URI of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + namespaceUri?: boolean; + } + /** + * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface DocumentLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. + * + * @remarks + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the properties of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesLoadOptions; + /** + * Specifies the ChangeTracking mode. + * + * @remarks + * [Api set: WordApi 1.4] + */ + changeTrackingMode?: boolean; + /** + * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. + * + * @remarks + * [Api set: WordApi 1.1] + */ + saved?: boolean; + } + /** + * The DocumentCreated object is the top level object created by Application.CreateDocument. A DocumentCreated object is a special Document object. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface DocumentCreatedLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + + + + } + /** + * Represents document properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface DocumentPropertiesLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the application name of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + applicationName?: boolean; + /** + * Specifies the author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + author?: boolean; + /** + * Specifies the category of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + category?: boolean; + /** + * Specifies the Comments field in the metadata of the document. These have no connection to comments by users made in the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + comments?: boolean; + /** + * Specifies the company of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + company?: boolean; + /** + * Gets the creation date of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + creationDate?: boolean; + /** + * Specifies the format of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + format?: boolean; + /** + * Specifies the keywords of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + keywords?: boolean; + /** + * Gets the last author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lastAuthor?: boolean; + /** + * Gets the last print date of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lastPrintDate?: boolean; + /** + * Gets the last save time of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lastSaveTime?: boolean; + /** + * Specifies the manager of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + manager?: boolean; + /** + * Gets the revision number of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + revisionNumber?: boolean; + /** + * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. + * + * @remarks + * [Api set: WordApi 1.3] + */ + security?: boolean; + /** + * Specifies the subject of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subject?: boolean; + /** + * Gets the template of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + template?: boolean; + /** + * Specifies the title of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + title?: boolean; + } + /** + * Represents a field. + * + * @remarks + * [Api set: WordApi 1.4] + * + * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField` API introduced in requirement set 1.5. + * Support for managing fields is similar to what's available in the Word UI. + * However, while the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}), + * the `Addin` field is editable. To learn more about Word UI clients that more fully support fields, + * see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. + */ + export interface FieldLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the parent body of the field. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the table that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the table cell that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table cell that contains the field. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table that contains the field. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * Gets the field's result data. + * + * @remarks + * [Api set: WordApi 1.4] + */ + result?: Word.Interfaces.RangeLoadOptions; + /** + * Specifies the field's code instruction. + * + * @remarks + * [Api set: WordApi 1.4] + * + * Note: The ability to set the code was introduced in WordApi 1.5. + */ + code?: boolean; + /** + * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. + * + * @remarks + * [Api set: WordApi 1.5] + */ + data?: boolean; + /** + * Gets the field's kind. + * + * @remarks + * [Api set: WordApi 1.5] + */ + kind?: boolean; + /** + * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. + * + * @remarks + * [Api set: WordApi 1.5] + */ + locked?: boolean; + + /** + * Gets the field's type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: boolean; + } + /** + * Contains a collection of {@link Word.Field} objects. + * + * @remarks + * [Api set: WordApi 1.4] + * + * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField API` introduced in requirement set 1.5. + * Support for managing fields is similar to what's available in the Word UI. + * However, while the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}), + * the `Addin` field is editable. To learn more about Word UI clients that more fully support fields, + * see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. + */ + export interface FieldCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the parent body of the field. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the field. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the field. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the field's result data. + * + * @remarks + * [Api set: WordApi 1.4] + */ + result?: Word.Interfaces.RangeLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the field's code instruction. + * + * @remarks + * [Api set: WordApi 1.4] + * + * Note: The ability to set the code was introduced in WordApi 1.5. + */ + code?: boolean; + /** + * For EACH ITEM in the collection: Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. + * + * @remarks + * [Api set: WordApi 1.5] + */ + data?: boolean; + /** + * For EACH ITEM in the collection: Gets the field's kind. + * + * @remarks + * [Api set: WordApi 1.5] + */ + kind?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. + * + * @remarks + * [Api set: WordApi 1.5] + */ + locked?: boolean; + + /** + * For EACH ITEM in the collection: Gets the field's type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: boolean; + } + /** + * Represents a font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface FontLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + bold?: boolean; + /** + * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: boolean; + /** + * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + doubleStrikeThrough?: boolean; + /** + * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + highlightColor?: boolean; + /** + * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + italic?: boolean; + /** + * Specifies a value that represents the name of the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + name?: boolean; + /** + * Specifies a value that represents the font size in points. + * + * @remarks + * [Api set: WordApi 1.1] + */ + size?: boolean; + /** + * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + strikeThrough?: boolean; + /** + * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + subscript?: boolean; + /** + * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + superscript?: boolean; + /** + * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. + * + * @remarks + * [Api set: WordApi 1.1] + */ + underline?: boolean; + } + /** + * Represents an inline picture. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface InlinePictureLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the parent paragraph that contains the inline image. + * + * @remarks + * [Api set: WordApi 1.2] + */ + paragraph?: Word.Interfaces.ParagraphLoadOptions; + /** + * Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the table that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table cell that contains the inline image. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table that contains the inline image. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * Specifies a string that represents the alternative text associated with the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextDescription?: boolean; + /** + * Specifies a string that contains the title for the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextTitle?: boolean; + /** + * Specifies a number that describes the height of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + height?: boolean; + /** + * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.1] + */ + hyperlink?: boolean; + + /** + * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * Specifies a number that describes the width of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + width?: boolean; + } + /** + * Contains a collection of {@link Word.InlinePicture} objects. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface InlinePictureCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the parent paragraph that contains the inline image. + * + * @remarks + * [Api set: WordApi 1.2] + */ + paragraph?: Word.Interfaces.ParagraphLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the inline image. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the inline image. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Specifies a string that represents the alternative text associated with the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextDescription?: boolean; + /** + * For EACH ITEM in the collection: Specifies a string that contains the title for the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextTitle?: boolean; + /** + * For EACH ITEM in the collection: Specifies a number that describes the height of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + height?: boolean; + /** + * For EACH ITEM in the collection: Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.1] + */ + hyperlink?: boolean; + + /** + * For EACH ITEM in the collection: Specifies a value that indicates whether the inline image retains its original proportions when you resize it. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * For EACH ITEM in the collection: Specifies a number that describes the width of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + width?: boolean; + } + /** + * Contains a collection of {@link Word.Paragraph} objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface ListLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the list's id. + * + * @remarks + * [Api set: WordApi 1.3] + */ + id?: boolean; + /** + * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. + * + * @remarks + * [Api set: WordApi 1.3] + */ + levelExistences?: boolean; + /** + * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + levelTypes?: boolean; + } + /** + * Contains a collection of {@link Word.List} objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface ListCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the list's id. + * + * @remarks + * [Api set: WordApi 1.3] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. + * + * @remarks + * [Api set: WordApi 1.3] + */ + levelExistences?: boolean; + /** + * For EACH ITEM in the collection: Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + levelTypes?: boolean; + } + /** + * Represents the paragraph list item format. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface ListItemLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the level of the item in the list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + level?: boolean; + /** + * Gets the list item bullet, number, or picture as a string. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listString?: boolean; + /** + * Gets the list item order number in relation to its siblings. + * + * @remarks + * [Api set: WordApi 1.3] + */ + siblingIndex?: boolean; + } + + + + /** + * Represents a footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export interface NoteItemLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * Represents a footnote or endnote reference in the main document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + reference?: Word.Interfaces.RangeLoadOptions; + /** + * Represents the note item type: footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: boolean; + } + /** + * Contains a collection of {@link Word.NoteItem} objects. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export interface NoteItemCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Represents the body object of the note item. It's the portion of the text within the footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Represents a footnote or endnote reference in the main document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + reference?: Word.Interfaces.RangeLoadOptions; + /** + * For EACH ITEM in the collection: Represents the note item type: footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: boolean; + } + /** + * Represents a single paragraph in a selection, range, content control, or document body. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface ParagraphLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph isn't in a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + list?: Word.Interfaces.ListLoadOptions; + /** + * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemLoadOptions; + /** + * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions; + /** + * Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listOrNullObject?: Word.Interfaces.ListLoadOptions; + /** + * Gets the parent body of the paragraph. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table cell that contains the paragraph. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table that contains the paragraph. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + alignment?: boolean; + /** + * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * @remarks + * [Api set: WordApi 1.1] + */ + firstLineIndent?: boolean; + /** + * Indicates the paragraph is the last one inside its parent body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isLastParagraph?: boolean; + /** + * Checks whether the paragraph is a list item. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isListItem?: boolean; + /** + * Specifies the left indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + leftIndent?: boolean; + /** + * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineSpacing?: boolean; + /** + * Specifies the amount of spacing, in grid lines, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: boolean; + /** + * Specifies the amount of spacing, in grid lines, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: boolean; + /** + * Specifies the outline level for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + outlineLevel?: boolean; + /** + * Specifies the right indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + rightIndent?: boolean; + /** + * Specifies the spacing, in points, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceAfter?: boolean; + /** + * Specifies the spacing, in points, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceBefore?: boolean; + /** + * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + tableNestingLevel?: boolean; + /** + * Gets the text of the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. + * + * @remarks + * [Api set: WordApi 1.6] + */ + uniqueLocalId?: boolean; + } + /** + * Contains a collection of {@link Word.Paragraph} objects. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface ParagraphCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * For EACH ITEM in the collection: Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph isn't in a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + list?: Word.Interfaces.ListLoadOptions; + /** + * For EACH ITEM in the collection: Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemLoadOptions; + /** + * For EACH ITEM in the collection: Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions; + /** + * For EACH ITEM in the collection: Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listOrNullObject?: Word.Interfaces.ListLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent body of the paragraph. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the paragraph. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the paragraph. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + alignment?: boolean; + /** + * For EACH ITEM in the collection: Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * @remarks + * [Api set: WordApi 1.1] + */ + firstLineIndent?: boolean; + /** + * For EACH ITEM in the collection: Indicates the paragraph is the last one inside its parent body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isLastParagraph?: boolean; + /** + * For EACH ITEM in the collection: Checks whether the paragraph is a list item. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isListItem?: boolean; + /** + * For EACH ITEM in the collection: Specifies the left indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + leftIndent?: boolean; + /** + * For EACH ITEM in the collection: Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineSpacing?: boolean; + /** + * For EACH ITEM in the collection: Specifies the amount of spacing, in grid lines, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: boolean; + /** + * For EACH ITEM in the collection: Specifies the amount of spacing, in grid lines, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: boolean; + /** + * For EACH ITEM in the collection: Specifies the outline level for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + outlineLevel?: boolean; + /** + * For EACH ITEM in the collection: Specifies the right indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + rightIndent?: boolean; + /** + * For EACH ITEM in the collection: Specifies the spacing, in points, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceAfter?: boolean; + /** + * For EACH ITEM in the collection: Specifies the spacing, in points, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceBefore?: boolean; + /** + * For EACH ITEM in the collection: Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * For EACH ITEM in the collection: Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * For EACH ITEM in the collection: Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + tableNestingLevel?: boolean; + /** + * For EACH ITEM in the collection: Gets the text of the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * For EACH ITEM in the collection: Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. + * + * @remarks + * [Api set: WordApi 1.6] + */ + uniqueLocalId?: boolean; + } + /** + * Represents a style of paragraph in a document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export interface ParagraphFormatLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the alignment for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + alignment?: boolean; + /** + * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * @remarks + * [Api set: WordApi 1.5] + */ + firstLineIndent?: boolean; + /** + * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepTogether?: boolean; + /** + * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepWithNext?: boolean; + /** + * Specifies the left indent. + * + * @remarks + * [Api set: WordApi 1.5] + */ + leftIndent?: boolean; + /** + * Specifies the line spacing (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineSpacing?: boolean; + /** + * Specifies the amount of spacing (in gridlines) after the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitAfter?: boolean; + /** + * Specifies the amount of spacing (in gridlines) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitBefore?: boolean; + /** + * Specifies whether left and right indents are the same width. + * + * @remarks + * [Api set: WordApi 1.5] + */ + mirrorIndents?: boolean; + /** + * Specifies the outline level for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel?: boolean; + /** + * Specifies the right indent (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + rightIndent?: boolean; + /** + * Specifies the amount of spacing (in points) after the specified paragraph or text column. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceAfter?: boolean; + /** + * Specifies the spacing (in points) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceBefore?: boolean; + /** + * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + widowControl?: boolean; + } + /** + * Represents a contiguous area in a document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface RangeLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Gets the parent body of the range. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the currently supported content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the currently supported content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the table that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the table cell that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table cell that contains the range. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table that contains the range. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.3] + */ + hyperlink?: boolean; + /** + * Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isEmpty?: boolean; + /** + * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * Gets the text of the range. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + } + /** + * Contains a collection of {@link Word.Range} objects. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface RangeCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the text format of the range. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent body of the range. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Gets the currently supported content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the currently supported content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the range. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the range. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.3] + */ + hyperlink?: boolean; + /** + * For EACH ITEM in the collection: Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isEmpty?: boolean; + /** + * For EACH ITEM in the collection: Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * For EACH ITEM in the collection: Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * For EACH ITEM in the collection: Gets the text of the range. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + } + /** + * Specifies the options to be included in a search operation. + To learn more about how to use search options in the Word JavaScript APIs, read {@link https://learn.microsoft.com/office/dev/add-ins/word/search-option-guidance | Use search options to find text in your Word add-in}. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface SearchOptionsLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignorePunct?: boolean; + /** + * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignoreSpace?: boolean; + /** + * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchCase?: boolean; + /** + * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchPrefix?: boolean; + /** + * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchSuffix?: boolean; + /** + * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWholeWord?: boolean; + /** + * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWildcards?: boolean; + } + /** + * Represents a section in a Word document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface SectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the body object of the section. This doesn't include the header/footer and other section metadata. + * + * @remarks + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyLoadOptions; + } + /** + * Contains the collection of the document's {@link Word.Section} objects. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface SectionCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the body object of the section. This doesn't include the header/footer and other section metadata. + * + * @remarks + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyLoadOptions; + } + /** + * Represents a setting of the add-in. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export interface SettingLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the key of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + key?: boolean; + /** + * Specifies the value of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + value?: boolean; + } + /** + * Contains the collection of {@link Word.Setting} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export interface SettingCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the key of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + key?: boolean; + /** + * For EACH ITEM in the collection: Specifies the value of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + value?: boolean; + } + /** + * Contains a collection of {@link Word.Style} objects. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export interface StyleCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + + /** + * For EACH ITEM in the collection: Gets a font object that represents the character formatting of the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + font?: Word.Interfaces.FontLoadOptions; + + /** + * For EACH ITEM in the collection: Gets a ParagraphFormat object that represents the paragraph settings for the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + paragraphFormat?: Word.Interfaces.ParagraphFormatLoadOptions; + /** + * For EACH ITEM in the collection: Gets a Shading object that represents the shading for the specified style. Not applicable to List style. + * + * @remarks + * [Api set: WordApi 1.6] + */ + shading?: Word.Interfaces.ShadingLoadOptions; + /** + * For EACH ITEM in the collection: Gets a TableStyle object representing Style properties that can be applied to a table. + * + * @remarks + * [Api set: WordApi 1.6] + */ + tableStyle?: Word.Interfaces.TableStyleLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the name of an existing style to use as the base formatting of another style. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. + */ + baseStyle?: boolean; + /** + * For EACH ITEM in the collection: Gets whether the specified style is a built-in style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + builtIn?: boolean; + /** + * For EACH ITEM in the collection: Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + inUse?: boolean; + /** + * For EACH ITEM in the collection: Gets whether a style is a linked style that can be used for both paragraph and character formatting. + * + * @remarks + * [Api set: WordApi 1.5] + */ + linked?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of a style in the language of the user. + * + * @remarks + * [Api set: WordApi 1.5] + */ + nameLocal?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. + */ + nextParagraphStyle?: boolean; + /** + * For EACH ITEM in the collection: Specifies the priority. + * + * @remarks + * [Api set: WordApi 1.5] + */ + priority?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the style corresponds to an available quick style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + quickStyle?: boolean; + /** + * For EACH ITEM in the collection: Gets the style type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + unhideWhenUsed?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. + * + * @remarks + * [Api set: WordApi 1.5] + */ + visibility?: boolean; + } + /** + * Represents a style in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface StyleLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + + /** + * Gets a font object that represents the character formatting of the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + font?: Word.Interfaces.FontLoadOptions; + + /** + * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + paragraphFormat?: Word.Interfaces.ParagraphFormatLoadOptions; + /** + * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. + * + * @remarks + * [Api set: WordApi 1.6] + */ + shading?: Word.Interfaces.ShadingLoadOptions; + /** + * Gets a TableStyle object representing Style properties that can be applied to a table. + * + * @remarks + * [Api set: WordApi 1.6] + */ + tableStyle?: Word.Interfaces.TableStyleLoadOptions; + /** + * Specifies the name of an existing style to use as the base formatting of another style. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. + */ + baseStyle?: boolean; + /** + * Gets whether the specified style is a built-in style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + builtIn?: boolean; + /** + * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + inUse?: boolean; + /** + * Gets whether a style is a linked style that can be used for both paragraph and character formatting. + * + * @remarks + * [Api set: WordApi 1.5] + */ + linked?: boolean; + /** + * Gets the name of a style in the language of the user. + * + * @remarks + * [Api set: WordApi 1.5] + */ + nameLocal?: boolean; + /** + * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. + */ + nextParagraphStyle?: boolean; + /** + * Specifies the priority. + * + * @remarks + * [Api set: WordApi 1.5] + */ + priority?: boolean; + /** + * Specifies whether the style corresponds to an available quick style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + quickStyle?: boolean; + /** + * Gets the style type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: boolean; + /** + * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + unhideWhenUsed?: boolean; + /** + * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. + * + * @remarks + * [Api set: WordApi 1.5] + */ + visibility?: boolean; + } + /** + * Represents the shading object. + * + * @remarks + * [Api set: WordApi 1.6] + */ + export interface ShadingLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi 1.6] + */ + backgroundPatternColor?: boolean; + + + } + /** + * Represents a table in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface TableLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Gets the parent body of the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the table that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the table cell that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table cell that contains this table. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table that contains this table. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + alignment?: boolean; + /** + * Specifies the number of header rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + headerRowCount?: boolean; + /** + * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * Indicates whether all of the table rows are uniform. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isUniform?: boolean; + /** + * Gets the nesting level of the table. Top-level tables have level 1. + * + * @remarks + * [Api set: WordApi 1.3] + */ + nestingLevel?: boolean; + /** + * Gets the number of rows in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowCount?: boolean; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + style?: boolean; + /** + * Specifies whether the table has banded columns. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedColumns?: boolean; + /** + * Specifies whether the table has banded rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedRows?: boolean; + /** + * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * Specifies whether the table has a first column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleFirstColumn?: boolean; + /** + * Specifies whether the table has a last column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleLastColumn?: boolean; + /** + * Specifies whether the table has a total (last) row with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleTotalRow?: boolean; + /** + * Specifies the text values in the table, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: boolean; + /** + * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + /** + * Specifies the width of the table in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * Represents the TableStyle object. + * + * @remarks + * [Api set: WordApi 1.6] + */ + export interface TableStyleLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + + + /** + * Specifies the amount of space to add between the contents and the bottom borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + bottomCellMargin?: boolean; + /** + * Specifies the spacing (in points) between the cells in a table style. + * + * @remarks + * [Api set: WordApi 1.6] + */ + cellSpacing?: boolean; + /** + * Specifies the amount of space to add between the contents and the left borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + leftCellMargin?: boolean; + /** + * Specifies the amount of space to add between the contents and the right borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + rightCellMargin?: boolean; + /** + * Specifies the amount of space to add between the contents and the top borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + topCellMargin?: boolean; + } + /** + * Contains the collection of the document's Table objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface TableCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent body of the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains this table. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains this table. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + alignment?: boolean; + /** + * For EACH ITEM in the collection: Specifies the number of header rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + headerRowCount?: boolean; + /** + * For EACH ITEM in the collection: Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * For EACH ITEM in the collection: Indicates whether all of the table rows are uniform. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isUniform?: boolean; + /** + * For EACH ITEM in the collection: Gets the nesting level of the table. Top-level tables have level 1. + * + * @remarks + * [Api set: WordApi 1.3] + */ + nestingLevel?: boolean; + /** + * For EACH ITEM in the collection: Gets the number of rows in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowCount?: boolean; + /** + * For EACH ITEM in the collection: Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * For EACH ITEM in the collection: Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + style?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the table has banded columns. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedColumns?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the table has banded rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedRows?: boolean; + /** + * For EACH ITEM in the collection: Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the table has a first column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleFirstColumn?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the table has a last column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleLastColumn?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the table has a total (last) row with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleTotalRow?: boolean; + /** + * For EACH ITEM in the collection: Specifies the text values in the table, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: boolean; + /** + * For EACH ITEM in the collection: Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + /** + * For EACH ITEM in the collection: Specifies the width of the table in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * Represents a row in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface TableRowLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Gets parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the number of cells in the row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cellCount?: boolean; + /** + * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isHeader?: boolean; + /** + * Specifies the preferred height of the row in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + preferredHeight?: boolean; + /** + * Gets the index of the row in its parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowIndex?: boolean; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * Specifies the text values in the row, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: boolean; + /** + * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + } + /** + * Contains the collection of the document's TableRow objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface TableRowCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * For EACH ITEM in the collection: Gets parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the number of cells in the row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cellCount?: boolean; + /** + * For EACH ITEM in the collection: Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * For EACH ITEM in the collection: Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isHeader?: boolean; + /** + * For EACH ITEM in the collection: Specifies the preferred height of the row in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + preferredHeight?: boolean; + /** + * For EACH ITEM in the collection: Gets the index of the row in its parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowIndex?: boolean; + /** + * For EACH ITEM in the collection: Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * For EACH ITEM in the collection: Specifies the text values in the row, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: boolean; + /** + * For EACH ITEM in the collection: Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + } + /** + * Represents a table cell in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface TableCellLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the body object of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the parent row of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentRow?: Word.Interfaces.TableRowLoadOptions; + /** + * Gets the parent table of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the index of the cell in its row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cellIndex?: boolean; + /** + * Specifies the width of the cell's column in points. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + */ + columnWidth?: boolean; + /** + * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * Gets the index of the cell's row in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowIndex?: boolean; + /** + * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * Specifies the text of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: boolean; + /** + * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + /** + * Gets the width of the cell in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * Contains the collection of the document's TableCell objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface TableCellCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the body object of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent row of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentRow?: Word.Interfaces.TableRowLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent table of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the index of the cell in its row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cellIndex?: boolean; + /** + * For EACH ITEM in the collection: Specifies the width of the cell's column in points. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + */ + columnWidth?: boolean; + /** + * For EACH ITEM in the collection: Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * For EACH ITEM in the collection: Gets the index of the cell's row in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowIndex?: boolean; + /** + * For EACH ITEM in the collection: Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * For EACH ITEM in the collection: Specifies the text of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: boolean; + /** + * For EACH ITEM in the collection: Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + /** + * For EACH ITEM in the collection: Gets the width of the cell in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * Specifies the border style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface TableBorderLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the table border color. + * + * @remarks + * [Api set: WordApi 1.3] + */ + color?: boolean; + /** + * Specifies the type of the table border. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: boolean; + /** + * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * Represents a tracked change in a Word document. + * + * @remarks + * [Api set: WordApi 1.6] + */ + export interface TrackedChangeLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the author of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + author?: boolean; + /** + * Gets the date of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + date?: boolean; + /** + * Gets the text of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + text?: boolean; + /** + * Gets the type of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + type?: boolean; + } + /** + * Contains a collection of {@link Word.TrackedChange} objects. + * + * @remarks + * [Api set: WordApi 1.6] + */ + export interface TrackedChangeCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the author of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + author?: boolean; + /** + * For EACH ITEM in the collection: Gets the date of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + date?: boolean; + /** + * For EACH ITEM in the collection: Gets the text of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + text?: boolean; + /** + * For EACH ITEM in the collection: Gets the type of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + type?: boolean; + } + } +} +export declare namespace Word { + /** + * The RequestContext object facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the request context is required to get access to the Word object model from the add-in. + */ + export class RequestContext extends OfficeExtension.ClientRequestContext { + constructor(url?: string); + readonly document: Document; + /** [Api set: WordApi 1.3] **/ + readonly application: Application; + } + /** + * Executes a batch script that performs actions on the Word object model, using the RequestContext of previously created API objects. + * @param objects - An array of previously created API objects. The array will be validated to make sure that all of the objects share the same context. The batch will use this shared RequestContext, which means that any changes applied to these objects will be picked up by `context.sync()`. + * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of `context.sync()`). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. + */ + export function run(objects: OfficeExtension.ClientObject[], batch: (context: Word.RequestContext) => Promise): Promise; + /** + * Executes a batch script that performs actions on the Word object model, using the RequestContext of a previously created API object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + * @param object - A previously created API object. The batch will use the same RequestContext as the passed-in object, which means that any changes applied to the object will be picked up by `context.sync()`. + * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of `context.sync()`). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. + */ + export function run(object: OfficeExtension.ClientObject, batch: (context: Word.RequestContext) => Promise): Promise; + /** + * Executes a batch script that performs actions on the Word object model, using a new RequestContext. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of `context.sync()`). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. + */ + export function run(batch: (context: Word.RequestContext) => Promise): Promise; +} + + +//////////////////////////////////////////////////////////////// +//////////////////////// End Word APIs ///////////////////////// +//////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/generate-docs/api-extractor-inputs-word-release/word_desktop_1_1/word-desktop1.d.ts b/generate-docs/api-extractor-inputs-word-release/word_desktop_1_1/word-desktop1.d.ts index ce15a25c64..0e8b61e8e3 100644 --- a/generate-docs/api-extractor-inputs-word-release/word_desktop_1_1/word-desktop1.d.ts +++ b/generate-docs/api-extractor-inputs-word-release/word_desktop_1_1/word-desktop1.d.ts @@ -747,10 +747,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the body at the specified location. * @@ -896,8 +897,208 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.BodyData; } - - + /** + * Represents the Border object for text, a paragraph, or a table. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + export class Border extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies the color for the border. Color is specified in ‘#RRGGBB’ format or by using the color name. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + color: string; + /** + * Gets the location of the border. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + readonly location: Word.BorderLocation | "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"; + /** + * Specifies the border type for the border. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + type: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; + /** + * Specifies whether the border is visible. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + visible: boolean; + /** + * Specifies the width for the border. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + width: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.BorderUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Border): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.BorderLoadOptions): Word.Border; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Border; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Border; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Border; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Border; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Border` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.BorderData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.BorderData; + } + /** + * Represents the collection of border styles. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + export class BorderCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.Border[]; + /** + * Specifies the 24-bit color of the inside borders. Color is specified in ‘#RRGGBB’ format or by using the color name. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + insideBorderColor: string; + /** + * Specifies the border type of the inside borders. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + insideBorderType: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; + /** + * Specifies the width of the inside borders. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + insideBorderWidth: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; + /** + * Specifies the 24-bit color of the outside borders. Color is specified in ‘#RRGGBB’ format or by using the color name. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + outsideBorderColor: string; + /** + * Specifies the border type of the outside borders. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + outsideBorderType: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; + /** + * Specifies the width of the outside borders. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + outsideBorderWidth: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; + /** + * Gets the border that has the specified location. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + getByLocation(borderLocation: Word.BorderLocation.top | Word.BorderLocation.left | Word.BorderLocation.bottom | Word.BorderLocation.right | Word.BorderLocation.insideHorizontal | Word.BorderLocation.insideVertical | "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical"): Word.Border; + /** + * Gets the first border in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + getFirst(): Word.Border; + /** + * Gets the first border in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + getFirstOrNullObject(): Word.Border; + /** + * Gets a Border object by its index in the collection. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + * + * @param index - A number that identifies the index location of a Border object. + */ + getItem(index: number): Word.Border; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.BorderCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.BorderCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.BorderCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.BorderCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.BorderCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.BorderCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.BorderCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.BorderCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.BorderCollectionData; + } /** * The data specific to content controls of type CheckBox. * @@ -1429,12 +1630,19 @@ export declare namespace Word { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ readonly checkboxContentControl: Word.CheckboxContentControl; + /** + * Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly comboBoxContentControl: Word.ComboBoxContentControl; /** * Gets the collection of content control objects in the content control. * @@ -1442,6 +1650,13 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ readonly contentControls: Word.ContentControlCollection; + /** + * Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly dropDownListContentControl: Word.DropDownListContentControl; /** * Gets the collection of endnotes in the content control. * @@ -2081,6 +2296,152 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.ContentControlCollectionData; } + /** + * Represents a list item in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class ContentControlListItem extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText: string; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index: number; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value: string; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ContentControlListItemUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.ContentControlListItem): void; + /** + * Deletes the list item. + * + * @remarks + * [Api set: WordApi 1.9] + */ + delete(): void; + /** + * Selects the list item and sets the text of the content control to the value of the list item. + * + * @remarks + * [Api set: WordApi 1.9] + */ + select(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ContentControlListItemLoadOptions): Word.ContentControlListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ContentControlListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ContentControlListItem; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ContentControlListItem; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ContentControlListItem; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ContentControlListItem` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ContentControlListItemData; + } + /** + * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class ContentControlListItemCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.ContentControlListItem[]; + /** + * Gets the first list item in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.9] + */ + getFirst(): Word.ContentControlListItem; + /** + * Gets the first list item in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. + For further information, + see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.9] + */ + getFirstOrNullObject(): Word.ContentControlListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ContentControlListItemCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ContentControlListItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ContentControlListItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ContentControlListItemCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ContentControlListItemCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ContentControlListItemCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ContentControlListItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.ContentControlListItemCollectionData; + } /** * Specifies the options that define which content controls are returned. * @@ -2089,12 +2450,13 @@ export declare namespace Word { */ export interface ContentControlOptions { /** - * An array of content control types, item must be 'RichText', 'PlainText', or 'CheckBox'. + * An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. * * @remarks * [Api set: WordApi 1.5] * - * Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. + * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9. */ types: Word.ContentControlType[]; } @@ -2825,7 +3187,16 @@ export declare namespace Word { * @param closeBehaviorString - Optional. The close behavior must be 'Save' or 'SkipSave'. Default value is 'Save'. */ close(closeBehaviorString?: "Save" | "SkipSave"): void; - + /** + * Displays revision marks that indicate where the specified document differs from another document. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + * + * @param filePath - Required. The path of the document with which the specified document is compared. + * @param documentCompareOptions - Optional. The additional options that specifies the behavior of comparing document. + */ + compare(filePath: string, documentCompareOptions?: Word.DocumentCompareOptions): void; /** * Deletes a bookmark, if it exists, from the document. * @@ -2918,9 +3289,24 @@ export declare namespace Word { * @remarks * [Api set: WordApi 1.6] * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * + * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. + */ + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult; + /** + * Import styles from a JSON-formatted string. + * + * @remarks + * [Api set: WordApi 1.6] + * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehaviorString - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. */ - importStylesFromJson(stylesJson: string): OfficeExtension.ClientResult; + importStylesFromJson(stylesJson: string, importedStylesConflictBehaviorString?: "Ignore" | "Overwrite" | "CreateNew"): OfficeExtension.ClientResult; /** * Inserts a document into the target document at a specific location with additional properties. Headers, footers, watermarks, and other section properties are copied by default. @@ -3481,6 +3867,132 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.DocumentPropertiesData; } + /** + * The data specific to content controls of type DropDownList. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class DropDownListContentControl extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of list items in the dropdown list content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly listItems: Word.ContentControlListItemCollection; + /** + * Adds a new list item to this dropdown list content control and returns a {@link Word.ContentControlListItem} object. + * + * @remarks + * [Api set: WordApi 1.9] + * + * @param displayText - Required. Display text of the list item. + * @param value - Optional. Value of the list item. + * @param index - Optional. Index location of the new item in the list. If an item exists at the position specified, the existing item is pushed down in the list. If omitted, the new item is added to the end of the list. + */ + addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem; + /** + * Deletes all list items in this dropdown list content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + deleteAllListItems(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.DropDownListContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.DropDownListContentControl; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.DropDownListContentControl; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.DropDownListContentControl; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.DropDownListContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DropDownListContentControlData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.DropDownListContentControlData; + } + /** + * The data specific to content controls of type 'ComboBox'. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class ComboBoxContentControl extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of list items in the combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly listItems: Word.ContentControlListItemCollection; + /** + * Adds a new list item to this combo box content control and returns a {@link Word.ContentControlListItem} object. + * + * @remarks + * [Api set: WordApi 1.9] + * + * @param displayText - Required. Display text of the list item. + * @param value - Optional. Value of the list item. + * @param index - Optional. Index location of the new item in the list. If an item exists at the position specified, the existing item is pushed down in the list. If omitted, the new item is added to the end of the list. + */ + addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem; + /** + * Deletes all list items in this combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + deleteAllListItems(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ComboBoxContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ComboBoxContentControl; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ComboBoxContentControl; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ComboBoxContentControl; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ComboBoxContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ComboBoxContentControlData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ComboBoxContentControlData; + } /** * Represents a field. * @@ -3582,7 +4094,13 @@ export declare namespace Word { * [Api set: WordApi 1.5] */ locked: boolean; - + /** + * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + showCodes: boolean; /** * Gets the field's type. * @@ -3966,7 +4484,13 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ hyperlink: string; - + /** + * Gets the format of the inline image. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + readonly imageFormat: Word.ImageFormat | "Unsupported" | "Undefined" | "Bmp" | "Jpeg" | "Gif" | "Tiff" | "Png" | "Icon" | "Exif" | "Wmf" | "Emf" | "Pict" | "Pdf" | "Svg"; /** * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. * @@ -4252,7 +4776,15 @@ export declare namespace Word { * [Api set: WordApi 1.3] */ readonly levelTypes: Word.ListLevelType[]; - + /** + * Gets the font of the bullet, number, or picture at the specified level in the list. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + * + * @param level - Required. The level in the list. + */ + getLevelFont(level: number): Word.Font; /** * Gets the paragraphs that occur at the specified level in the list. * @@ -4262,7 +4794,15 @@ export declare namespace Word { * @param level - Required. The level in the list. */ getLevelParagraphs(level: number): Word.ParagraphCollection; - + /** + * Gets the Base64-encoded string representation of the picture at the specified level in the list. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + * + * @param level - Required. The level in the list. + */ + getLevelPicture(level: number): OfficeExtension.ClientResult; /** * Gets the bullet, number, or picture at the specified level as a string. * @@ -4282,7 +4822,16 @@ export declare namespace Word { * @param insertLocation - Required. The value must be 'Start', 'End', 'Before', or 'After'. */ insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): Word.Paragraph; - + /** + * Resets the font of the bullet, number, or picture at the specified level in the list. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + * + * @param level - Required. The level in the list. + * @param resetFontName - Optional. Indicates whether to reset the font name. Default is false that indicates the font name is kept unchanged. + */ + resetLevelFont(level: number, resetFontName?: boolean): void; /** * Sets the alignment of the bullet, number, or picture at the specified level in the list. * @@ -4360,7 +4909,16 @@ export declare namespace Word { * @param formatString - Optional. The numbering string format defined as an array of strings and/or integers. Each integer is a level of number type that is higher than or equal to this level. For example, an array of ["(", level - 1, ".", level, ")"] can define the format of "(2.c)", where 2 is the parent's item number and c is this level's item number. */ setLevelNumbering(level: number, listNumberingString: "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter", formatString?: Array): void; - + /** + * Sets the picture at the specified level in the list. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + * + * @param level - Required. The level in the list. + * @param base64EncodedImage - Optional. The Base64-encoded image to be set. If not given, the default picture is set. + */ + setLevelPicture(level: number, base64EncodedImage?: string): void; /** * Sets the starting number at the specified level in the list. Default value is 1. * @@ -4590,80 +5148,112 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.ListItemData; } - - - /** - * Represents a footnote or endnote. + * Represents a list level. * * @remarks - * [Api set: WordApi 1.5] + * [Api set: WordApiDesktop 1.1] */ - export class NoteItem extends OfficeExtension.ClientObject { + export class ListLevel extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** - * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. + * Gets a Font object that represents the character formatting of the specified object. * * @remarks - * [Api set: WordApi 1.5] + * [Api set: WordApiDesktop 1.1] */ - readonly body: Word.Body; + readonly font: Word.Font; /** - * Represents a footnote or endnote reference in the main document. + * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. * * @remarks - * [Api set: WordApi 1.5] + * [Api set: WordApiDesktop 1.1] */ - readonly reference: Word.Range; + alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; /** - * Represents the note item type: footnote or endnote. + * Specifies the name of the style that's linked to the specified list level object. * * @remarks - * [Api set: WordApi 1.5] + * [Api set: WordApiDesktop 1.1] */ - readonly type: Word.NoteItemType | "Footnote" | "Endnote"; + linkedStyle: string; /** - * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + * Specifies the number format for the specified list level. + * + * @remarks + * [Api set: WordApiDesktop 1.1] */ - set(properties: Interfaces.NoteItemUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.NoteItem): void; + numberFormat: string; /** - * Deletes the note item. + * Specifies the position (in points) of the number or bullet for the specified list level object. * * @remarks - * [Api set: WordApi 1.5] + * [Api set: WordApiDesktop 1.1] */ - delete(): void; + numberPosition: number; /** - * Gets the next note item of the same type. Throws an `ItemNotFound` error if this note item is the last one. + * Specifies the number style for the list level object. * * @remarks - * [Api set: WordApi 1.5] + * [Api set: WordApiDesktop 1.1] */ - getNext(): Word.NoteItem; + numberStyle: Word.ListBuiltInNumberStyle | "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter" | "Ordinal" | "CardinalText" | "OrdinalText" | "Kanji" | "KanjiDigit" | "AiueoHalfWidth" | "IrohaHalfWidth" | "ArabicFullWidth" | "KanjiTraditional" | "KanjiTraditional2" | "NumberInCircle" | "Aiueo" | "Iroha" | "ArabicLZ" | "Bullet" | "Ganada" | "Chosung" | "GBNum1" | "GBNum2" | "GBNum3" | "GBNum4" | "Zodiac1" | "Zodiac2" | "Zodiac3" | "TradChinNum1" | "TradChinNum2" | "TradChinNum3" | "TradChinNum4" | "SimpChinNum1" | "SimpChinNum2" | "SimpChinNum3" | "SimpChinNum4" | "HanjaRead" | "HanjaReadDigit" | "Hangul" | "Hanja" | "Hebrew1" | "Arabic1" | "Hebrew2" | "Arabic2" | "HindiLetter1" | "HindiLetter2" | "HindiArabic" | "HindiCardinalText" | "ThaiLetter" | "ThaiArabic" | "ThaiCardinalText" | "VietCardinalText" | "LowercaseRussian" | "UppercaseRussian" | "LowercaseGreek" | "UppercaseGreek" | "ArabicLZ2" | "ArabicLZ3" | "ArabicLZ4" | "LowercaseTurkish" | "UppercaseTurkish" | "LowercaseBulgarian" | "UppercaseBulgarian" | "PictureBullet" | "Legal" | "LegalLZ"; /** - * Gets the next note item of the same type. If this note item is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * Specifies the list level that must appear before the specified list level restarts numbering at 1. * * @remarks - * [Api set: WordApi 1.5] + * [Api set: WordApiDesktop 1.1] */ - getNextOrNullObject(): Word.NoteItem; + resetOnHigher: number; + /** + * Specifies the starting number for the specified list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + startAt: number; + /** + * Specifies the tab position for the specified list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + tabPosition: number; + /** + * Specifies the position (in points) for the second line of wrapping text for the specified list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + textPosition: number; + /** + * Specifies the character inserted after the number for the specified list level. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + trailingCharacter: Word.TrailingCharacter | "TrailingTab" | "TrailingSpace" | "TrailingNone"; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ListLevelUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.ListLevel): void; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options - Provides options for which properties of the object to load. */ - load(options?: Word.Interfaces.NoteItemLoadOptions): Word.NoteItem; + load(options?: Word.Interfaces.ListLevelLoadOptions): Word.ListLevel; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. */ - load(propertyNames?: string | string[]): Word.NoteItem; + load(propertyNames?: string | string[]): Word.ListLevel; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * @@ -4672,152 +5262,369 @@ export declare namespace Word { load(propertyNamesAndPaths?: { select?: string; expand?: string; - }): Word.NoteItem; + }): Word.ListLevel; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ - track(): Word.NoteItem; + track(): Word.ListLevel; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ - untrack(): Word.NoteItem; + untrack(): Word.ListLevel; /** * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) - * Whereas the original `Word.NoteItem` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.NoteItemData`) that contains shallow copies of any loaded child properties from the original object. + * Whereas the original `Word.ListLevel` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListLevelData`) that contains shallow copies of any loaded child properties from the original object. */ - toJSON(): Word.Interfaces.NoteItemData; + toJSON(): Word.Interfaces.ListLevelData; } /** - * Contains a collection of {@link Word.NoteItem} objects. + * Contains a collection of {@link Word.ListLevel} objects. * * @remarks - * [Api set: WordApi 1.5] + * [Api set: WordApiDesktop 1.1] */ - export class NoteItemCollection extends OfficeExtension.ClientObject { + export class ListLevelCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** Gets the loaded child items in this collection. */ - readonly items: Word.NoteItem[]; + readonly items: Word.ListLevel[]; /** - * Gets the first note item in this collection. Throws an `ItemNotFound` error if this collection is empty. + * Gets the first list level in this collection. Throws an `ItemNotFound` error if this collection is empty. * * @remarks - * [Api set: WordApi 1.5] + * [Api set: WordApiDesktop 1.1] */ - getFirst(): Word.NoteItem; + getFirst(): Word.ListLevel; /** - * Gets the first note item in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * Gets the first list level in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks - * [Api set: WordApi 1.5] + * [Api set: WordApiDesktop 1.1] */ - getFirstOrNullObject(): Word.NoteItem; + getFirstOrNullObject(): Word.ListLevel; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options - Provides options for which properties of the object to load. */ - load(options?: Word.Interfaces.NoteItemCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.NoteItemCollection; + load(options?: Word.Interfaces.ListLevelCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ListLevelCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. */ - load(propertyNames?: string | string[]): Word.NoteItemCollection; + load(propertyNames?: string | string[]): Word.ListLevelCollection; /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.NoteItemCollection; + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ListLevelCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ - track(): Word.NoteItemCollection; + track(): Word.ListLevelCollection; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ - untrack(): Word.NoteItemCollection; + untrack(): Word.ListLevelCollection; /** * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) - * Whereas the original `Word.NoteItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.NoteItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + * Whereas the original `Word.ListLevelCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListLevelCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. */ - toJSON(): Word.Interfaces.NoteItemCollectionData; + toJSON(): Word.Interfaces.ListLevelCollectionData; } /** - * Represents a single paragraph in a selection, range, content control, or document body. + * Represents a ListTemplate. * * @remarks - * [Api set: WordApi 1.1] + * [Api set: WordApiDesktop 1.1] */ - export class Paragraph extends OfficeExtension.ClientObject { + export class ListTemplate extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** - * Gets the collection of content control objects in the paragraph. + * Gets a ListLevels collection that represents all the levels for the specified ListTemplate. * * @remarks - * [Api set: WordApi 1.1] + * [Api set: WordApiDesktop 1.1] */ - readonly contentControls: Word.ContentControlCollection; + readonly listLevels: Word.ListLevelCollection; /** - * Gets the collection of endnotes in the paragraph. + * Specifies whether the specified ListTemplate object is outline numbered. * * @remarks - * [Api set: WordApi 1.5] + * [Api set: WordApiDesktop 1.1] */ - readonly endnotes: Word.NoteItemCollection; + outlineNumbered: boolean; /** - * Gets the collection of fields in the paragraph. - * - * @remarks - * [Api set: WordApi 1.4] + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. */ - readonly fields: Word.FieldCollection; + set(properties: Interfaces.ListTemplateUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.ListTemplate): void; /** - * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * - * @remarks - * [Api set: WordApi 1.1] + * @param options - Provides options for which properties of the object to load. */ - readonly font: Word.Font; + load(options?: Word.Interfaces.ListTemplateLoadOptions): Word.ListTemplate; /** - * Gets the collection of footnotes in the paragraph. + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * - * @remarks - * [Api set: WordApi 1.5] + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. */ - readonly footnotes: Word.NoteItemCollection; + load(propertyNames?: string | string[]): Word.ListTemplate; /** - * Gets the collection of InlinePicture objects in the paragraph. The collection doesn't include floating images. + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * - * @remarks - * [Api set: WordApi 1.1] + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. */ - readonly inlinePictures: Word.InlinePictureCollection; + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ListTemplate; /** - * Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph isn't in a list. - * - * @remarks - * [Api set: WordApi 1.3] + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. */ - readonly list: Word.List; + track(): Word.ListTemplate; /** - * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. - * - * @remarks - * [Api set: WordApi 1.3] + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. */ - readonly listItem: Word.ListItem; + untrack(): Word.ListTemplate; /** - * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.ListTemplate` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListTemplateData`) that contains shallow copies of any loaded child properties from the original object. */ - readonly listItemOrNullObject: Word.ListItem; + toJSON(): Word.Interfaces.ListTemplateData; + } + /** + * Represents a footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export class NoteItem extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** - * Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly body: Word.Body; + /** + * Represents a footnote or endnote reference in the main document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly reference: Word.Range; + /** + * Represents the note item type: footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly type: Word.NoteItemType | "Footnote" | "Endnote"; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.NoteItemUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.NoteItem): void; + /** + * Deletes the note item. + * + * @remarks + * [Api set: WordApi 1.5] + */ + delete(): void; + /** + * Gets the next note item of the same type. Throws an `ItemNotFound` error if this note item is the last one. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getNext(): Word.NoteItem; + /** + * Gets the next note item of the same type. If this note item is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getNextOrNullObject(): Word.NoteItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.NoteItemLoadOptions): Word.NoteItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.NoteItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.NoteItem; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.NoteItem; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.NoteItem; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.NoteItem` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.NoteItemData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.NoteItemData; + } + /** + * Contains a collection of {@link Word.NoteItem} objects. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export class NoteItemCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.NoteItem[]; + /** + * Gets the first note item in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getFirst(): Word.NoteItem; + /** + * Gets the first note item in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getFirstOrNullObject(): Word.NoteItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.NoteItemCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.NoteItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.NoteItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.NoteItemCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.NoteItemCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.NoteItemCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.NoteItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.NoteItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.NoteItemCollectionData; + } + /** + * Represents a single paragraph in a selection, range, content control, or document body. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class Paragraph extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of content control objects in the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * Gets the collection of endnotes in the paragraph. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly endnotes: Word.NoteItemCollection; + /** + * Gets the collection of fields in the paragraph. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly fields: Word.FieldCollection; + /** + * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly font: Word.Font; + /** + * Gets the collection of footnotes in the paragraph. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly footnotes: Word.NoteItemCollection; + /** + * Gets the collection of InlinePicture objects in the paragraph. The collection doesn't include floating images. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly inlinePictures: Word.InlinePictureCollection; + /** + * Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph isn't in a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly list: Word.List; + /** + * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly listItem: Word.ListItem; + /** + * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly listItemOrNullObject: Word.ListItem; + /** + * Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks * [Api set: WordApi 1.3] @@ -5183,10 +5990,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the paragraph at the specified location. * @@ -5940,10 +6748,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts an endnote. The endnote reference is placed after the range. * @@ -6437,7 +7246,64 @@ export declare namespace Word { */ includeTextMarkedAsDeleted?: boolean; } - + /** + * Specifies the options to be included in a compare document operation. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + export interface DocumentCompareOptions { + /** + * True adds the document to the list of recently used files on the File menu. The default value is True. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + addToRecentFiles?: boolean; + /** + * The reviewer name associated with the differences generated by the comparison. + If unspecified, the value defaults to the author name of the revised document or the string "Comparison" if no author information is present. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + authorName?: string; + /** + * The target document for the comparison. Default value is 'CompareTargetCurrent'. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + compareTarget?: Word.CompareTarget | "CompareTargetCurrent" | "CompareTargetSelected" | "CompareTargetNew"; + /** + * True (default) for the comparison to include detection of format changes. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + detectFormatChanges?: boolean; + /** + * True compares the documents without notifying a user of problems. The default value is False. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + ignoreAllComparisonWarnings?: boolean; + /** + * True removes date and time stamp information from tracked changes in the returned Document object. The default value is False. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + removeDateAndTime?: boolean; + /** + * True removes all user information from comments, revisions, and the properties dialog box in the returned Document object. The default value is False. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + removePersonalInformation?: boolean; + } /** * Represents a section in a Word document. * @@ -6848,7 +7714,13 @@ export declare namespace Word { export class Style extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; - + /** + * Specifies a BorderCollection object that represents all the borders for the specified style. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + readonly borders: Word.BorderCollection; /** * Gets a font object that represents the character formatting of the specified style. * @@ -6856,7 +7728,13 @@ export declare namespace Word { * [Api set: WordApi 1.5] */ readonly font: Word.Font; - + /** + * Gets a ListTemplate object that represents the list formatting for the specified Style object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + readonly listTemplate: Word.ListTemplate; /** * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. * @@ -7025,10 +7903,22 @@ export declare namespace Word { * [Api set: WordApi 1.6] */ backgroundPatternColor: string; - - /** - * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + foregroundPatternColor: string; + /** + * Specifies the shading texture of the object. To learn more about how to apply backgrounds like textures, see {@link https://support.microsoft.com/office/db481e61-7af6-4063-bbcd-b276054a5515 | Add, change, or delete the background color in Word}. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + texture: Word.ShadingTextureType | "DarkDiagonalDown" | "DarkDiagonalUp" | "DarkGrid" | "DarkHorizontal" | "DarkTrellis" | "DarkVertical" | "LightDiagonalDown" | "LightDiagonalUp" | "LightGrid" | "LightHorizontal" | "LightTrellis" | "LightVertical" | "None" | "Percent10" | "Percent12Pt5" | "Percent15" | "Percent20" | "Percent25" | "Percent30" | "Percent35" | "Percent37Pt5" | "Percent40" | "Percent45" | "Percent5" | "Percent50" | "Percent55" | "Percent60" | "Percent62Pt5" | "Percent65" | "Percent70" | "Percent75" | "Percent80" | "Percent85" | "Percent87Pt5" | "Percent90" | "Percent95" | "Solid"; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. */ @@ -7615,8 +8505,20 @@ export declare namespace Word { export class TableStyle extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; - - + /** + * Specifies the table's alignment against the page margin. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies whether lines in tables formatted with a specified style break across pages. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + allowBreakAcrossPage: boolean; /** * Specifies the amount of space to add between the contents and the bottom borders of the cells. * @@ -7931,7 +8833,13 @@ export declare namespace Word { * [Api set: WordApi 1.3] */ getNextOrNullObject(): Word.TableRow; - + /** + * Inserts a content control on the row. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + insertContentControl(): Word.ContentControl; /** * Inserts rows using this row as a template. If values are specified, inserts the values into the new rows. * @@ -9631,7 +10539,82 @@ export declare namespace Word { */ end = "End", } - + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + enum ImageFormat { + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + unsupported = "Unsupported", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + undefined = "Undefined", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + bmp = "Bmp", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + jpeg = "Jpeg", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + gif = "Gif", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + tiff = "Tiff", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + png = "Png", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + icon = "Icon", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + exif = "Exif", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + wmf = "Wmf", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + emf = "Emf", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + pict = "Pict", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + pdf = "Pdf", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + svg = "Svg", + } /** * @remarks * [Api set: WordApi 1.3] @@ -9841,7 +10824,80 @@ export declare namespace Word { */ right = "Right", } - + /** + * Represents the width of a style's border. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + enum BorderWidth { + /** + * None width. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + none = "None", + /** + * 0.25 point. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + pt025 = "Pt025", + /** + * 0.50 point. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + pt050 = "Pt050", + /** + * 0.75 point. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + pt075 = "Pt075", + /** + * 1.00 point. This is the default. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + pt100 = "Pt100", + /** + * 1.50 points. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + pt150 = "Pt150", + /** + * 2.25 points. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + pt225 = "Pt225", + /** + * 3.00 points. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + pt300 = "Pt300", + /** + * 4.50 points. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + pt450 = "Pt450", + /** + * 6.00 points. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + pt600 = "Pt600", + /** + * Mixed width. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + mixed = "Mixed", + } /** * @remarks * [Api set: WordApi 1.3] @@ -11602,152 +12658,862 @@ export declare namespace Word { */ cold = "Cold", } - - - - - enum ErrorCodes { - accessDenied = "AccessDenied", - generalException = "GeneralException", - invalidArgument = "InvalidArgument", - itemNotFound = "ItemNotFound", - notAllowed = "NotAllowed", - notImplemented = "NotImplemented", - searchDialogIsOpen = "SearchDialogIsOpen", - searchStringInvalidOrTooLong = "SearchStringInvalidOrTooLong", + /** + * Represents the character inserted after the list item mark. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + enum TrailingCharacter { + /** + * A tab is inserted. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + trailingTab = "TrailingTab", + /** + * A space is inserted. Default. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + trailingSpace = "TrailingSpace", + /** + * No character is inserted. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + trailingNone = "TrailingNone", } - export namespace Interfaces { + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + enum ListBuiltInNumberStyle { /** - * Provides ways to load properties of only a subset of members of a collection. + * @remarks + * [Api set: WordApiDesktop 1.1] */ - export interface CollectionLoadOptions { - /** - * Specify the number of items in the queried collection to be included in the result. - */ - $top?: number; - /** - * Specify the number of items in the collection that are to be skipped and not included in the result. If top is specified, the selection of result will start after skipping the specified number of items. - */ - $skip?: number; - } - /** An interface for updating data on the `AnnotationCollection` object, for use in `annotationCollection.set({ ... })`. */ - export interface AnnotationCollectionUpdateData { - items?: Word.Interfaces.AnnotationData[]; - } - /** An interface for updating data on the `Body` object, for use in `body.set({ ... })`. */ - export interface BodyUpdateData { - /** - * Gets the text format of the body. Use this to get and set font name, size, color and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontUpdateData; - /** - * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - } - /** An interface for updating data on the `Border` object, for use in `border.set({ ... })`. */ - export interface BorderUpdateData { - - - - - } - /** An interface for updating data on the `BorderCollection` object, for use in `borderCollection.set({ ... })`. */ - export interface BorderCollectionUpdateData { - - - - - - - items?: Word.Interfaces.BorderData[]; - } - /** An interface for updating data on the `CheckboxContentControl` object, for use in `checkboxContentControl.set({ ... })`. */ - export interface CheckboxContentControlUpdateData { - /** - * Specifies the current state of the checkbox. - * - * @remarks - * [Api set: WordApi 1.7] - */ - isChecked?: boolean; - } - /** An interface for updating data on the `Comment` object, for use in `comment.set({ ... })`. */ - export interface CommentUpdateData { - /** - * Specifies the comment's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeUpdateData; - /** - * Specifies the comment's content as plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: string; - /** - * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. - * - * @remarks - * [Api set: WordApi 1.4] - */ - resolved?: boolean; - } - /** An interface for updating data on the `CommentCollection` object, for use in `commentCollection.set({ ... })`. */ - export interface CommentCollectionUpdateData { - items?: Word.Interfaces.CommentData[]; - } - /** An interface for updating data on the `CommentContentRange` object, for use in `commentContentRange.set({ ... })`. */ - export interface CommentContentRangeUpdateData { - /** - * Specifies a value that indicates whether the comment text is bold. - * - * @remarks - * [Api set: WordApi 1.4] - */ - bold?: boolean; - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - hyperlink?: string; - /** - * Specifies a value that indicates whether the comment text is italicized. - * - * @remarks - * [Api set: WordApi 1.4] - */ - italic?: boolean; - /** - * Specifies a value that indicates whether the comment text has a strikethrough. - * - * @remarks - * [Api set: WordApi 1.4] - */ - strikeThrough?: boolean; - /** - * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. - * - * @remarks - * [Api set: WordApi 1.4] + none = "None", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + arabic = "Arabic", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + upperRoman = "UpperRoman", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + lowerRoman = "LowerRoman", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + upperLetter = "UpperLetter", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + lowerLetter = "LowerLetter", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + ordinal = "Ordinal", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + cardinalText = "CardinalText", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + ordinalText = "OrdinalText", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + kanji = "Kanji", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + kanjiDigit = "KanjiDigit", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + aiueoHalfWidth = "AiueoHalfWidth", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + irohaHalfWidth = "IrohaHalfWidth", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + arabicFullWidth = "ArabicFullWidth", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + kanjiTraditional = "KanjiTraditional", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + kanjiTraditional2 = "KanjiTraditional2", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + numberInCircle = "NumberInCircle", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + aiueo = "Aiueo", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + iroha = "Iroha", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + arabicLZ = "ArabicLZ", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + bullet = "Bullet", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + ganada = "Ganada", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + chosung = "Chosung", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + gbnum1 = "GBNum1", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + gbnum2 = "GBNum2", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + gbnum3 = "GBNum3", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + gbnum4 = "GBNum4", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + zodiac1 = "Zodiac1", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + zodiac2 = "Zodiac2", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + zodiac3 = "Zodiac3", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + tradChinNum1 = "TradChinNum1", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + tradChinNum2 = "TradChinNum2", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + tradChinNum3 = "TradChinNum3", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + tradChinNum4 = "TradChinNum4", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + simpChinNum1 = "SimpChinNum1", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + simpChinNum2 = "SimpChinNum2", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + simpChinNum3 = "SimpChinNum3", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + simpChinNum4 = "SimpChinNum4", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + hanjaRead = "HanjaRead", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + hanjaReadDigit = "HanjaReadDigit", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + hangul = "Hangul", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + hanja = "Hanja", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + hebrew1 = "Hebrew1", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + arabic1 = "Arabic1", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + hebrew2 = "Hebrew2", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + arabic2 = "Arabic2", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + hindiLetter1 = "HindiLetter1", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + hindiLetter2 = "HindiLetter2", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + hindiArabic = "HindiArabic", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + hindiCardinalText = "HindiCardinalText", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + thaiLetter = "ThaiLetter", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + thaiArabic = "ThaiArabic", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + thaiCardinalText = "ThaiCardinalText", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + vietCardinalText = "VietCardinalText", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + lowercaseRussian = "LowercaseRussian", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + uppercaseRussian = "UppercaseRussian", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + lowercaseGreek = "LowercaseGreek", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + uppercaseGreek = "UppercaseGreek", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + arabicLZ2 = "ArabicLZ2", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + arabicLZ3 = "ArabicLZ3", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + arabicLZ4 = "ArabicLZ4", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + lowercaseTurkish = "LowercaseTurkish", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + uppercaseTurkish = "UppercaseTurkish", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + lowercaseBulgarian = "LowercaseBulgarian", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + uppercaseBulgarian = "UppercaseBulgarian", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + pictureBullet = "PictureBullet", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + legal = "Legal", + /** + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + legalLZ = "LegalLZ", + } + /** + * Represents the shading texture. To learn more about how to apply backgrounds like textures, see {@link https://support.microsoft.com/office/db481e61-7af6-4063-bbcd-b276054a5515 | Add, change, or delete the background color in Word}. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + enum ShadingTextureType { + /** + * Represents dark diagonal-down texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + darkDiagonalDown = "DarkDiagonalDown", + /** + * Represents dark diagonal-up texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + darkDiagonalUp = "DarkDiagonalUp", + /** + * Represents dark horizontal-cross texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + darkGrid = "DarkGrid", + /** + * Represents dark horizontal texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + darkHorizontal = "DarkHorizontal", + /** + * Represents dark diagonal-cross texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + darkTrellis = "DarkTrellis", + /** + * Represents dark vertical texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + darkVertical = "DarkVertical", + /** + * Represents light diagonal-down texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + lightDiagonalDown = "LightDiagonalDown", + /** + * Represents light diagonal-up texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + lightDiagonalUp = "LightDiagonalUp", + /** + * Represents light horizontal-cross texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + lightGrid = "LightGrid", + /** + * Represents light horizontal texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + lightHorizontal = "LightHorizontal", + /** + * Represents light diagonal-cross texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + lightTrellis = "LightTrellis", + /** + * Represents light vertical texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + lightVertical = "LightVertical", + /** + * Represents that there's no texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + none = "None", + /** + * Represents 10 percent texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + percent10 = "Percent10", + /** + * Represents 12.5 percent texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + percent12Pt5 = "Percent12Pt5", + /** + * Represents 15 percent texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + percent15 = "Percent15", + /** + * Represents 20 percent texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + percent20 = "Percent20", + /** + * Represents 25 percent texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + percent25 = "Percent25", + /** + * Represents 30 percent texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + percent30 = "Percent30", + /** + * Represents 35 percent texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + percent35 = "Percent35", + /** + * Represents 37.5 percent texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + percent37Pt5 = "Percent37Pt5", + /** + * Represents 40 percent texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + percent40 = "Percent40", + /** + * Represents 45 percent texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + percent45 = "Percent45", + /** + * Represents 5 percent texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + percent5 = "Percent5", + /** + * Represents 50 percent texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + percent50 = "Percent50", + /** + * Represents 55 percent texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + percent55 = "Percent55", + /** + * Represents 60 percent texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + percent60 = "Percent60", + /** + * Represents 62.5 percent texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + percent62Pt5 = "Percent62Pt5", + /** + * Represents 65 percent texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + percent65 = "Percent65", + /** + * Represents 70 percent texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + percent70 = "Percent70", + /** + * Represents 75 percent texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + percent75 = "Percent75", + /** + * Represents 80 percent texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + percent80 = "Percent80", + /** + * Represents 85 percent texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + percent85 = "Percent85", + /** + * Represents 87.5 percent texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + percent87Pt5 = "Percent87Pt5", + /** + * Represents 90 percent texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + percent90 = "Percent90", + /** + * Represents 95 percent texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + percent95 = "Percent95", + /** + * Represents solid texture. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + solid = "Solid", + } + /** + * Specifies the target document for displaying document comparison differences. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + enum CompareTarget { + /** + * Places comparison differences in the current document. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + compareTargetCurrent = "CompareTargetCurrent", + /** + * Places comparison differences in the target document. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + compareTargetSelected = "CompareTargetSelected", + /** + * Places comparison differences in a new document. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + compareTargetNew = "CompareTargetNew", + } + /** + * Specifies how to handle any conflicts, that is, when imported styles have the same name as existing styles in the current document. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + enum ImportedStylesConflictBehavior { + /** + * Ignore conflicting imported styles and keep the existing version of those styles in the current document. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + ignore = "Ignore", + /** + * Overwrite the existing styles in the current document. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + overwrite = "Overwrite", + /** + * Rename conflicting imported styles so that both versions are kept in the current document. For example, if MyStyle already exists in the document, then the imported version could be added as MyStyle1. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + createNew = "CreateNew", + } + enum ErrorCodes { + accessDenied = "AccessDenied", + generalException = "GeneralException", + invalidArgument = "InvalidArgument", + itemNotFound = "ItemNotFound", + notAllowed = "NotAllowed", + notImplemented = "NotImplemented", + searchDialogIsOpen = "SearchDialogIsOpen", + searchStringInvalidOrTooLong = "SearchStringInvalidOrTooLong", + } + export namespace Interfaces { + /** + * Provides ways to load properties of only a subset of members of a collection. + */ + export interface CollectionLoadOptions { + /** + * Specify the number of items in the queried collection to be included in the result. + */ + $top?: number; + /** + * Specify the number of items in the collection that are to be skipped and not included in the result. If top is specified, the selection of result will start after skipping the specified number of items. + */ + $skip?: number; + } + /** An interface for updating data on the `AnnotationCollection` object, for use in `annotationCollection.set({ ... })`. */ + export interface AnnotationCollectionUpdateData { + items?: Word.Interfaces.AnnotationData[]; + } + /** An interface for updating data on the `Body` object, for use in `body.set({ ... })`. */ + export interface BodyUpdateData { + /** + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + } + /** An interface for updating data on the `Border` object, for use in `border.set({ ... })`. */ + export interface BorderUpdateData { + /** + * Specifies the color for the border. Color is specified in ‘#RRGGBB’ format or by using the color name. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + color?: string; + /** + * Specifies the border type for the border. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; + /** + * Specifies whether the border is visible. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + visible?: boolean; + /** + * Specifies the width for the border. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + width?: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; + } + /** An interface for updating data on the `BorderCollection` object, for use in `borderCollection.set({ ... })`. */ + export interface BorderCollectionUpdateData { + /** + * Specifies the 24-bit color of the inside borders. Color is specified in ‘#RRGGBB’ format or by using the color name. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + insideBorderColor?: string; + /** + * Specifies the border type of the inside borders. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + insideBorderType?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; + /** + * Specifies the width of the inside borders. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + insideBorderWidth?: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; + /** + * Specifies the 24-bit color of the outside borders. Color is specified in ‘#RRGGBB’ format or by using the color name. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + outsideBorderColor?: string; + /** + * Specifies the border type of the outside borders. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + outsideBorderType?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; + /** + * Specifies the width of the outside borders. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + outsideBorderWidth?: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; + items?: Word.Interfaces.BorderData[]; + } + /** An interface for updating data on the `CheckboxContentControl` object, for use in `checkboxContentControl.set({ ... })`. */ + export interface CheckboxContentControlUpdateData { + /** + * Specifies the current state of the checkbox. + * + * @remarks + * [Api set: WordApi 1.7] + */ + isChecked?: boolean; + } + /** An interface for updating data on the `Comment` object, for use in `comment.set({ ... })`. */ + export interface CommentUpdateData { + /** + * Specifies the comment's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeUpdateData; + /** + * Specifies the comment's content as plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: string; + /** + * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. + * + * @remarks + * [Api set: WordApi 1.4] + */ + resolved?: boolean; + } + /** An interface for updating data on the `CommentCollection` object, for use in `commentCollection.set({ ... })`. */ + export interface CommentCollectionUpdateData { + items?: Word.Interfaces.CommentData[]; + } + /** An interface for updating data on the `CommentContentRange` object, for use in `commentContentRange.set({ ... })`. */ + export interface CommentContentRangeUpdateData { + /** + * Specifies a value that indicates whether the comment text is bold. + * + * @remarks + * [Api set: WordApi 1.4] + */ + bold?: boolean; + /** + * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + hyperlink?: string; + /** + * Specifies a value that indicates whether the comment text is italicized. + * + * @remarks + * [Api set: WordApi 1.4] + */ + italic?: boolean; + /** + * Specifies a value that indicates whether the comment text has a strikethrough. + * + * @remarks + * [Api set: WordApi 1.4] + */ + strikeThrough?: boolean; + /** + * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. + * + * @remarks + * [Api set: WordApi 1.4] */ underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; } @@ -11782,7 +13548,7 @@ export declare namespace Word { /** An interface for updating data on the `ContentControl` object, for use in `contentControl.set({ ... })`. */ export interface ContentControlUpdateData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -11870,6 +13636,34 @@ export declare namespace Word { export interface ContentControlCollectionUpdateData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ + export interface ContentControlListItemUpdateData { + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: string; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: number; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: string; + } + /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ + export interface ContentControlListItemCollectionUpdateData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ export interface CustomPropertyUpdateData { /** @@ -12031,7 +13825,13 @@ export declare namespace Word { * [Api set: WordApi 1.5] */ locked?: boolean; - + /** + * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + showCodes?: boolean; } /** An interface for updating data on the `FieldCollection` object, for use in `fieldCollection.set({ ... })`. */ export interface FieldCollectionUpdateData { @@ -12173,26 +13973,92 @@ export declare namespace Word { /** An interface for updating data on the `ListItem` object, for use in `listItem.set({ ... })`. */ export interface ListItemUpdateData { /** - * Specifies the level of the item in the list. + * Specifies the level of the item in the list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + level?: number; + } + /** An interface for updating data on the `ListLevel` object, for use in `listLevel.set({ ... })`. */ + export interface ListLevelUpdateData { + /** + * Gets a Font object that represents the character formatting of the specified object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the name of the style that's linked to the specified list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + linkedStyle?: string; + /** + * Specifies the number format for the specified list level. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + numberFormat?: string; + /** + * Specifies the position (in points) of the number or bullet for the specified list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + numberPosition?: number; + /** + * Specifies the number style for the list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + numberStyle?: Word.ListBuiltInNumberStyle | "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter" | "Ordinal" | "CardinalText" | "OrdinalText" | "Kanji" | "KanjiDigit" | "AiueoHalfWidth" | "IrohaHalfWidth" | "ArabicFullWidth" | "KanjiTraditional" | "KanjiTraditional2" | "NumberInCircle" | "Aiueo" | "Iroha" | "ArabicLZ" | "Bullet" | "Ganada" | "Chosung" | "GBNum1" | "GBNum2" | "GBNum3" | "GBNum4" | "Zodiac1" | "Zodiac2" | "Zodiac3" | "TradChinNum1" | "TradChinNum2" | "TradChinNum3" | "TradChinNum4" | "SimpChinNum1" | "SimpChinNum2" | "SimpChinNum3" | "SimpChinNum4" | "HanjaRead" | "HanjaReadDigit" | "Hangul" | "Hanja" | "Hebrew1" | "Arabic1" | "Hebrew2" | "Arabic2" | "HindiLetter1" | "HindiLetter2" | "HindiArabic" | "HindiCardinalText" | "ThaiLetter" | "ThaiArabic" | "ThaiCardinalText" | "VietCardinalText" | "LowercaseRussian" | "UppercaseRussian" | "LowercaseGreek" | "UppercaseGreek" | "ArabicLZ2" | "ArabicLZ3" | "ArabicLZ4" | "LowercaseTurkish" | "UppercaseTurkish" | "LowercaseBulgarian" | "UppercaseBulgarian" | "PictureBullet" | "Legal" | "LegalLZ"; + /** + * Specifies the list level that must appear before the specified list level restarts numbering at 1. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + resetOnHigher?: number; + /** + * Specifies the starting number for the specified list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + startAt?: number; + /** + * Specifies the tab position for the specified list level object. * * @remarks - * [Api set: WordApi 1.3] + * [Api set: WordApiDesktop 1.1] */ - level?: number; - } - /** An interface for updating data on the `ListLevel` object, for use in `listLevel.set({ ... })`. */ - export interface ListLevelUpdateData { - - - - - - - - - - - + tabPosition?: number; + /** + * Specifies the position (in points) for the second line of wrapping text for the specified list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + textPosition?: number; + /** + * Specifies the character inserted after the number for the specified list level. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + trailingCharacter?: Word.TrailingCharacter | "TrailingTab" | "TrailingSpace" | "TrailingNone"; } /** An interface for updating data on the `ListLevelCollection` object, for use in `listLevelCollection.set({ ... })`. */ export interface ListLevelCollectionUpdateData { @@ -12200,7 +14066,13 @@ export declare namespace Word { } /** An interface for updating data on the `ListTemplate` object, for use in `listTemplate.set({ ... })`. */ export interface ListTemplateUpdateData { - + /** + * Specifies whether the specified ListTemplate object is outline numbered. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + outlineNumbered?: boolean; } /** An interface for updating data on the `NoteItem` object, for use in `noteItem.set({ ... })`. */ export interface NoteItemUpdateData { @@ -12557,7 +14429,13 @@ export declare namespace Word { } /** An interface for updating data on the `Style` object, for use in `style.set({ ... })`. */ export interface StyleUpdateData { - + /** + * Specifies a BorderCollection object that represents all the borders for the specified style. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + borders?: Word.Interfaces.BorderCollectionUpdateData; /** * Gets a font object that represents the character formatting of the specified style. * @@ -12565,7 +14443,13 @@ export declare namespace Word { * [Api set: WordApi 1.5] */ font?: Word.Interfaces.FontUpdateData; - + /** + * Gets a ListTemplate object that represents the list formatting for the specified Style object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + listTemplate?: Word.Interfaces.ListTemplateUpdateData; /** * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. * @@ -12643,8 +14527,20 @@ export declare namespace Word { * [Api set: WordApi 1.6] */ backgroundPatternColor?: string; - - + /** + * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + foregroundPatternColor?: string; + /** + * Specifies the shading texture of the object. To learn more about how to apply backgrounds like textures, see {@link https://support.microsoft.com/office/db481e61-7af6-4063-bbcd-b276054a5515 | Add, change, or delete the background color in Word}. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + texture?: Word.ShadingTextureType | "DarkDiagonalDown" | "DarkDiagonalUp" | "DarkGrid" | "DarkHorizontal" | "DarkTrellis" | "DarkVertical" | "LightDiagonalDown" | "LightDiagonalUp" | "LightGrid" | "LightHorizontal" | "LightTrellis" | "LightVertical" | "None" | "Percent10" | "Percent12Pt5" | "Percent15" | "Percent20" | "Percent25" | "Percent30" | "Percent35" | "Percent37Pt5" | "Percent40" | "Percent45" | "Percent5" | "Percent50" | "Percent55" | "Percent60" | "Percent62Pt5" | "Percent65" | "Percent70" | "Percent75" | "Percent80" | "Percent85" | "Percent87Pt5" | "Percent90" | "Percent95" | "Solid"; } /** An interface for updating data on the `Table` object, for use in `table.set({ ... })`. */ export interface TableUpdateData { @@ -12756,8 +14652,20 @@ export declare namespace Word { } /** An interface for updating data on the `TableStyle` object, for use in `tableStyle.set({ ... })`. */ export interface TableStyleUpdateData { - - + /** + * Specifies the table's alignment against the page margin. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies whether lines in tables formatted with a specified style break across pages. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + allowBreakAcrossPage?: boolean; /** * Specifies the amount of space to add between the contents and the bottom borders of the cells. * @@ -13039,11 +14947,41 @@ export declare namespace Word { } /** An interface describing the data returned by calling `border.toJSON()`. */ export interface BorderData { - - - - - + /** + * Specifies the color for the border. Color is specified in ‘#RRGGBB’ format or by using the color name. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + color?: string; + /** + * Gets the location of the border. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + location?: Word.BorderLocation | "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"; + /** + * Specifies the border type for the border. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; + /** + * Specifies whether the border is visible. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + visible?: boolean; + /** + * Specifies the width for the border. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + width?: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; } /** An interface describing the data returned by calling `borderCollection.toJSON()`. */ export interface BorderCollectionData { @@ -13233,12 +15171,19 @@ export declare namespace Word { /** An interface describing the data returned by calling `contentControl.toJSON()`. */ export interface ContentControlData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ checkboxContentControl?: Word.Interfaces.CheckboxContentControlData; + /** + * Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + comboBoxContentControl?: Word.Interfaces.ComboBoxContentControlData; /** * Gets the collection of content control objects in the content control. * @@ -13246,6 +15191,13 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ contentControls?: Word.Interfaces.ContentControlData[]; + /** + * Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + dropDownListContentControl?: Word.Interfaces.DropDownListContentControlData; /** * Gets the collection of field objects in the content control. * @@ -13393,6 +15345,34 @@ export declare namespace Word { export interface ContentControlCollectionData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ + export interface ContentControlListItemData { + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: string; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: number; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: string; + } + /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ + export interface ContentControlListItemCollectionData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface describing the data returned by calling `customProperty.toJSON()`. */ export interface CustomPropertyData { /** @@ -13686,6 +15666,12 @@ export declare namespace Word { */ title?: string; } + /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ + export interface DropDownListContentControlData { + } + /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ + export interface ComboBoxContentControlData { + } /** An interface describing the data returned by calling `field.toJSON()`. */ export interface FieldData { /** @@ -13725,7 +15711,13 @@ export declare namespace Word { * [Api set: WordApi 1.5] */ locked?: boolean; - + /** + * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + showCodes?: boolean; /** * Gets the field's type. * @@ -13848,7 +15840,13 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ hyperlink?: string; - + /** + * Gets the format of the inline image. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + imageFormat?: Word.ImageFormat | "Unsupported" | "Undefined" | "Bmp" | "Jpeg" | "Gif" | "Tiff" | "Png" | "Icon" | "Exif" | "Wmf" | "Emf" | "Pict" | "Pdf" | "Svg"; /** * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. * @@ -13929,17 +15927,83 @@ export declare namespace Word { } /** An interface describing the data returned by calling `listLevel.toJSON()`. */ export interface ListLevelData { - - - - - - - - - - - + /** + * Gets a Font object that represents the character formatting of the specified object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + font?: Word.Interfaces.FontData; + /** + * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the name of the style that's linked to the specified list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + linkedStyle?: string; + /** + * Specifies the number format for the specified list level. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + numberFormat?: string; + /** + * Specifies the position (in points) of the number or bullet for the specified list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + numberPosition?: number; + /** + * Specifies the number style for the list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + numberStyle?: Word.ListBuiltInNumberStyle | "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter" | "Ordinal" | "CardinalText" | "OrdinalText" | "Kanji" | "KanjiDigit" | "AiueoHalfWidth" | "IrohaHalfWidth" | "ArabicFullWidth" | "KanjiTraditional" | "KanjiTraditional2" | "NumberInCircle" | "Aiueo" | "Iroha" | "ArabicLZ" | "Bullet" | "Ganada" | "Chosung" | "GBNum1" | "GBNum2" | "GBNum3" | "GBNum4" | "Zodiac1" | "Zodiac2" | "Zodiac3" | "TradChinNum1" | "TradChinNum2" | "TradChinNum3" | "TradChinNum4" | "SimpChinNum1" | "SimpChinNum2" | "SimpChinNum3" | "SimpChinNum4" | "HanjaRead" | "HanjaReadDigit" | "Hangul" | "Hanja" | "Hebrew1" | "Arabic1" | "Hebrew2" | "Arabic2" | "HindiLetter1" | "HindiLetter2" | "HindiArabic" | "HindiCardinalText" | "ThaiLetter" | "ThaiArabic" | "ThaiCardinalText" | "VietCardinalText" | "LowercaseRussian" | "UppercaseRussian" | "LowercaseGreek" | "UppercaseGreek" | "ArabicLZ2" | "ArabicLZ3" | "ArabicLZ4" | "LowercaseTurkish" | "UppercaseTurkish" | "LowercaseBulgarian" | "UppercaseBulgarian" | "PictureBullet" | "Legal" | "LegalLZ"; + /** + * Specifies the list level that must appear before the specified list level restarts numbering at 1. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + resetOnHigher?: number; + /** + * Specifies the starting number for the specified list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + startAt?: number; + /** + * Specifies the tab position for the specified list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + tabPosition?: number; + /** + * Specifies the position (in points) for the second line of wrapping text for the specified list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + textPosition?: number; + /** + * Specifies the character inserted after the number for the specified list level. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + trailingCharacter?: Word.TrailingCharacter | "TrailingTab" | "TrailingSpace" | "TrailingNone"; } /** An interface describing the data returned by calling `listLevelCollection.toJSON()`. */ export interface ListLevelCollectionData { @@ -13947,8 +16011,20 @@ export declare namespace Word { } /** An interface describing the data returned by calling `listTemplate.toJSON()`. */ export interface ListTemplateData { - - + /** + * Gets a ListLevels collection that represents all the levels for the specified ListTemplate. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + listLevels?: Word.Interfaces.ListLevelData[]; + /** + * Specifies whether the specified ListTemplate object is outline numbered. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + outlineNumbered?: boolean; } /** An interface describing the data returned by calling `noteItem.toJSON()`. */ export interface NoteItemData { @@ -14396,7 +16472,13 @@ export declare namespace Word { } /** An interface describing the data returned by calling `style.toJSON()`. */ export interface StyleData { - + /** + * Specifies a BorderCollection object that represents all the borders for the specified style. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + borders?: Word.Interfaces.BorderData[]; /** * Gets a font object that represents the character formatting of the specified style. * @@ -14404,7 +16486,13 @@ export declare namespace Word { * [Api set: WordApi 1.5] */ font?: Word.Interfaces.FontData; - + /** + * Gets a ListTemplate object that represents the list formatting for the specified Style object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + listTemplate?: Word.Interfaces.ListTemplateData; /** * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. * @@ -14517,8 +16605,20 @@ export declare namespace Word { * [Api set: WordApi 1.6] */ backgroundPatternColor?: string; - - + /** + * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + foregroundPatternColor?: string; + /** + * Specifies the shading texture of the object. To learn more about how to apply backgrounds like textures, see {@link https://support.microsoft.com/office/db481e61-7af6-4063-bbcd-b276054a5515 | Add, change, or delete the background color in Word}. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + texture?: Word.ShadingTextureType | "DarkDiagonalDown" | "DarkDiagonalUp" | "DarkGrid" | "DarkHorizontal" | "DarkTrellis" | "DarkVertical" | "LightDiagonalDown" | "LightDiagonalUp" | "LightGrid" | "LightHorizontal" | "LightTrellis" | "LightVertical" | "None" | "Percent10" | "Percent12Pt5" | "Percent15" | "Percent20" | "Percent25" | "Percent30" | "Percent35" | "Percent37Pt5" | "Percent40" | "Percent45" | "Percent5" | "Percent50" | "Percent55" | "Percent60" | "Percent62Pt5" | "Percent65" | "Percent70" | "Percent75" | "Percent80" | "Percent85" | "Percent87Pt5" | "Percent90" | "Percent95" | "Solid"; } /** An interface describing the data returned by calling `table.toJSON()`. */ export interface TableData { @@ -14672,8 +16772,20 @@ export declare namespace Word { } /** An interface describing the data returned by calling `tableStyle.toJSON()`. */ export interface TableStyleData { - - + /** + * Specifies the table's alignment against the page margin. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies whether lines in tables formatted with a specified style break across pages. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + allowBreakAcrossPage?: boolean; /** * Specifies the amount of space to add between the contents and the bottom borders of the cells. * @@ -15048,68 +17160,160 @@ export declare namespace Word { * Gets the parent body of the body. For example, a table cell body's parent body could be a header. If there isn't a parent body, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks - * [Api set: WordApi 1.3] + * [Api set: WordApi 1.3] + */ + parentBodyOrNullObject?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the content control that contains the body. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the body. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the parent section of the body. Throws an `ItemNotFound` error if there isn't a parent section. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentSection?: Word.Interfaces.SectionLoadOptions; + /** + * Gets the parent section of the body. If there isn't a parent section, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentSectionOrNullObject?: Word.Interfaces.SectionLoadOptions; + /** + * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * Gets the text of the body. Use the insertText method to insert text. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: boolean; + } + /** + * Represents the Border object for text, a paragraph, or a table. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + export interface BorderLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the color for the border. Color is specified in ‘#RRGGBB’ format or by using the color name. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + color?: boolean; + /** + * Gets the location of the border. + * + * @remarks + * [Api set: WordApiDesktop 1.1] */ - parentBodyOrNullObject?: Word.Interfaces.BodyLoadOptions; + location?: boolean; /** - * Gets the content control that contains the body. Throws an `ItemNotFound` error if there isn't a parent content control. + * Specifies the border type for the border. * * @remarks - * [Api set: WordApi 1.1] + * [Api set: WordApiDesktop 1.1] */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + type?: boolean; /** - * Gets the content control that contains the body. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * Specifies whether the border is visible. * * @remarks - * [Api set: WordApi 1.3] + * [Api set: WordApiDesktop 1.1] */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + visible?: boolean; /** - * Gets the parent section of the body. Throws an `ItemNotFound` error if there isn't a parent section. + * Specifies the width for the border. * * @remarks - * [Api set: WordApi 1.3] + * [Api set: WordApiDesktop 1.1] */ - parentSection?: Word.Interfaces.SectionLoadOptions; + width?: boolean; + } + /** + * Represents the collection of border styles. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + export interface BorderCollectionLoadOptions { /** - * Gets the parent section of the body. If there isn't a parent section, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the color for the border. Color is specified in ‘#RRGGBB’ format or by using the color name. * * @remarks - * [Api set: WordApi 1.3] + * [Api set: WordApiDesktop 1.1] */ - parentSectionOrNullObject?: Word.Interfaces.SectionLoadOptions; + color?: boolean; /** - * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * For EACH ITEM in the collection: Gets the location of the border. * * @remarks - * [Api set: WordApi 1.1] + * [Api set: WordApiDesktop 1.1] */ - style?: boolean; + location?: boolean; /** - * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * For EACH ITEM in the collection: Specifies the border type for the border. * * @remarks - * [Api set: WordApi 1.3] + * [Api set: WordApiDesktop 1.1] */ - styleBuiltIn?: boolean; + type?: boolean; /** - * Gets the text of the body. Use the insertText method to insert text. + * For EACH ITEM in the collection: Specifies whether the border is visible. * * @remarks - * [Api set: WordApi 1.1] + * [Api set: WordApiDesktop 1.1] */ - text?: boolean; + visible?: boolean; /** - * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. + * For EACH ITEM in the collection: Specifies the width for the border. * * @remarks - * [Api set: WordApi 1.3] + * [Api set: WordApiDesktop 1.1] */ - type?: boolean; + width?: boolean; } - - /** * The data specific to content controls of type CheckBox. * @@ -15444,7 +17648,7 @@ export declare namespace Word { */ $all?: boolean; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -15617,7 +17821,7 @@ export declare namespace Word { */ $all?: boolean; /** - * For EACH ITEM in the collection: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * For EACH ITEM in the collection: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -15778,6 +17982,72 @@ export declare namespace Word { */ type?: boolean; } + /** + * Represents a list item in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export interface ContentControlListItemLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: boolean; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: boolean; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: boolean; + } + /** + * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export interface ContentControlListItemCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: boolean; + /** + * For EACH ITEM in the collection: Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: boolean; + /** + * For EACH ITEM in the collection: Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: boolean; + } /** * Represents a custom property. * @@ -16229,7 +18499,13 @@ export declare namespace Word { * [Api set: WordApi 1.5] */ locked?: boolean; - + /** + * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + showCodes?: boolean; /** * Gets the field's type. * @@ -16341,7 +18617,13 @@ export declare namespace Word { * [Api set: WordApi 1.5] */ locked?: boolean; - + /** + * For EACH ITEM in the collection: Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + showCodes?: boolean; /** * For EACH ITEM in the collection: Gets the field's type. * @@ -16527,7 +18809,13 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ hyperlink?: boolean; - + /** + * Gets the format of the inline image. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + imageFormat?: boolean; /** * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. * @@ -16631,7 +18919,13 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ hyperlink?: boolean; - + /** + * For EACH ITEM in the collection: Gets the format of the inline image. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + imageFormat?: boolean; /** * For EACH ITEM in the collection: Specifies a value that indicates whether the inline image retains its original proportions when you resize it. * @@ -16746,9 +19040,203 @@ export declare namespace Word { */ siblingIndex?: boolean; } - - - + /** + * Represents a list level. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + export interface ListLevelLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets a Font object that represents the character formatting of the specified object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + alignment?: boolean; + /** + * Specifies the name of the style that's linked to the specified list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + linkedStyle?: boolean; + /** + * Specifies the number format for the specified list level. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + numberFormat?: boolean; + /** + * Specifies the position (in points) of the number or bullet for the specified list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + numberPosition?: boolean; + /** + * Specifies the number style for the list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + numberStyle?: boolean; + /** + * Specifies the list level that must appear before the specified list level restarts numbering at 1. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + resetOnHigher?: boolean; + /** + * Specifies the starting number for the specified list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + startAt?: boolean; + /** + * Specifies the tab position for the specified list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + tabPosition?: boolean; + /** + * Specifies the position (in points) for the second line of wrapping text for the specified list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + textPosition?: boolean; + /** + * Specifies the character inserted after the number for the specified list level. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + trailingCharacter?: boolean; + } + /** + * Contains a collection of {@link Word.ListLevel} objects. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + export interface ListLevelCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets a Font object that represents the character formatting of the specified object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + alignment?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of the style that's linked to the specified list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + linkedStyle?: boolean; + /** + * For EACH ITEM in the collection: Specifies the number format for the specified list level. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + numberFormat?: boolean; + /** + * For EACH ITEM in the collection: Specifies the position (in points) of the number or bullet for the specified list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + numberPosition?: boolean; + /** + * For EACH ITEM in the collection: Specifies the number style for the list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + numberStyle?: boolean; + /** + * For EACH ITEM in the collection: Specifies the list level that must appear before the specified list level restarts numbering at 1. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + resetOnHigher?: boolean; + /** + * For EACH ITEM in the collection: Specifies the starting number for the specified list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + startAt?: boolean; + /** + * For EACH ITEM in the collection: Specifies the tab position for the specified list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + tabPosition?: boolean; + /** + * For EACH ITEM in the collection: Specifies the position (in points) for the second line of wrapping text for the specified list level object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + textPosition?: boolean; + /** + * For EACH ITEM in the collection: Specifies the character inserted after the number for the specified list level. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + trailingCharacter?: boolean; + } + /** + * Represents a ListTemplate. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + export interface ListTemplateLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies whether the specified ListTemplate object is outline numbered. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + outlineNumbered?: boolean; + } /** * Represents a footnote or endnote. * @@ -17724,7 +20212,13 @@ export declare namespace Word { Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). */ $all?: boolean; - + /** + * For EACH ITEM in the collection: Specifies a BorderCollection object that represents all the borders for the specified style. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + borders?: Word.Interfaces.BorderCollectionLoadOptions; /** * For EACH ITEM in the collection: Gets a font object that represents the character formatting of the specified style. * @@ -17732,7 +20226,13 @@ export declare namespace Word { * [Api set: WordApi 1.5] */ font?: Word.Interfaces.FontLoadOptions; - + /** + * For EACH ITEM in the collection: Gets a ListTemplate object that represents the list formatting for the specified Style object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + listTemplate?: Word.Interfaces.ListTemplateLoadOptions; /** * For EACH ITEM in the collection: Gets a ParagraphFormat object that represents the paragraph settings for the specified style. * @@ -17847,7 +20347,13 @@ export declare namespace Word { Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). */ $all?: boolean; - + /** + * Specifies a BorderCollection object that represents all the borders for the specified style. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + borders?: Word.Interfaces.BorderCollectionLoadOptions; /** * Gets a font object that represents the character formatting of the specified style. * @@ -17855,7 +20361,13 @@ export declare namespace Word { * [Api set: WordApi 1.5] */ font?: Word.Interfaces.FontLoadOptions; - + /** + * Gets a ListTemplate object that represents the list formatting for the specified Style object. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + listTemplate?: Word.Interfaces.ListTemplateLoadOptions; /** * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. * @@ -17977,8 +20489,20 @@ export declare namespace Word { * [Api set: WordApi 1.6] */ backgroundPatternColor?: boolean; - - + /** + * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + foregroundPatternColor?: boolean; + /** + * Specifies the shading texture of the object. To learn more about how to apply backgrounds like textures, see {@link https://support.microsoft.com/office/db481e61-7af6-4063-bbcd-b276054a5515 | Add, change, or delete the background color in Word}. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + texture?: boolean; } /** * Represents a table in a Word document. @@ -18178,8 +20702,20 @@ export declare namespace Word { Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). */ $all?: boolean; - - + /** + * Specifies the table's alignment against the page margin. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + alignment?: boolean; + /** + * Specifies whether lines in tables formatted with a specified style break across pages. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + allowBreakAcrossPage?: boolean; /** * Specifies the amount of space to add between the contents and the bottom borders of the cells. * diff --git a/generate-docs/api-extractor-inputs-word-release/word_desktop_1_1/word-desktop2.d.ts b/generate-docs/api-extractor-inputs-word-release/word_desktop_1_1/word-desktop2.d.ts index f592664353..afdc04f3d2 100644 --- a/generate-docs/api-extractor-inputs-word-release/word_desktop_1_1/word-desktop2.d.ts +++ b/generate-docs/api-extractor-inputs-word-release/word_desktop_1_1/word-desktop2.d.ts @@ -43,7 +43,42 @@ export declare namespace Word { */ berry = "Berry", } - + /** + * Properties defining the behavior of the pop-up menu for a given critique. + * + * @remarks + * [Api set: WordApi 1.8] + */ + export interface CritiquePopupOptions { + /** + * Gets the manifest resource ID of the string to use for branding. This branding text appears next to your add-in icon in the pop-up menu. + * + * @remarks + * [Api set: WordApi 1.8] + */ + brandingTextResourceId: string; + /** + * Gets the manifest resource ID of the string to use as the subtitle. + * + * @remarks + * [Api set: WordApi 1.8] + */ + subtitleResourceId: string; + /** + * Gets the suggestions to display in the critique pop-up menu. + * + * @remarks + * [Api set: WordApi 1.8] + */ + suggestions: string[]; + /** + * Gets the manifest resource ID of the string to use as the title. + * + * @remarks + * [Api set: WordApi 1.8] + */ + titleResourceId: string; + } /** * Critique that will be rendered as underline for the specified part of paragraph in the document. * @@ -65,7 +100,13 @@ export declare namespace Word { * [Api set: WordApi 1.7] */ length: number; - + /** + * Specifies the behavior of the pop-up menu for the critique. + * + * @remarks + * [Api set: WordApi 1.8] + */ + popupOptions?: Word.CritiquePopupOptions; /** * Specifies the start index of the critique inside paragraph. * @@ -319,7 +360,35 @@ export declare namespace Word { */ id: string; } - + /** + * Represents action information that's passed back on annotation pop-up action event. + * + * @remarks + * [Api set: WordApi 1.8] + */ + export interface AnnotationPopupActionEventArgs { + /** + * Specifies the chosen action in the pop-up menu. + * + * @remarks + * [Api set: WordApi 1.8] + */ + action: string; + /** + * Specifies the accepted suggestion (only populated when accepting a critique suggestion). + * + * @remarks + * [Api set: WordApi 1.8] + */ + critiqueSuggestion: string; + /** + * Specifies the annotation ID for which the event was fired. + * + * @remarks + * [Api set: WordApi 1.8] + */ + id: string; + } /** * Contains a collection of {@link Word.Annotation} objects. * @@ -678,10 +747,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the body at the specified location. * @@ -1360,12 +1430,13 @@ export declare namespace Word { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ readonly checkboxContentControl: Word.CheckboxContentControl; + /** * Gets the collection of content control objects in the content control. * @@ -1373,6 +1444,7 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ readonly contentControls: Word.ContentControlCollection; + /** * Gets the collection of endnotes in the content control. * @@ -2012,6 +2084,8 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.ContentControlCollectionData; } + + /** * Specifies the options that define which content controls are returned. * @@ -2020,12 +2094,13 @@ export declare namespace Word { */ export interface ContentControlOptions { /** - * An array of content control types, item must be 'RichText', 'PlainText', or 'CheckBox'. + * An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. * * @remarks * [Api set: WordApi 1.5] * - * Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. + * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9. */ types: Word.ContentControlType[]; } @@ -2849,9 +2924,24 @@ export declare namespace Word { * @remarks * [Api set: WordApi 1.6] * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. */ - importStylesFromJson(stylesJson: string): OfficeExtension.ClientResult; + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult; + /** + * Import styles from a JSON-formatted string. + * + * @remarks + * [Api set: WordApi 1.6] + * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * + * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehaviorString - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. + */ + importStylesFromJson(stylesJson: string, importedStylesConflictBehaviorString?: "Ignore" | "Overwrite" | "CreateNew"): OfficeExtension.ClientResult; /** * Inserts a document into the target document at a specific location with additional properties. Headers, footers, watermarks, and other section properties are copied by default. @@ -2953,7 +3043,15 @@ export declare namespace Word { * @eventproperty */ readonly onAnnotationInserted: OfficeExtension.EventHandlers; - + /** + * Occurs when the user performs an action in an annotation pop-up menu. + * + * @remarks + * [Api set: WordApi 1.8] + * + * @eventproperty + */ + readonly onAnnotationPopupAction: OfficeExtension.EventHandlers; /** * Occurs when the user deletes one or more annotations. * @@ -3404,6 +3502,8 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.DocumentPropertiesData; } + + /** * Represents a field. * @@ -5106,10 +5206,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the paragraph at the specified location. * @@ -5817,7 +5918,14 @@ export declare namespace Word { * [Api set: WordApi 1.6] */ getTrackedChanges(): Word.TrackedChangeCollection; - + /** + * Highlights the range temporarily without changing document content. + To highlight the text permanently, set the range's Font.HighlightColor. + * + * @remarks + * [Api set: WordApi 1.8] + */ + highlight(): void; /** * Inserts a bookmark on the range. If a bookmark of the same name exists somewhere, it is deleted first. * @@ -5856,10 +5964,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts an endnote. The endnote reference is placed after the range. * @@ -6022,7 +6131,13 @@ export declare namespace Word { * @param range - Required. Another range. */ intersectWithOrNullObject(range: Word.Range): Word.Range; - + /** + * Removes the highlight added by the Highlight function if any. + * + * @remarks + * [Api set: WordApi 1.8] + */ + removeHighlight(): void; /** * Performs a search with the specified SearchOptions on the scope of the range object. The search results are a collection of range objects. * @@ -8768,7 +8883,13 @@ export declare namespace Word { * [Api set: WordApi 1.7] */ annotationRemoved = "AnnotationRemoved", - } + /** + * Represents an action in the annotation pop-up. + * @remarks + * [Api set: WordApi 1.8] + */ + annotationPopupAction = "AnnotationPopupAction", + } /** * An enum that specifies an event's source. It can be local or remote (through coauthoring). * @@ -11510,6 +11631,7 @@ export declare namespace Word { + enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", @@ -11686,7 +11808,7 @@ export declare namespace Word { /** An interface for updating data on the `ContentControl` object, for use in `contentControl.set({ ... })`. */ export interface ContentControlUpdateData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -11774,6 +11896,16 @@ export declare namespace Word { export interface ContentControlCollectionUpdateData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ + export interface ContentControlListItemUpdateData { + + + + } + /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ + export interface ContentControlListItemCollectionUpdateData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ export interface CustomPropertyUpdateData { /** @@ -13137,12 +13269,13 @@ export declare namespace Word { /** An interface describing the data returned by calling `contentControl.toJSON()`. */ export interface ContentControlData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ checkboxContentControl?: Word.Interfaces.CheckboxContentControlData; + /** * Gets the collection of content control objects in the content control. * @@ -13150,6 +13283,7 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ contentControls?: Word.Interfaces.ContentControlData[]; + /** * Gets the collection of field objects in the content control. * @@ -13297,6 +13431,16 @@ export declare namespace Word { export interface ContentControlCollectionData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ + export interface ContentControlListItemData { + + + + } + /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ + export interface ContentControlListItemCollectionData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface describing the data returned by calling `customProperty.toJSON()`. */ export interface CustomPropertyData { /** @@ -13590,6 +13734,12 @@ export declare namespace Word { */ title?: string; } + /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ + export interface DropDownListContentControlData { + } + /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ + export interface ComboBoxContentControlData { + } /** An interface describing the data returned by calling `field.toJSON()`. */ export interface FieldData { /** @@ -15348,7 +15498,7 @@ export declare namespace Word { */ $all?: boolean; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -15521,7 +15671,7 @@ export declare namespace Word { */ $all?: boolean; /** - * For EACH ITEM in the collection: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * For EACH ITEM in the collection: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -15682,6 +15832,8 @@ export declare namespace Word { */ type?: boolean; } + + /** * Represents a custom property. * diff --git a/generate-docs/api-extractor-inputs-word-release/word_desktop_1_1/word-desktop3.d.ts b/generate-docs/api-extractor-inputs-word-release/word_desktop_1_1/word-desktop3.d.ts index 6c8480acde..d0ff89aa00 100644 --- a/generate-docs/api-extractor-inputs-word-release/word_desktop_1_1/word-desktop3.d.ts +++ b/generate-docs/api-extractor-inputs-word-release/word_desktop_1_1/word-desktop3.d.ts @@ -5,19 +5,380 @@ import { Office as Outlook} from "../../api-extractor-inputs-outlook/outlook" //////////////////////////////////////////////////////////////// export declare namespace Word { + /** + * Represents the color scheme of a critique in the document, affecting underline and highlight. + * + * @remarks + * [Api set: WordApi 1.7] + */ + enum CritiqueColorScheme { + /** + * Red color. + * @remarks + * [Api set: WordApi 1.7] + */ + red = "Red", + /** + * Green color. + * @remarks + * [Api set: WordApi 1.7] + */ + green = "Green", + /** + * Blue color. + * @remarks + * [Api set: WordApi 1.7] + */ + blue = "Blue", + /** + * Lavender color. + * @remarks + * [Api set: WordApi 1.7] + */ + lavender = "Lavender", + /** + * Berry color. + * @remarks + * [Api set: WordApi 1.7] + */ + berry = "Berry", + } + /** + * Critique that will be rendered as underline for the specified part of paragraph in the document. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export interface Critique { + /** + * Specifies the color scheme of the critique. + * + * @remarks + * [Api set: WordApi 1.7] + */ + colorScheme: Word.CritiqueColorScheme | "Red" | "Green" | "Blue" | "Lavender" | "Berry"; + /** + * Specifies the length of the critique inside paragraph. + * + * @remarks + * [Api set: WordApi 1.7] + */ + length: number; + + /** + * Specifies the start index of the critique inside paragraph. + * + * @remarks + * [Api set: WordApi 1.7] + */ + start: number; + } + /** + * Represents an annotation wrapper around critique displayed in the document. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export class CritiqueAnnotation extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the range of text that is annotated. + * + * @remarks + * [Api set: WordApi 1.7] + */ + readonly range: Word.Range; + /** + * Gets the critique that was passed when the annotation was inserted. + * + * @remarks + * [Api set: WordApi 1.7] + */ + readonly critique: Word.Critique; + /** + * Accepts the critique. This will change the annotation state to `accepted`. + * + * @remarks + * [Api set: WordApi 1.7] + */ + accept(): void; + /** + * Rejects the critique. This will change the annotation state to `rejected`. + * + * @remarks + * [Api set: WordApi 1.7] + */ + reject(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CritiqueAnnotationLoadOptions): Word.CritiqueAnnotation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CritiqueAnnotation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.CritiqueAnnotation; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CritiqueAnnotation; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.CritiqueAnnotation; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.CritiqueAnnotation` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CritiqueAnnotationData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.CritiqueAnnotationData; + } + /** + * Represents the state of the annotation. + * + * @remarks + * [Api set: WordApi 1.7] + */ + enum AnnotationState { + /** + * Created. + * @remarks + * [Api set: WordApi 1.7] + */ + created = "Created", + /** + * Accepted. + * @remarks + * [Api set: WordApi 1.7] + */ + accepted = "Accepted", + /** + * Rejected. + * @remarks + * [Api set: WordApi 1.7] + */ + rejected = "Rejected", + } + /** + * Annotations set produced by the add-in. Currently supporting only critiques. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export interface AnnotationSet { + /** + * Critiques. + * + * @remarks + * [Api set: WordApi 1.7] + */ + critiques: Word.Critique[]; + } + /** + * Represents an annotation attached to a paragraph. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export class Annotation extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the critique annotation object. + * + * @remarks + * [Api set: WordApi 1.7] + */ + readonly critiqueAnnotation: Word.CritiqueAnnotation; + /** + * Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. + * + * @remarks + * [Api set: WordApi 1.7] + */ + readonly id: string; + /** + * Gets the state of the annotation. + * + * @remarks + * [Api set: WordApi 1.7] + */ + readonly state: Word.AnnotationState | "Created" | "Accepted" | "Rejected"; + /** + * Deletes the annotation. + * + * @remarks + * [Api set: WordApi 1.7] + */ + delete(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.AnnotationLoadOptions): Word.Annotation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Annotation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Annotation; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Annotation; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Annotation; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.Annotation` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.AnnotationData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.AnnotationData; + } + /** + * Holds annotation information that is passed back on annotation added event. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export interface AnnotationInsertedEventArgs { + /** + * Specifies the annotation IDs for which the event was fired. + * + * @remarks + * [Api set: WordApi 1.7] + */ + ids: string[]; + } + /** + * Holds annotation information that is passed back on annotation inserted event. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export interface AnnotationClickedEventArgs { + /** + * Specifies the annotation ID for which the event was fired. + * + * @remarks + * [Api set: WordApi 1.7] + */ + id: string; + } + /** + * Holds annotation information that is passed back on annotation removed event. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export interface AnnotationRemovedEventArgs { + /** + * Specifies the annotation IDs for which the event was fired. + * + * @remarks + * [Api set: WordApi 1.7] + */ + ids: string[]; + } + /** + * Holds annotation information that is passed back on annotation hovered event. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export interface AnnotationHoveredEventArgs { + /** + * Specifies the annotation ID for which the event was fired. + * + * @remarks + * [Api set: WordApi 1.7] + */ + id: string; + } - - - - - - - - - - - + /** + * Contains a collection of {@link Word.Annotation} objects. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export class AnnotationCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.Annotation[]; + /** + * Gets the first annotation in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.7] + */ + getFirst(): Word.Annotation; + /** + * Gets the first annotation in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. + For further information, + see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.7] + */ + getFirstOrNullObject(): Word.Annotation; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.AnnotationCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.AnnotationCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.AnnotationCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.AnnotationCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.AnnotationCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.AnnotationCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.AnnotationCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.AnnotationCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.AnnotationCollectionData; + } /** * Represents the application object. * @@ -317,10 +678,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the body at the specified location. * @@ -468,7 +830,65 @@ export declare namespace Word { } - + /** + * The data specific to content controls of type CheckBox. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export class CheckboxContentControl extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies the current state of the checkbox. + * + * @remarks + * [Api set: WordApi 1.7] + */ + isChecked: boolean; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.CheckboxContentControlUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.CheckboxContentControl): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CheckboxContentControlLoadOptions): Word.CheckboxContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CheckboxContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.CheckboxContentControl; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CheckboxContentControl; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.CheckboxContentControl; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.CheckboxContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CheckboxContentControlData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.CheckboxContentControlData; + } /** * Represents a comment in the document. * @@ -940,6 +1360,13 @@ export declare namespace Word { export class ContentControl extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; + /** + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.7] + */ + readonly checkboxContentControl: Word.CheckboxContentControl; /** * Gets the collection of content control objects in the content control. @@ -948,6 +1375,7 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ readonly contentControls: Word.ContentControlCollection; + /** * Gets the collection of endnotes in the content control. * @@ -1587,6 +2015,8 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.ContentControlCollectionData; } + + /** * Specifies the options that define which content controls are returned. * @@ -1595,12 +2025,13 @@ export declare namespace Word { */ export interface ContentControlOptions { /** - * An array of content control types, item must be 'RichText', 'PlainText', or 'CheckBox'. + * An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. * * @remarks * [Api set: WordApi 1.5] * - * Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. + * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9. */ types: Word.ContentControlType[]; } @@ -2341,7 +2772,15 @@ export declare namespace Word { * @param name - Required. The case-insensitive bookmark name. */ deleteBookmark(name: string): void; - + /** + * Gets the annotation by ID. Throws an `ItemNotFound` error if annotation isn't found. + * + * @remarks + * [Api set: WordApi 1.7] + * + * @param id - The ID of the annotation to get. + */ + getAnnotationById(id: string): Word.Annotation; /** * Gets a bookmark's range. Throws an `ItemNotFound` error if the bookmark doesn't exist. * @@ -2416,9 +2855,24 @@ export declare namespace Word { * @remarks * [Api set: WordApi 1.6] * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * + * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. + */ + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult; + /** + * Import styles from a JSON-formatted string. + * + * @remarks + * [Api set: WordApi 1.6] + * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehaviorString - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. */ - importStylesFromJson(stylesJson: string): OfficeExtension.ClientResult; + importStylesFromJson(stylesJson: string, importedStylesConflictBehaviorString?: "Ignore" | "Overwrite" | "CreateNew"): OfficeExtension.ClientResult; /** * Inserts a document into the target document at a specific location with additional properties. Headers, footers, watermarks, and other section properties are copied by default. @@ -2457,7 +2911,22 @@ export declare namespace Word { * @param fileName - Optional. The file name (exclude file extension). Only takes effect for a new document. */ save(saveBehaviorString?: "Save" | "Prompt", fileName?: string): void; - /** + /** + * Performs a search with the specified search options on the scope of the whole document. The search results are a collection of range objects. + * + * @remarks + * [Api set: WordApi 1.7] + */ + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + /** * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. * * @param options - Provides options for which properties of the object to load. @@ -2478,11 +2947,43 @@ export declare namespace Word { select?: string; expand?: string; }): Word.Document; + /** + * Occurs when the user clicks an annotation (or selects it using **Alt+Down**). + * + * @remarks + * [Api set: WordApi 1.7] + * + * @eventproperty + */ + readonly onAnnotationClicked: OfficeExtension.EventHandlers; + /** + * Occurs when the user hovers the cursor over an annotation. + * + * @remarks + * [Api set: WordApi 1.7] + * + * @eventproperty + */ + readonly onAnnotationHovered: OfficeExtension.EventHandlers; + /** + * Occurs when the user adds one or more annotations. + * + * @remarks + * [Api set: WordApi 1.7] + * + * @eventproperty + */ + readonly onAnnotationInserted: OfficeExtension.EventHandlers; - - - - + /** + * Occurs when the user deletes one or more annotations. + * + * @remarks + * [Api set: WordApi 1.7] + * + * @eventproperty + */ + readonly onAnnotationRemoved: OfficeExtension.EventHandlers; /** * Occurs when a content control is added. Run context.sync() in the handler to get the new content control's properties. * @@ -2924,6 +3425,8 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.DocumentPropertiesData; } + + /** * Represents a field. * @@ -4473,7 +4976,13 @@ export declare namespace Word { * [Api set: WordApi 1.3] */ detachFromList(): void; - + /** + * Gets annotations set on this Paragraph object. + * + * @remarks + * [Api set: WordApi 1.7] + */ + getAnnotations(): Word.AnnotationCollection; /** * Gets comments associated with the paragraph. * @@ -4563,7 +5072,20 @@ export declare namespace Word { * @param changeTrackingVersionString - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. */ getReviewedText(changeTrackingVersionString?: "Original" | "Current"): OfficeExtension.ClientResult; - /** + /** + * Returns the text of the paragraph. This excludes equations, graphics (e.g., images, videos, drawings), and special characters that mark various content (e.g., for content controls, fields, comments, footnotes, endnotes). + By default, hidden text and text marked as deleted are excluded. + * + * @remarks + * [Api set: WordApi 1.7] + * + * @param options - Optional. Options that define whether the final result should include hidden text and text marked as deleted. + */ + getText(options?: Word.GetTextOptions | { + IncludeHiddenText?: boolean; + IncludeTextMarkedAsDeleted?: boolean; + }): OfficeExtension.ClientResult; + /** * Gets the text ranges in the paragraph by using punctuation marks and/or other ending marks. * * @remarks @@ -4580,7 +5102,16 @@ export declare namespace Word { * [Api set: WordApi 1.6] */ getTrackedChanges(): Word.TrackedChangeCollection; - + /** + * Inserts annotations on this Paragraph object. + * + * @remarks + * [Api set: WordApi 1.7] + * + * @param annotations - Annotations to set. + * @returns An array of the inserted annotations identifiers. + */ + insertAnnotations(annotations: Word.AnnotationSet): OfficeExtension.ClientResult; /** * Inserts a break at the specified location in the main document. * @@ -4598,10 +5129,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the paragraph at the specified location. * @@ -5348,10 +5880,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts an endnote. The endnote reference is placed after the range. * @@ -5683,7 +6216,13 @@ export declare namespace Word { * [Api set: WordApi 1.6] */ importCustomXmlParts?: boolean; - + /** + * Represents whether to import the Different Odd and Even Pages setting for the header and footer from the source document. + * + * @remarks + * [Api set: WordApi 1.7] + */ + importDifferentOddEvenPages?: boolean; /** * Represents whether the page color and other background information from the source document should be imported. * @@ -5811,7 +6350,28 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.SearchOptionsData; } - + /** + * Specifies the options to be included in a getText operation. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export interface GetTextOptions { + /** + * Specifies a value that indicates whether to include hidden text in the result of the GetText method. The default value is False. + * + * @remarks + * [Api set: WordApi 1.7] + */ + includeHiddenText?: boolean; + /** + * Specifies a value that indicates whether to include text marked as deleted in the result of the GetText method. The default value is False. + * + * @remarks + * [Api set: WordApi 1.7] + */ + includeTextMarkedAsDeleted?: boolean; + } /** * Represents a section in a Word document. @@ -8209,7 +8769,31 @@ export declare namespace Word { * [Api set: WordApi 1.6] */ paragraphDeleted = "ParagraphDeleted", - } + /** + * Represents that an annotation was clicked (or selected with **Alt+Down**) in the document. + * @remarks + * [Api set: WordApi 1.7] + */ + annotationClicked = "AnnotationClicked", + /** + * Represents that an annotation was hovered over in the document. + * @remarks + * [Api set: WordApi 1.7] + */ + annotationHovered = "AnnotationHovered", + /** + * Represents that one or more annotations were added in the document. + * @remarks + * [Api set: WordApi 1.7] + */ + annotationInserted = "AnnotationInserted", + /** + * Represents that one or more annotations were deleted from the document. + * @remarks + * [Api set: WordApi 1.7] + */ + annotationRemoved = "AnnotationRemoved", + } /** * An enum that specifies an event's source. It can be local or remote (through coauthoring). * @@ -10951,6 +11535,7 @@ export declare namespace Word { + enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", @@ -11022,7 +11607,13 @@ export declare namespace Word { } /** An interface for updating data on the `CheckboxContentControl` object, for use in `checkboxContentControl.set({ ... })`. */ export interface CheckboxContentControlUpdateData { - + /** + * Specifies the current state of the checkbox. + * + * @remarks + * [Api set: WordApi 1.7] + */ + isChecked?: boolean; } /** An interface for updating data on the `Comment` object, for use in `comment.set({ ... })`. */ export interface CommentUpdateData { @@ -11120,7 +11711,13 @@ export declare namespace Word { } /** An interface for updating data on the `ContentControl` object, for use in `contentControl.set({ ... })`. */ export interface ContentControlUpdateData { - + /** + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.7] + */ + checkboxContentControl?: Word.Interfaces.CheckboxContentControlUpdateData; /** * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. * @@ -11203,6 +11800,16 @@ export declare namespace Word { export interface ContentControlCollectionUpdateData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ + export interface ContentControlListItemUpdateData { + + + + } + /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ + export interface ContentControlListItemCollectionUpdateData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ export interface CustomPropertyUpdateData { /** @@ -12259,12 +12866,30 @@ export declare namespace Word { } /** An interface describing the data returned by calling `critiqueAnnotation.toJSON()`. */ export interface CritiqueAnnotationData { - + /** + * Gets the critique that was passed when the annotation was inserted. + * + * @remarks + * [Api set: WordApi 1.7] + */ + critique?: Word.Critique; } /** An interface describing the data returned by calling `annotation.toJSON()`. */ export interface AnnotationData { - - + /** + * Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. + * + * @remarks + * [Api set: WordApi 1.7] + */ + id?: string; + /** + * Gets the state of the annotation. + * + * @remarks + * [Api set: WordApi 1.7] + */ + state?: Word.AnnotationState | "Created" | "Accepted" | "Rejected"; } /** An interface describing the data returned by calling `annotationCollection.toJSON()`. */ export interface AnnotationCollectionData { @@ -12366,7 +12991,13 @@ export declare namespace Word { } /** An interface describing the data returned by calling `checkboxContentControl.toJSON()`. */ export interface CheckboxContentControlData { - + /** + * Specifies the current state of the checkbox. + * + * @remarks + * [Api set: WordApi 1.7] + */ + isChecked?: boolean; } /** An interface describing the data returned by calling `comment.toJSON()`. */ export interface CommentData { @@ -12541,6 +13172,13 @@ export declare namespace Word { } /** An interface describing the data returned by calling `contentControl.toJSON()`. */ export interface ContentControlData { + /** + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.7] + */ + checkboxContentControl?: Word.Interfaces.CheckboxContentControlData; /** * Gets the collection of content control objects in the content control. @@ -12549,6 +13187,7 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ contentControls?: Word.Interfaces.ContentControlData[]; + /** * Gets the collection of field objects in the content control. * @@ -12696,6 +13335,16 @@ export declare namespace Word { export interface ContentControlCollectionData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ + export interface ContentControlListItemData { + + + + } + /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ + export interface ContentControlListItemCollectionData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface describing the data returned by calling `customProperty.toJSON()`. */ export interface CustomPropertyData { /** @@ -12989,6 +13638,12 @@ export declare namespace Word { */ title?: string; } + /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ + export interface DropDownListContentControlData { + } + /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ + export interface ComboBoxContentControlData { + } /** An interface describing the data returned by calling `field.toJSON()`. */ export interface FieldData { /** @@ -14230,9 +14885,98 @@ export declare namespace Word { export interface TrackedChangeCollectionData { items?: Word.Interfaces.TrackedChangeData[]; } - - - + /** + * Represents an annotation wrapper around critique displayed in the document. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export interface CritiqueAnnotationLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the range of text that is annotated. + * + * @remarks + * [Api set: WordApi 1.7] + */ + range?: Word.Interfaces.RangeLoadOptions; + /** + * Gets the critique that was passed when the annotation was inserted. + * + * @remarks + * [Api set: WordApi 1.7] + */ + critique?: boolean; + } + /** + * Represents an annotation attached to a paragraph. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export interface AnnotationLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the critique annotation object. + * + * @remarks + * [Api set: WordApi 1.7] + */ + critiqueAnnotation?: Word.Interfaces.CritiqueAnnotationLoadOptions; + /** + * Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. + * + * @remarks + * [Api set: WordApi 1.7] + */ + id?: boolean; + /** + * Gets the state of the annotation. + * + * @remarks + * [Api set: WordApi 1.7] + */ + state?: boolean; + } + /** + * Contains a collection of {@link Word.Annotation} objects. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export interface AnnotationCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the critique annotation object. + * + * @remarks + * [Api set: WordApi 1.7] + */ + critiqueAnnotation?: Word.Interfaces.CritiqueAnnotationLoadOptions; + /** + * For EACH ITEM in the collection: Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. + * + * @remarks + * [Api set: WordApi 1.7] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Gets the state of the annotation. + * + * @remarks + * [Api set: WordApi 1.7] + */ + state?: boolean; + } /** * Represents the body of a document or a section. * @@ -14324,7 +15068,25 @@ export declare namespace Word { } - + /** + * The data specific to content controls of type CheckBox. + * + * @remarks + * [Api set: WordApi 1.7] + */ + export interface CheckboxContentControlLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the current state of the checkbox. + * + * @remarks + * [Api set: WordApi 1.7] + */ + isChecked?: boolean; + } /** * Represents a comment in the document. * @@ -14639,7 +15401,13 @@ export declare namespace Word { Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). */ $all?: boolean; - + /** + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.7] + */ + checkboxContentControl?: Word.Interfaces.CheckboxContentControlLoadOptions; /** * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. * @@ -14806,7 +15574,13 @@ export declare namespace Word { Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). */ $all?: boolean; - + /** + * For EACH ITEM in the collection: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.7] + */ + checkboxContentControl?: Word.Interfaces.CheckboxContentControlLoadOptions; /** * For EACH ITEM in the collection: Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. * @@ -14962,6 +15736,8 @@ export declare namespace Word { */ type?: boolean; } + + /** * Represents a custom property. * diff --git a/generate-docs/api-extractor-inputs-word-release/word_desktop_1_1/word-desktop4.d.ts b/generate-docs/api-extractor-inputs-word-release/word_desktop_1_1/word-desktop4.d.ts new file mode 100644 index 0000000000..ba907c0ec5 --- /dev/null +++ b/generate-docs/api-extractor-inputs-word-release/word_desktop_1_1/word-desktop4.d.ts @@ -0,0 +1,18135 @@ +import { OfficeExtension } from "../../api-extractor-inputs-office/office" +import { Office as Outlook} from "../../api-extractor-inputs-outlook/outlook" +//////////////////////////////////////////////////////////////// +/////////////////////// Begin Word APIs //////////////////////// +//////////////////////////////////////////////////////////////// + +export declare namespace Word { + + + + + + + + + + + + + + /** + * Represents the application object. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class Application extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Creates a new document by using an optional Base64-encoded .docx file. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param base64File - Optional. The Base64-encoded .docx file. The default value is null. + */ + createDocument(base64File?: string): Word.DocumentCreated; + /** + * Opens a document and displays it in a new tab or window. + The following are examples for the various supported clients and platforms. + + - Remote or cloud location example: `https://microsoft.sharepoint.com/some/path/Document.docx` + + - Local location examples for Windows: `C:\\Users\\Someone\\Documents\\Document.docx` (includes required escaped backslashes), `file://mycomputer/myfolder/Document.docx` + + - Local location example for Mac and iOS: `/User/someone/document.docx` + * + * @remarks + * [Api set: WordApi 1.6] + * + * @param filePath - Required. The absolute path of the .docx file. Word on the web only supports remote (cloud) locations, while Word on Windows, on Mac, and on iOS support local and remote locations. + */ + openDocument(filePath: string): void; + /** + * Parse styles from template Base64 file and return JSON format of retrieved styles as a string. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param base64File - Required. The template file. + */ + retrieveStylesFromBase64(base64File: string): OfficeExtension.ClientResult; + /** + * Create a new instance of the `Word.Application` object. + */ + static newObject(context: OfficeExtension.ClientRequestContext): Word.Application; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Application` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ApplicationData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): { + [key: string]: string; + }; + } + /** + * Represents the body of a document or a section. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class Body extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of rich text content control objects in the body. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * Gets the collection of endnotes in the body. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly endnotes: Word.NoteItemCollection; + /** + * Gets the collection of field objects in the body. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly fields: Word.FieldCollection; + /** + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly font: Word.Font; + /** + * Gets the collection of footnotes in the body. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly footnotes: Word.NoteItemCollection; + /** + * Gets the collection of InlinePicture objects in the body. The collection doesn't include floating images. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly inlinePictures: Word.InlinePictureCollection; + /** + * Gets the collection of list objects in the body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly lists: Word.ListCollection; + /** + * Gets the collection of paragraph objects in the body. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Important: Paragraphs in tables aren't returned for requirement sets 1.1 and 1.2. From requirement set 1.3, paragraphs in tables are also returned. + */ + readonly paragraphs: Word.ParagraphCollection; + /** + * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws an `ItemNotFound` error if there isn't a parent body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentBody: Word.Body; + /** + * Gets the parent body of the body. For example, a table cell body's parent body could be a header. If there isn't a parent body, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentBodyOrNullObject: Word.Body; + /** + * Gets the content control that contains the body. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the body. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the parent section of the body. Throws an `ItemNotFound` error if there isn't a parent section. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentSection: Word.Section; + /** + * Gets the parent section of the body. If there isn't a parent section, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentSectionOrNullObject: Word.Section; + /** + * Gets the collection of table objects in the body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly tables: Word.TableCollection; + /** + * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style: string; + /** + * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * Gets the text of the body. Use the insertText method to insert text. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly text: string; + /** + * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly type: Word.BodyType | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell" | "Footnote" | "Endnote" | "NoteItem"; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.BodyUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Body): void; + /** + * Clears the contents of the body object. The user can perform the undo operation on the cleared content. + * + * @remarks + * [Api set: WordApi 1.1] + */ + clear(): void; + /** + * Gets comments associated with the body. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getComments(): Word.CommentCollection; + /** + * Gets the currently supported content controls in the body. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. + * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. + * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. + * + * @param options - Optional. Options that define which content controls are returned. + */ + getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; + /** + * Gets an HTML representation of the body object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Body.getOoxml()` and convert the returned XML to HTML. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getHtml(): OfficeExtension.ClientResult; + /** + * Gets the OOXML (Office Open XML) representation of the body object. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getOoxml(): OfficeExtension.ClientResult; + /** + * Gets the whole body, or the starting or ending point of the body, as a range. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. + */ + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersionString - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersionString?: "Original" | "Current"): OfficeExtension.ClientResult; + /** + * Gets the collection of the TrackedChange objects in the body. + * + * @remarks + * [Api set: WordApi 1.6] + */ + getTrackedChanges(): Word.TrackedChangeCollection; + /** + * Inserts a break at the specified location in the main document. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param breakType - Required. The break type to add to the body. + * @param insertLocation - Required. The value must be 'Start' or 'End'. + */ + insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): void; + /** + * Wraps the Body object with a content control. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. + * + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. + */ + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; + /** + * Inserts a document into the body at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. + * + * @param base64File - Required. The Base64-encoded content of a .docx file. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts HTML at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param html - Required. The HTML to be inserted in the document. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts a picture into the body at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage - Required. The Base64-encoded image to be inserted in the body. + * @param insertLocation - Required. The value must be 'Start' or 'End'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): Word.InlinePicture; + /** + * Inserts OOXML at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param ooxml - Required. The OOXML to be inserted. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param paragraphText - Required. The paragraph text to be inserted. + * @param insertLocation - Required. The value must be 'Start' or 'End'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): Word.Paragraph; + /** + * Inserts a table with the specified number of rows and columns. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rowCount - Required. The number of rows in the table. + * @param columnCount - Required. The number of columns in the table. + * @param insertLocation - Required. The value must be 'Start' or 'End'. + * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End", values?: string[][]): Word.Table; + /** + * Inserts text into the body at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param text - Required. Text to be inserted. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Performs a search with the specified SearchOptions on the scope of the body object. The search results are a collection of range objects. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param searchText - Required. The search text. Can be a maximum of 255 characters. + * @param searchOptions - Optional. Options for the search. + */ + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + /** + * Selects the body and navigates the Word UI to it. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects the body and navigates the Word UI to it. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionModeString - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionModeString?: "Select" | "Start" | "End"): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.BodyLoadOptions): Word.Body; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Body; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Body; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Body; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Body; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Body` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.BodyData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.BodyData; + } + + + + /** + * Represents a comment in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export class Comment extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies the comment's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange: Word.CommentContentRange; + /** + * Gets the collection of reply objects associated with the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly replies: Word.CommentReplyCollection; + /** + * Gets the email of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly authorEmail: string; + /** + * Gets the name of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly authorName: string; + /** + * Specifies the comment's content as plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content: string; + /** + * Gets the creation date of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly creationDate: Date; + /** + * Gets the ID of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly id: string; + /** + * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. + * + * @remarks + * [Api set: WordApi 1.4] + */ + resolved: boolean; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.CommentUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Comment): void; + /** + * Deletes the comment and its replies. + * + * @remarks + * [Api set: WordApi 1.4] + */ + delete(): void; + /** + * Gets the range in the main document where the comment is on. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getRange(): Word.Range; + /** + * Adds a new reply to the end of the comment thread. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param replyText - Required. Reply text. + */ + reply(replyText: string): Word.CommentReply; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CommentLoadOptions): Word.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Comment; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Comment; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Comment; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Comment` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.CommentData; + } + /** + * Contains a collection of {@link Word.Comment} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export class CommentCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.Comment[]; + /** + * Gets the first comment in the collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getFirst(): Word.Comment; + /** + * Gets the first comment in the collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getFirstOrNullObject(): Word.Comment; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CommentCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CommentCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CommentCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CommentCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CommentCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.CommentCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.CommentCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.CommentCollectionData; + } + /** + * @remarks + * [Api set: WordApi 1.4] + */ + export class CommentContentRange extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies a value that indicates whether the comment text is bold. + * + * @remarks + * [Api set: WordApi 1.4] + */ + bold: boolean; + /** + * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + hyperlink: string; + /** + * Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly isEmpty: boolean; + /** + * Specifies a value that indicates whether the comment text is italicized. + * + * @remarks + * [Api set: WordApi 1.4] + */ + italic: boolean; + /** + * Specifies a value that indicates whether the comment text has a strikethrough. + * + * @remarks + * [Api set: WordApi 1.4] + */ + strikeThrough: boolean; + /** + * Gets the text of the comment range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly text: string; + /** + * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. + * + * @remarks + * [Api set: WordApi 1.4] + */ + underline: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.CommentContentRangeUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.CommentContentRange): void; + /** + * Inserts text into at the specified location. **Note**: For the modern comment, the content range tracked across context turns to empty if any revision to the comment is posted through the UI. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param text - Required. The text to be inserted in to the CommentContentRange. + * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertText(text: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.CommentContentRange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CommentContentRangeLoadOptions): Word.CommentContentRange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CommentContentRange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.CommentContentRange; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CommentContentRange; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.CommentContentRange; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.CommentContentRange` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentContentRangeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.CommentContentRangeData; + } + /** + * Represents a comment reply in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export class CommentReply extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies the commentReply's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange: Word.CommentContentRange; + /** + * Gets the parent comment of this reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentComment: Word.Comment; + /** + * Gets the email of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly authorEmail: string; + /** + * Gets the name of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly authorName: string; + /** + * Specifies the comment reply's content. The string is plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content: string; + /** + * Gets the creation date of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly creationDate: Date; + /** + * Gets the ID of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly id: string; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.CommentReplyUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.CommentReply): void; + /** + * Deletes the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + delete(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CommentReplyLoadOptions): Word.CommentReply; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CommentReply; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.CommentReply; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CommentReply; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.CommentReply; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.CommentReply` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentReplyData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.CommentReplyData; + } + /** + * Contains a collection of {@link Word.CommentReply} objects. Represents all comment replies in one comment thread. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export class CommentReplyCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.CommentReply[]; + /** + * Gets the first comment reply in the collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getFirst(): Word.CommentReply; + /** + * Gets the first comment reply in the collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getFirstOrNullObject(): Word.CommentReply; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CommentReplyCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CommentReplyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CommentReplyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CommentReplyCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CommentReplyCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.CommentReplyCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.CommentReplyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentReplyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.CommentReplyCollectionData; + } + /** + * Represents a content control. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text, plain text, and checkbox content controls are supported. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class ContentControl extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + + + /** + * Gets the collection of content control objects in the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + + /** + * Gets the collection of endnotes in the content control. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly endnotes: Word.NoteItemCollection; + /** + * Gets the collection of field objects in the content control. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly fields: Word.FieldCollection; + /** + * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly font: Word.Font; + /** + * Gets the collection of footnotes in the content control. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly footnotes: Word.NoteItemCollection; + /** + * Gets the collection of InlinePicture objects in the content control. The collection doesn't include floating images. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly inlinePictures: Word.InlinePictureCollection; + /** + * Gets the collection of list objects in the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly lists: Word.ListCollection; + /** + * Gets the collection of paragraph objects in the content control. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Important: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this content control aren't returned. From requirement set 1.3, paragraphs in such tables are also returned. + */ + readonly paragraphs: Word.ParagraphCollection; + /** + * Gets the parent body of the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentBody: Word.Body; + /** + * Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the table that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCell: Word.TableCell; + /** + * Gets the table cell that contains the content control. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * Gets the table that contains the content control. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * Gets the collection of table objects in the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly tables: Word.TableCollection; + /** + * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + appearance: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; + /** + * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotDelete: boolean; + /** + * Specifies a value that indicates whether the user can edit the contents of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotEdit: boolean; + /** + * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color: string; + /** + * Gets an integer that represents the content control identifier. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly id: number; + /** + * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. + * + * @remarks + * [Api set: WordApi 1.1] + */ + placeholderText: string; + /** + * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * @remarks + * [Api set: WordApi 1.1] + */ + removeWhenEdited: boolean; + /** + * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style: string; + /** + * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly subtype: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText"; + /** + * Specifies a tag to identify a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + tag: string; + /** + * Gets the text of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly text: string; + /** + * Specifies the title for a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + title: string; + /** + * Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly type: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText"; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ContentControlUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.ContentControl): void; + /** + * Clears the contents of the content control. The user can perform the undo operation on the cleared content. + * + * @remarks + * [Api set: WordApi 1.1] + */ + clear(): void; + /** + * Deletes the content control and its content. If `keepContent` is set to true, the content isn't deleted. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param keepContent - Required. Indicates whether the content should be deleted with the content control. If `keepContent` is set to true, the content isn't deleted. + */ + delete(keepContent: boolean): void; + /** + * Gets comments associated with the content control. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getComments(): Word.CommentCollection; + /** + * Gets the currently supported child content controls in this content control. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. + * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. + * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. + * + * @param options - Optional. Options that define which content controls are returned. + */ + getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; + /** + * Gets an HTML representation of the content control object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `ContentControl.getOoxml()` and convert the returned XML to HTML. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getHtml(): OfficeExtension.ClientResult; + /** + * Gets the Office Open XML (OOXML) representation of the content control object. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getOoxml(): OfficeExtension.ClientResult; + /** + * Gets the whole content control, or the starting or ending point of the content control, as a range. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', 'Before', 'After', or 'Content'. + */ + getRange(rangeLocation?: Word.RangeLocation | "Whole" | "Start" | "End" | "Before" | "After" | "Content"): Word.Range; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersionString - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersionString?: "Original" | "Current"): OfficeExtension.ClientResult; + /** + * Gets the text ranges in the content control by using punctuation marks and/or other ending marks. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. + * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. + */ + getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; + /** + * Gets the collection of the TrackedChange objects in the content control. + * + * @remarks + * [Api set: WordApi 1.6] + */ + getTrackedChanges(): Word.TrackedChangeCollection; + /** + * Inserts a break at the specified location in the main document. This method cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param breakType - Required. Type of break. + * @param insertLocation - Required. The value must be 'Start', 'End', 'Before', or 'After'. + */ + insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): void; + /** + * Inserts a document into the content control at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. + * + * @param base64File - Required. The Base64-encoded content of a .docx file. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts HTML into the content control at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param html - Required. The HTML to be inserted in to the content control. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts an inline picture into the content control at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage - Required. The Base64-encoded image to be inserted in the content control. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.InlinePicture; + /** + * Inserts OOXML into the content control at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param ooxml - Required. The OOXML to be inserted in to the content control. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param paragraphText - Required. The paragraph text to be inserted. + * @param insertLocation - Required. The value must be 'Start', 'End', 'Before', or 'After'. 'Before' and 'After' cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): Word.Paragraph; + /** + * Inserts a table with the specified number of rows and columns into, or next to, a content control. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rowCount - Required. The number of rows in the table. + * @param columnCount - Required. The number of columns in the table. + * @param insertLocation - Required. The value must be 'Start', 'End', 'Before', or 'After'. 'Before' and 'After' cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. + * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After", values?: string[][]): Word.Table; + /** + * Inserts text into the content control at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param text - Required. The text to be inserted in to the content control. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. + */ + insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Performs a search with the specified SearchOptions on the scope of the content control object. The search results are a collection of range objects. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param searchText - Required. The search text. + * @param searchOptions - Optional. Options for the search. + */ + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + /** + * Selects the content control. This causes Word to scroll to the selection. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects the content control. This causes Word to scroll to the selection. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionModeString - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionModeString?: "Select" | "Start" | "End"): void; + /** + * Splits the content control into child ranges by using delimiters. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param delimiters - Required. The delimiters as an array of strings. + * @param multiParagraphs - Optional. Indicates whether a returned child range can cover multiple paragraphs. Default is false which indicates that the paragraph boundaries are also used as delimiters. + * @param trimDelimiters - Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. + * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. + */ + split(delimiters: string[], multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ContentControlLoadOptions): Word.ContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ContentControl; + /** + * Occurs when data within the content control are changed. To get the new text, load this content control in the handler. To get the old text, do not load it. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @eventproperty + */ + readonly onDataChanged: OfficeExtension.EventHandlers; + /** + * Occurs when the content control is deleted. Do not load this content control in the handler, otherwise you won't be able to get its original properties. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @eventproperty + */ + readonly onDeleted: OfficeExtension.EventHandlers; + /** + * Occurs when the content control is entered. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @eventproperty + */ + readonly onEntered: OfficeExtension.EventHandlers; + /** + * Occurs when the content control is exited, for example, when the cursor leaves the content control. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @eventproperty + */ + readonly onExited: OfficeExtension.EventHandlers; + /** + * Occurs when selection within the content control is changed. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @eventproperty + */ + readonly onSelectionChanged: OfficeExtension.EventHandlers; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ContentControl; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ContentControl; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.ContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ContentControlData; + } + /** + * Contains a collection of {@link Word.ContentControl} objects. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text and plain text content controls are supported. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class ContentControlCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.ContentControl[]; + /** + * Gets the content controls that have the specified tracking state. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param changeTrackingStates - Required. An array of content control change tracking states. + */ + getByChangeTrackingStates(changeTrackingStates: Word.ChangeTrackingState[]): Word.ContentControlCollection; + /** + * Gets a content control by its identifier. Throws an `ItemNotFound` error if there isn't a content control with the identifier in this collection. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param id - Required. A content control identifier. + */ + getById(id: number): Word.ContentControl; + /** + * Gets a content control by its identifier. If there isn't a content control with the identifier in this collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param id - Required. A content control identifier. + */ + getByIdOrNullObject(id: number): Word.ContentControl; + /** + * Gets the content controls that have the specified tag. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param tag - Required. A tag set on a content control. + */ + getByTag(tag: string): Word.ContentControlCollection; + /** + * Gets the content controls that have the specified title. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param title - Required. The title of a content control. + */ + getByTitle(title: string): Word.ContentControlCollection; + /** + * Gets the content controls that have the specified types. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param types - Required. An array of content control types. + */ + getByTypes(types: Word.ContentControlType[]): Word.ContentControlCollection; + /** + * Gets the first content control in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.ContentControl; + /** + * Gets the first content control in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.ContentControl; + /** + * Gets a content control by its ID. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param id - The content control's ID. + */ + getItem(id: number): Word.ContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ContentControlCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ContentControlCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ContentControlCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ContentControlCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ContentControlCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ContentControlCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.ContentControlCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.ContentControlCollectionData; + } + + + /** + * Specifies the options that define which content controls are returned. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export interface ContentControlOptions { + /** + * An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. + * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9. + */ + types: Word.ContentControlType[]; + } + /** + * Represents a custom property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class CustomProperty extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the key of the custom property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly key: string; + /** + * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly type: Word.DocumentPropertyType | "String" | "Number" | "Date" | "Boolean"; + /** + * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). + * + * @remarks + * [Api set: WordApi 1.3] + */ + value: any; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.CustomPropertyUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.CustomProperty): void; + /** + * Deletes the custom property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + delete(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CustomPropertyLoadOptions): Word.CustomProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CustomProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.CustomProperty; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CustomProperty; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.CustomProperty; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.CustomProperty` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomPropertyData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.CustomPropertyData; + } + /** + * Contains the collection of {@link Word.CustomProperty} objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class CustomPropertyCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.CustomProperty[]; + /** + * Creates a new or sets an existing custom property. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param key - Required. The custom property's key, which is case-insensitive. + * @param value - Required. The custom property's value. + */ + add(key: string, value: any): Word.CustomProperty; + /** + * Deletes all custom properties in this collection. + * + * @remarks + * [Api set: WordApi 1.3] + */ + deleteAll(): void; + /** + * Gets the count of custom properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a custom property object by its key, which is case-insensitive. Throws an `ItemNotFound` error if the custom property doesn't exist. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param key - The key that identifies the custom property object. + */ + getItem(key: string): Word.CustomProperty; + /** + * Gets a custom property object by its key, which is case-insensitive. If the custom property doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param key - Required. The key that identifies the custom property object. + */ + getItemOrNullObject(key: string): Word.CustomProperty; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CustomPropertyCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomPropertyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CustomPropertyCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomPropertyCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CustomPropertyCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.CustomPropertyCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.CustomPropertyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomPropertyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.CustomPropertyCollectionData; + } + /** + * Represents a custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export class CustomXmlPart extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the ID of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly id: string; + /** + * Gets the namespace URI of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly namespaceUri: string; + /** + * Deletes the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + delete(): void; + /** + * Deletes an attribute with the given name from the element identified by xpath. + * + * @remarks + * [Api set: WordApi 1.4] + * + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @param xpath - Required. Absolute path to the single element in XPath notation. + * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". + * @param name - Required. Name of the attribute. + */ + deleteAttribute(xpath: string, namespaceMappings: { + [key: string]: string; + }, name: string): void; + /** + * Deletes the element identified by xpath. + * + * @remarks + * [Api set: WordApi 1.4] + * + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @param xpath - Required. Absolute path to the single element in XPath notation. + * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". + */ + deleteElement(xpath: string, namespaceMappings: { + [key: string]: string; + }): void; + /** + * Gets the full XML content of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getXml(): OfficeExtension.ClientResult; + /** + * Inserts an attribute with the given name and value to the element identified by xpath. + * + * @remarks + * [Api set: WordApi 1.4] + * + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @param xpath - Required. Absolute path to the single element in XPath notation. + * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". + * @param name - Required. Name of the attribute. + * @param value - Required. Value of the attribute. + */ + insertAttribute(xpath: string, namespaceMappings: { + [key: string]: string; + }, name: string, value: string): void; + /** + * Inserts the given XML under the parent element identified by xpath at child position index. + * + * @remarks + * [Api set: WordApi 1.4] + * + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @param xpath - Required. Absolute path to the single parent element in XPath notation. + * @param xml - Required. XML content to be inserted. + * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". + * @param index - Optional. Zero-based position at which the new XML to be inserted. If omitted, the XML will be appended as the last child of this parent. + */ + insertElement(xpath: string, xml: string, namespaceMappings: { + [key: string]: string; + }, index?: number): void; + /** + * Queries the XML content of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + * + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @param xpath - Required. An XPath query. + * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". + * @returns An array where each item represents an entry matched by the XPath query. + */ + query(xpath: string, namespaceMappings: { + [key: string]: string; + }): OfficeExtension.ClientResult; + /** + * Sets the full XML content of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param xml - Required. XML content to be set. + */ + setXml(xml: string): void; + /** + * Updates the value of an attribute with the given name of the element identified by xpath. + * + * @remarks + * [Api set: WordApi 1.4] + * + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @param xpath - Required. Absolute path to the single element in XPath notation. + * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". + * @param name - Required. Name of the attribute. + * @param value - Required. New value of the attribute. + */ + updateAttribute(xpath: string, namespaceMappings: { + [key: string]: string; + }, name: string, value: string): void; + /** + * Updates the XML of the element identified by xpath. + * + * @remarks + * [Api set: WordApi 1.4] + * + * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), + * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose + * the tree is the following: + * + * ```xml + * + * + * something + * + * + * ``` + * + * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to + * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. + * + * @param xpath - Required. Absolute path to the single element in XPath notation. + * @param xml - Required. New XML content to be stored. + * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". + */ + updateElement(xpath: string, xml: string, namespaceMappings: { + [key: string]: string; + }): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CustomXmlPartLoadOptions): Word.CustomXmlPart; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CustomXmlPart; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.CustomXmlPart; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CustomXmlPart; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.CustomXmlPart; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.CustomXmlPart` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.CustomXmlPartData; + } + /** + * Contains the collection of {@link Word.CustomXmlPart} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export class CustomXmlPartCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.CustomXmlPart[]; + /** + * Adds a new custom XML part to the document. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param xml - Required. XML content. Must be a valid XML fragment. + */ + add(xml: string): Word.CustomXmlPart; + /** + * Gets a new scoped collection of custom XML parts whose namespaces match the given namespace. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param namespaceUri - Required. The namespace URI. + */ + getByNamespace(namespaceUri: string): Word.CustomXmlPartScopedCollection; + /** + * Gets the number of items in the collection. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a custom XML part based on its ID. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param id - ID or index of the custom XML part to be retrieved. + */ + getItem(id: string): Word.CustomXmlPart; + /** + * Gets a custom XML part based on its ID. If the CustomXmlPart doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param id - Required. ID of the object to be retrieved. + */ + getItemOrNullObject(id: string): Word.CustomXmlPart; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CustomXmlPartCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomXmlPartCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CustomXmlPartCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomXmlPartCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CustomXmlPartCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.CustomXmlPartCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.CustomXmlPartCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.CustomXmlPartCollectionData; + } + /** + * Contains the collection of {@link Word.CustomXmlPart} objects with a specific namespace. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export class CustomXmlPartScopedCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.CustomXmlPart[]; + /** + * Gets the number of items in the collection. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a custom XML part based on its ID. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param id - ID of the custom XML part to be retrieved. + */ + getItem(id: string): Word.CustomXmlPart; + /** + * Gets a custom XML part based on its ID. If the CustomXmlPart doesn't exist in the collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param id - Required. ID of the object to be retrieved. + */ + getItemOrNullObject(id: string): Word.CustomXmlPart; + /** + * If the collection contains exactly one item, this method returns it. Otherwise, this method produces an error. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getOnlyItem(): Word.CustomXmlPart; + /** + * If the collection contains exactly one item, this method returns it. Otherwise, this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getOnlyItemOrNullObject(): Word.CustomXmlPart; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.CustomXmlPartScopedCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomXmlPartScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.CustomXmlPartScopedCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomXmlPartScopedCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.CustomXmlPartScopedCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.CustomXmlPartScopedCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.CustomXmlPartScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.CustomXmlPartScopedCollectionData; + } + /** + * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class Document extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly body: Word.Body; + /** + * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * Gets the custom XML parts in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly customXmlParts: Word.CustomXmlPartCollection; + /** + * Gets the properties of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly properties: Word.DocumentProperties; + /** + * Gets the collection of section objects in the document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly sections: Word.SectionCollection; + /** + * Gets the add-in's settings in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly settings: Word.SettingCollection; + /** + * Specifies the ChangeTracking mode. + * + * @remarks + * [Api set: WordApi 1.4] + */ + changeTrackingMode: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; + /** + * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly saved: boolean; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.DocumentUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Document): void; + /** + * Adds a style into the document by name and type. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param name - Required. A string representing the style name. + * @param type - Required. The style type, including character, list, paragraph, or table. + */ + addStyle(name: string, type: Word.StyleType): Word.Style; + /** + * Adds a style into the document by name and type. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param name - Required. A string representing the style name. + * @param typeString - Required. The style type, including character, list, paragraph, or table. + */ + addStyle(name: string, typeString: "Character" | "List" | "Paragraph" | "Table"): Word.Style; + /** + * Closes the current document. + + Note: This API isn't supported in Word on the web. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param closeBehavior - Optional. The close behavior must be 'Save' or 'SkipSave'. Default value is 'Save'. + */ + close(closeBehavior?: Word.CloseBehavior): void; + /** + * Closes the current document. + + Note: This API isn't supported in Word on the web. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param closeBehaviorString - Optional. The close behavior must be 'Save' or 'SkipSave'. Default value is 'Save'. + */ + close(closeBehaviorString?: "Save" | "SkipSave"): void; + + /** + * Deletes a bookmark, if it exists, from the document. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param name - Required. The case-insensitive bookmark name. + */ + deleteBookmark(name: string): void; + + /** + * Gets a bookmark's range. Throws an `ItemNotFound` error if the bookmark doesn't exist. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param name - Required. The case-insensitive bookmark name. + */ + getBookmarkRange(name: string): Word.Range; + /** + * Gets a bookmark's range. If the bookmark doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param name - Required. The case-insensitive bookmark name. + */ + getBookmarkRangeOrNullObject(name: string): Word.Range; + /** + * Gets the currently supported content controls in the document. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. + * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. + * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. + * + * @param options - Optional. Options that define which content controls are returned. + */ + getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; + /** + * Gets the document's endnotes in a single body. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getEndnoteBody(): Word.Body; + /** + * Gets the document's footnotes in a single body. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getFootnoteBody(): Word.Body; + /** + * Gets the paragraph by its unique local ID. Throws an `ItemNotFound` error if the collection is empty. + * + * @remarks + * [Api set: WordApi 1.6] + * + * @param id - Required. Unique local ID in standard 8-4-4-4-12 GUID format without curly braces. Note that the ID differs across sessions and coauthors. + */ + getParagraphByUniqueLocalId(id: string): Word.Paragraph; + /** + * Gets the current selection of the document. Multiple selections aren't supported. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getSelection(): Word.Range; + /** + * Gets a StyleCollection object that represents the whole style set of the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getStyles(): Word.StyleCollection; + /** + * Import styles from a JSON-formatted string. + * + * @remarks + * [Api set: WordApi 1.6] + * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * + * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. + */ + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult; + /** + * Import styles from a JSON-formatted string. + * + * @remarks + * [Api set: WordApi 1.6] + * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * + * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehaviorString - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. + */ + importStylesFromJson(stylesJson: string, importedStylesConflictBehaviorString?: "Ignore" | "Overwrite" | "CreateNew"): OfficeExtension.ClientResult; + /** + * Inserts a document into the target document at a specific location with additional properties. + Headers, footers, watermarks, and other section properties are copied by default. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. + * + * @param base64File - Required. The Base64-encoded content of a .docx file. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. + * @param insertFileOptions - Optional. The additional properties that should be imported to the destination document. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End", insertFileOptions?: Word.InsertFileOptions): Word.SectionCollection; + /** + * Saves the document. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApi 1.5. + * + * @param saveBehavior - Optional. The save behavior must be 'Save' or 'Prompt'. Default value is 'Save'. + * @param fileName - Optional. The file name (exclude file extension). Only takes effect for a new document. + */ + save(saveBehavior?: Word.SaveBehavior, fileName?: string): void; + /** + * Saves the document. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApi 1.5. + * + * @param saveBehaviorString - Optional. The save behavior must be 'Save' or 'Prompt'. Default value is 'Save'. + * @param fileName - Optional. The file name (exclude file extension). Only takes effect for a new document. + */ + save(saveBehaviorString?: "Save" | "Prompt", fileName?: string): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.DocumentLoadOptions): Word.Document; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Document; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Document; + + + + + + /** + * Occurs when a content control is added. Run context.sync() in the handler to get the new content control's properties. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @eventproperty + */ + readonly onContentControlAdded: OfficeExtension.EventHandlers; + /** + * Occurs when the user adds new paragraphs. + * + * @remarks + * [Api set: WordApi 1.6] + * + * @eventproperty + */ + readonly onParagraphAdded: OfficeExtension.EventHandlers; + /** + * Occurs when the user changes paragraphs. + * + * @remarks + * [Api set: WordApi 1.6] + * + * @eventproperty + */ + readonly onParagraphChanged: OfficeExtension.EventHandlers; + /** + * Occurs when the user deletes paragraphs. + * + * @remarks + * [Api set: WordApi 1.6] + * + * @eventproperty + */ + readonly onParagraphDeleted: OfficeExtension.EventHandlers; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Document; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Document; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Document` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.DocumentData; + } + /** + * The DocumentCreated object is the top level object created by Application.CreateDocument. A DocumentCreated object is a special Document object. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class DocumentCreated extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + readonly body: Word.Body; + /** + * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * Gets the custom XML parts in the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.4] + */ + readonly customXmlParts: Word.CustomXmlPartCollection; + /** + * Gets the properties of the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + readonly properties: Word.DocumentProperties; + /** + * Gets the collection of section objects in the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + readonly sections: Word.SectionCollection; + /** + * Gets the add-in's settings in the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.4] + */ + readonly settings: Word.SettingCollection; + /** + * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + readonly saved: boolean; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.DocumentCreatedUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.DocumentCreated): void; + /** + * Adds a style into the document by name and type. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.5] + * + * @param name - Required. A string representing the style name. + * @param type - Required. The style type, including character, list, paragraph, or table. + */ + addStyle(name: string, type: Word.StyleType): Word.Style; + /** + * Adds a style into the document by name and type. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.5] + * + * @param name - Required. A string representing the style name. + * @param typeString - Required. The style type, including character, list, paragraph, or table. + */ + addStyle(name: string, typeString: "Character" | "List" | "Paragraph" | "Table"): Word.Style; + /** + * Deletes a bookmark, if it exists, from the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.4] + * + * @param name - Required. The case-insensitive bookmark name. + */ + deleteBookmark(name: string): void; + /** + * Gets a bookmark's range. Throws an `ItemNotFound` error if the bookmark doesn't exist. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.4] + * + * @param name - Required. The case-insensitive bookmark name. + */ + getBookmarkRange(name: string): Word.Range; + /** + * Gets a bookmark's range. If the bookmark doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.4] + * + * @param name - Required. The case-insensitive bookmark name. Only alphanumeric and underscore characters are supported. It must begin with a letter but if you want to tag the bookmark as hidden, then start the name with an underscore character. Names can't be longer than 40 characters. + */ + getBookmarkRangeOrNullObject(name: string): Word.Range; + /** + * Gets the currently supported content controls in the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.5] + * + * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. + * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. + * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. + * + * @param options - Optional. Options that define which content controls are returned. + */ + getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; + /** + * Gets a StyleCollection object that represents the whole style set of the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.5] + */ + getStyles(): Word.StyleCollection; + /** + * Inserts a document into the target document at a specific location with additional properties. + Headers, footers, watermarks, and other section properties are copied by default. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.5] + * + * Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. + * + * @param base64File - Required. The Base64-encoded content of a .docx file. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. + * @param insertFileOptions - Optional. The additional properties that should be imported to the destination document. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End", insertFileOptions?: Word.InsertFileOptions): Word.SectionCollection; + /** + * Opens the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + open(): void; + /** + * Saves the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + * + * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApiHiddenDocument 1.5. + * + * @param saveBehavior - Optional. DocumentCreated only supports 'Save'. + * @param fileName - Optional. The file name (exclude file extension). Only takes effect for a new document. + */ + save(saveBehavior?: Word.SaveBehavior, fileName?: string): void; + /** + * Saves the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + * + * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApiHiddenDocument 1.5. + * + * @param saveBehaviorString - Optional. DocumentCreated only supports 'Save'. + * @param fileName - Optional. The file name (exclude file extension). Only takes effect for a new document. + */ + save(saveBehaviorString?: "Save" | "Prompt", fileName?: string): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.DocumentCreatedLoadOptions): Word.DocumentCreated; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.DocumentCreated; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.DocumentCreated; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.DocumentCreated; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.DocumentCreated; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.DocumentCreated` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentCreatedData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.DocumentCreatedData; + } + /** + * Represents document properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class DocumentProperties extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of custom properties of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly customProperties: Word.CustomPropertyCollection; + /** + * Gets the application name of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly applicationName: string; + /** + * Specifies the author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + author: string; + /** + * Specifies the category of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + category: string; + /** + * Specifies the Comments field in the metadata of the document. These have no connection to comments by users made in the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + comments: string; + /** + * Specifies the company of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + company: string; + /** + * Gets the creation date of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly creationDate: Date; + /** + * Specifies the format of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + format: string; + /** + * Specifies the keywords of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + keywords: string; + /** + * Gets the last author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly lastAuthor: string; + /** + * Gets the last print date of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly lastPrintDate: Date; + /** + * Gets the last save time of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly lastSaveTime: Date; + /** + * Specifies the manager of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + manager: string; + /** + * Gets the revision number of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly revisionNumber: string; + /** + * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly security: number; + /** + * Specifies the subject of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subject: string; + /** + * Gets the template of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly template: string; + /** + * Specifies the title of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + title: string; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.DocumentPropertiesUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.DocumentProperties): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.DocumentPropertiesLoadOptions): Word.DocumentProperties; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.DocumentProperties; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.DocumentProperties; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.DocumentProperties; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.DocumentProperties; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.DocumentProperties` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentPropertiesData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.DocumentPropertiesData; + } + + + /** + * Represents a field. + * + * @remarks + * [Api set: WordApi 1.4] + * + * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField` API introduced in requirement set 1.5. + * Support for managing fields is similar to what's available in the Word UI. + * However, while the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}), + * the `Addin` field is editable. To learn more about Word UI clients that more fully support fields, + * see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. + */ + export class Field extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the parent body of the field. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentBody: Word.Body; + /** + * Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the table that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentTable: Word.Table; + /** + * Gets the table cell that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentTableCell: Word.TableCell; + /** + * Gets the table cell that contains the field. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * Gets the table that contains the field. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * Gets the field's result data. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly result: Word.Range; + /** + * Specifies the field's code instruction. + * + * @remarks + * [Api set: WordApi 1.4] + * + * Note: The ability to set the code was introduced in WordApi 1.5. + */ + code: string; + /** + * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. + * + * @remarks + * [Api set: WordApi 1.5] + */ + data: string; + /** + * Gets the field's kind. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly kind: Word.FieldKind | "None" | "Hot" | "Warm" | "Cold"; + /** + * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. + * + * @remarks + * [Api set: WordApi 1.5] + */ + locked: boolean; + + /** + * Gets the field's type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly type: Word.FieldType | "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined"; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.FieldUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Field): void; + /** + * Deletes the field. + * + * @remarks + * [Api set: WordApi 1.5] + */ + delete(): void; + /** + * Gets the next field. Throws an `ItemNotFound` error if this field is the last one. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getNext(): Word.Field; + /** + * Gets the next field. If this field is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getNextOrNullObject(): Word.Field; + /** + * Selects the field. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects the field. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param selectionModeString - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionModeString?: "Select" | "Start" | "End"): void; + /** + * Updates the field. + * + * @remarks + * [Api set: WordApi 1.5] + */ + updateResult(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.FieldLoadOptions): Word.Field; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Field; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Field; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Field; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Field; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Field` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FieldData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.FieldData; + } + /** + * Contains a collection of {@link Word.Field} objects. + * + * @remarks + * [Api set: WordApi 1.4] + * + * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField API` introduced in requirement set 1.5. + * Support for managing fields is similar to what's available in the Word UI. + * However, while the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}), + * the `Addin` field is editable. To learn more about Word UI clients that more fully support fields, + * see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. + */ + export class FieldCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.Field[]; + /** + * Gets the first field in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getFirst(): Word.Field; + /** + * Gets the first field in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getFirstOrNullObject(): Word.Field; + /** + * Gets the Field object collection including the specified types of fields. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param types - Required. An array of field types. + */ + getByTypes(types: Word.FieldType[]): Word.FieldCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.FieldCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.FieldCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.FieldCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.FieldCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.FieldCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.FieldCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.FieldCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FieldCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.FieldCollectionData; + } + /** + * Represents a font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class Font extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + bold: boolean; + /** + * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color: string; + /** + * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + doubleStrikeThrough: boolean; + /** + * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + highlightColor: string; + /** + * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + italic: boolean; + /** + * Specifies a value that represents the name of the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + name: string; + /** + * Specifies a value that represents the font size in points. + * + * @remarks + * [Api set: WordApi 1.1] + */ + size: number; + /** + * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + strikeThrough: boolean; + /** + * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + subscript: boolean; + /** + * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + superscript: boolean; + /** + * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. + * + * @remarks + * [Api set: WordApi 1.1] + */ + underline: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.FontUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Font): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.FontLoadOptions): Word.Font; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Font; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Font; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Font; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Font; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Font` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FontData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.FontData; + } + /** + * Represents an inline picture. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class InlinePicture extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the parent paragraph that contains the inline image. + * + * @remarks + * [Api set: WordApi 1.2] + */ + readonly paragraph: Word.Paragraph; + /** + * Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the table that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCell: Word.TableCell; + /** + * Gets the table cell that contains the inline image. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * Gets the table that contains the inline image. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * Specifies a string that represents the alternative text associated with the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextDescription: string; + /** + * Specifies a string that contains the title for the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextTitle: string; + /** + * Specifies a number that describes the height of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + height: number; + /** + * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.1] + */ + hyperlink: string; + + /** + * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lockAspectRatio: boolean; + /** + * Specifies a number that describes the width of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + width: number; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.InlinePictureUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.InlinePicture): void; + /** + * Deletes the inline picture from the document. + * + * @remarks + * [Api set: WordApi 1.2] + */ + delete(): void; + /** + * Gets the Base64-encoded string representation of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getBase64ImageSrc(): OfficeExtension.ClientResult; + /** + * Gets the next inline image. Throws an `ItemNotFound` error if this inline image is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNext(): Word.InlinePicture; + /** + * Gets the next inline image. If this inline image is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.InlinePicture; + /** + * Gets the picture, or the starting or ending point of the picture, as a range. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', or 'End'. + */ + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | "Whole" | "Start" | "End"): Word.Range; + /** + * Inserts a break at the specified location in the main document. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param breakType - Required. The break type to add. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + */ + insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; + /** + * Wraps the inline picture with a rich text content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + insertContentControl(): Word.ContentControl; + /** + * Inserts a document at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. + * + * @param base64File - Required. The Base64-encoded content of a .docx file. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; + /** + * Inserts HTML at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param html - Required. The HTML to be inserted. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + */ + insertHtml(html: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; + /** + * Inserts an inline picture at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. + * @param insertLocation - Required. The value must be 'Replace', 'Before', or 'After'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.before | Word.InsertLocation.after | "Replace" | "Before" | "After"): Word.InlinePicture; + /** + * Inserts OOXML at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param ooxml - Required. The OOXML to be inserted. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + */ + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param paragraphText - Required. The paragraph text to be inserted. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; + /** + * Inserts text at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param text - Required. Text to be inserted. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + */ + insertText(text: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; + /** + * Selects the inline picture. This causes Word to scroll to the selection. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects the inline picture. This causes Word to scroll to the selection. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param selectionModeString - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionModeString?: "Select" | "Start" | "End"): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.InlinePictureLoadOptions): Word.InlinePicture; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.InlinePicture; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.InlinePicture; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.InlinePicture; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.InlinePicture; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.InlinePicture` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.InlinePictureData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.InlinePictureData; + } + /** + * Contains a collection of {@link Word.InlinePicture} objects. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class InlinePictureCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.InlinePicture[]; + /** + * Gets the first inline image in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.InlinePicture; + /** + * Gets the first inline image in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.InlinePicture; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.InlinePictureCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.InlinePictureCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.InlinePictureCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.InlinePictureCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.InlinePictureCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.InlinePictureCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.InlinePictureCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.InlinePictureCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.InlinePictureCollectionData; + } + /** + * Contains a collection of {@link Word.Paragraph} objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class List extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets paragraphs in the list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly paragraphs: Word.ParagraphCollection; + /** + * Gets the list's id. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly id: number; + /** + * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly levelExistences: boolean[]; + /** + * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly levelTypes: Word.ListLevelType[]; + + /** + * Gets the paragraphs that occur at the specified level in the list. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param level - Required. The level in the list. + */ + getLevelParagraphs(level: number): Word.ParagraphCollection; + + /** + * Gets the bullet, number, or picture at the specified level as a string. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param level - Required. The level in the list. + */ + getLevelString(level: number): OfficeExtension.ClientResult; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param paragraphText - Required. The paragraph text to be inserted. + * @param insertLocation - Required. The value must be 'Start', 'End', 'Before', or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): Word.Paragraph; + + /** + * Sets the alignment of the bullet, number, or picture at the specified level in the list. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param level - Required. The level in the list. + * @param alignment - Required. The level alignment that must be 'Left', 'Centered', or 'Right'. + */ + setLevelAlignment(level: number, alignment: Word.Alignment): void; + /** + * Sets the alignment of the bullet, number, or picture at the specified level in the list. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param level - Required. The level in the list. + * @param alignmentString - Required. The level alignment that must be 'Left', 'Centered', or 'Right'. + */ + setLevelAlignment(level: number, alignmentString: "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"): void; + /** + * Sets the bullet format at the specified level in the list. If the bullet is 'Custom', the charCode is required. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param level - Required. The level in the list. + * @param listBullet - Required. The bullet. + * @param charCode - Optional. The bullet character's code value. Used only if the bullet is 'Custom'. + * @param fontName - Optional. The bullet's font name. Used only if the bullet is 'Custom'. + */ + setLevelBullet(level: number, listBullet: Word.ListBullet, charCode?: number, fontName?: string): void; + /** + * Sets the bullet format at the specified level in the list. If the bullet is 'Custom', the charCode is required. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param level - Required. The level in the list. + * @param listBulletString - Required. The bullet. + * @param charCode - Optional. The bullet character's code value. Used only if the bullet is 'Custom'. + * @param fontName - Optional. The bullet's font name. Used only if the bullet is 'Custom'. + */ + setLevelBullet(level: number, listBulletString: "Custom" | "Solid" | "Hollow" | "Square" | "Diamonds" | "Arrow" | "Checkmark", charCode?: number, fontName?: string): void; + /** + * Sets the two indents of the specified level in the list. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param level - Required. The level in the list. + * @param textIndent - Required. The text indent in points. It is the same as paragraph left indent. + * @param bulletNumberPictureIndent - Required. The relative indent, in points, of the bullet, number, or picture. It is the same as paragraph first line indent. + */ + setLevelIndents(level: number, textIndent: number, bulletNumberPictureIndent: number): void; + /** + * Sets the numbering format at the specified level in the list. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param level - Required. The level in the list. + * @param listNumbering - Required. The ordinal format. + * @param formatString - Optional. The numbering string format defined as an array of strings and/or integers. Each integer is a level of number type that is higher than or equal to this level. For example, an array of ["(", level - 1, ".", level, ")"] can define the format of "(2.c)", where 2 is the parent's item number and c is this level's item number. + */ + setLevelNumbering(level: number, listNumbering: Word.ListNumbering, formatString?: Array): void; + /** + * Sets the numbering format at the specified level in the list. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param level - Required. The level in the list. + * @param listNumberingString - Required. The ordinal format. + * @param formatString - Optional. The numbering string format defined as an array of strings and/or integers. Each integer is a level of number type that is higher than or equal to this level. For example, an array of ["(", level - 1, ".", level, ")"] can define the format of "(2.c)", where 2 is the parent's item number and c is this level's item number. + */ + setLevelNumbering(level: number, listNumberingString: "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter", formatString?: Array): void; + + /** + * Sets the starting number at the specified level in the list. Default value is 1. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param level - Required. The level in the list. + * @param startingNumber - Required. The number to start with. + */ + setLevelStartingNumber(level: number, startingNumber: number): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ListLoadOptions): Word.List; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.List; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.List; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.List; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.List; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.List` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ListData; + } + /** + * Contains a collection of {@link Word.List} objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class ListCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.List[]; + /** + * Gets a list by its identifier. Throws an `ItemNotFound` error if there isn't a list with the identifier in this collection. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param id - Required. A list identifier. + */ + getById(id: number): Word.List; + /** + * Gets a list by its identifier. If there isn't a list with the identifier in this collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param id - Required. A list identifier. + */ + getByIdOrNullObject(id: number): Word.List; + /** + * Gets the first list in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.List; + /** + * Gets the first list in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.List; + /** + * Gets a list object by its ID. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param id - The list's ID. + */ + getItem(id: number): Word.List; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ListCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ListCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ListCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ListCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ListCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ListCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.ListCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.ListCollectionData; + } + /** + * Represents the paragraph list item format. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class ListItem extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies the level of the item in the list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + level: number; + /** + * Gets the list item bullet, number, or picture as a string. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly listString: string; + /** + * Gets the list item order number in relation to its siblings. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly siblingIndex: number; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ListItemUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.ListItem): void; + /** + * Gets the list item parent, or the closest ancestor if the parent doesn't exist. Throws an `ItemNotFound` error if the list item has no ancestor. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param parentOnly - Optional. Specifies only the list item's parent will be returned. The default is false that specifies to get the lowest ancestor. + */ + getAncestor(parentOnly?: boolean): Word.Paragraph; + /** + * Gets the list item parent, or the closest ancestor if the parent doesn't exist. If the list item has no ancestor, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param parentOnly - Optional. Specifies only the list item's parent will be returned. The default is false that specifies to get the lowest ancestor. + */ + getAncestorOrNullObject(parentOnly?: boolean): Word.Paragraph; + /** + * Gets all descendant list items of the list item. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param directChildrenOnly - Optional. Specifies only the list item's direct children will be returned. The default is false that indicates to get all descendant items. + */ + getDescendants(directChildrenOnly?: boolean): Word.ParagraphCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ListItemLoadOptions): Word.ListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ListItem; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ListItem; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ListItem; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.ListItem` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListItemData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ListItemData; + } + + + + /** + * Represents a footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export class NoteItem extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly body: Word.Body; + /** + * Represents a footnote or endnote reference in the main document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly reference: Word.Range; + /** + * Represents the note item type: footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly type: Word.NoteItemType | "Footnote" | "Endnote"; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.NoteItemUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.NoteItem): void; + /** + * Deletes the note item. + * + * @remarks + * [Api set: WordApi 1.5] + */ + delete(): void; + /** + * Gets the next note item of the same type. Throws an `ItemNotFound` error if this note item is the last one. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getNext(): Word.NoteItem; + /** + * Gets the next note item of the same type. If this note item is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getNextOrNullObject(): Word.NoteItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.NoteItemLoadOptions): Word.NoteItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.NoteItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.NoteItem; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.NoteItem; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.NoteItem; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.NoteItem` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.NoteItemData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.NoteItemData; + } + /** + * Contains a collection of {@link Word.NoteItem} objects. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export class NoteItemCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.NoteItem[]; + /** + * Gets the first note item in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getFirst(): Word.NoteItem; + /** + * Gets the first note item in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getFirstOrNullObject(): Word.NoteItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.NoteItemCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.NoteItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.NoteItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.NoteItemCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.NoteItemCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.NoteItemCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.NoteItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.NoteItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.NoteItemCollectionData; + } + /** + * Represents a single paragraph in a selection, range, content control, or document body. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class Paragraph extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of content control objects in the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * Gets the collection of endnotes in the paragraph. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly endnotes: Word.NoteItemCollection; + /** + * Gets the collection of fields in the paragraph. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly fields: Word.FieldCollection; + /** + * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly font: Word.Font; + /** + * Gets the collection of footnotes in the paragraph. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly footnotes: Word.NoteItemCollection; + /** + * Gets the collection of InlinePicture objects in the paragraph. The collection doesn't include floating images. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly inlinePictures: Word.InlinePictureCollection; + /** + * Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph isn't in a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly list: Word.List; + /** + * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly listItem: Word.ListItem; + /** + * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly listItemOrNullObject: Word.ListItem; + /** + * Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly listOrNullObject: Word.List; + /** + * Gets the parent body of the paragraph. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentBody: Word.Body; + /** + * Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCell: Word.TableCell; + /** + * Gets the table cell that contains the paragraph. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * Gets the table that contains the paragraph. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * @remarks + * [Api set: WordApi 1.1] + */ + firstLineIndent: number; + /** + * Indicates the paragraph is the last one inside its parent body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly isLastParagraph: boolean; + /** + * Checks whether the paragraph is a list item. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly isListItem: boolean; + /** + * Specifies the left indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + leftIndent: number; + /** + * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineSpacing: number; + /** + * Specifies the amount of spacing, in grid lines, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitAfter: number; + /** + * Specifies the amount of spacing, in grid lines, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitBefore: number; + /** + * Specifies the outline level for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + outlineLevel: number; + /** + * Specifies the right indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + rightIndent: number; + /** + * Specifies the spacing, in points, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceAfter: number; + /** + * Specifies the spacing, in points, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceBefore: number; + /** + * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style: string; + /** + * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly tableNestingLevel: number; + /** + * Gets the text of the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly text: string; + /** + * Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. + * + * @remarks + * [Api set: WordApi 1.6] + */ + readonly uniqueLocalId: string; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ParagraphUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Paragraph): void; + /** + * Lets the paragraph join an existing list at the specified level. Fails if the paragraph cannot join the list or if the paragraph is already a list item. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param listId - Required. The ID of an existing list. + * @param level - Required. The level in the list. + */ + attachToList(listId: number, level: number): Word.List; + /** + * Clears the contents of the paragraph object. The user can perform the undo operation on the cleared content. + * + * @remarks + * [Api set: WordApi 1.1] + */ + clear(): void; + /** + * Deletes the paragraph and its content from the document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + delete(): void; + /** + * Moves this paragraph out of its list, if the paragraph is a list item. + * + * @remarks + * [Api set: WordApi 1.3] + */ + detachFromList(): void; + + /** + * Gets comments associated with the paragraph. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getComments(): Word.CommentCollection; + /** + * Gets the currently supported content controls in the paragraph. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. + * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. + * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. + * + * @param options - Optional. Options that define which content controls are returned. + */ + getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; + /** + * Gets an HTML representation of the paragraph object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Paragraph.getOoxml()` and convert the returned XML to HTML. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getHtml(): OfficeExtension.ClientResult; + /** + * Gets the next paragraph. Throws an `ItemNotFound` error if the paragraph is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNext(): Word.Paragraph; + /** + * Gets the next paragraph. If the paragraph is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.Paragraph; + /** + * Gets the Office Open XML (OOXML) representation of the paragraph object. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getOoxml(): OfficeExtension.ClientResult; + /** + * Gets the previous paragraph. Throws an `ItemNotFound` error if the paragraph is the first one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getPrevious(): Word.Paragraph; + /** + * Gets the previous paragraph. If the paragraph is the first one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getPreviousOrNullObject(): Word.Paragraph; + /** + * Gets the whole paragraph, or the starting or ending point of the paragraph, as a range. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. + */ + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersionString - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersionString?: "Original" | "Current"): OfficeExtension.ClientResult; + /** + * Gets the text ranges in the paragraph by using punctuation marks and/or other ending marks. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. + * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. + */ + getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; + /** + * Gets the collection of the TrackedChange objects in the paragraph. + * + * @remarks + * [Api set: WordApi 1.6] + */ + getTrackedChanges(): Word.TrackedChangeCollection; + + /** + * Inserts a break at the specified location in the main document. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param breakType - Required. The break type to add to the document. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + */ + insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; + /** + * Wraps the Paragraph object with a content control. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. + * + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. + */ + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; + /** + * Inserts a document into the paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. + * + * @param base64File - Required. The Base64-encoded content of a .docx file. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts HTML into the paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param html - Required. The HTML to be inserted in the paragraph. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts a picture into the paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.InlinePicture; + /** + * Inserts OOXML into the paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param ooxml - Required. The OOXML to be inserted in the paragraph. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param paragraphText - Required. The paragraph text to be inserted. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; + /** + * Inserts a table with the specified number of rows and columns. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rowCount - Required. The number of rows in the table. + * @param columnCount - Required. The number of columns in the table. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; + /** + * Inserts text into the paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param text - Required. Text to be inserted. + * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. + */ + insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; + /** + * Performs a search with the specified SearchOptions on the scope of the paragraph object. The search results are a collection of range objects. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param searchText - Required. The search text. + * @param searchOptions - Optional. Options for the search. + */ + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + /** + * Selects and navigates the Word UI to the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects and navigates the Word UI to the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionModeString - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionModeString?: "Select" | "Start" | "End"): void; + /** + * Splits the paragraph into child ranges by using delimiters. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param delimiters - Required. The delimiters as an array of strings. + * @param trimDelimiters - Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. + * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. + */ + split(delimiters: string[], trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; + /** + * Starts a new list with this paragraph. Fails if the paragraph is already a list item. + * + * @remarks + * [Api set: WordApi 1.3] + */ + startNewList(): Word.List; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ParagraphLoadOptions): Word.Paragraph; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Paragraph; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Paragraph; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Paragraph; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Paragraph; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Paragraph` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ParagraphData; + } + /** + * Contains a collection of {@link Word.Paragraph} objects. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class ParagraphCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.Paragraph[]; + /** + * Gets the first paragraph in this collection. Throws an `ItemNotFound` error if the collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.Paragraph; + /** + * Gets the first paragraph in this collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.Paragraph; + /** + * Gets the last paragraph in this collection. Throws an `ItemNotFound` error if the collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getLast(): Word.Paragraph; + /** + * Gets the last paragraph in this collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getLastOrNullObject(): Word.Paragraph; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ParagraphCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ParagraphCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ParagraphCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ParagraphCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ParagraphCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ParagraphCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.ParagraphCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.ParagraphCollectionData; + } + /** + * Represents a style of paragraph in a document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export class ParagraphFormat extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies the alignment for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * @remarks + * [Api set: WordApi 1.5] + */ + firstLineIndent: number; + /** + * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepTogether: boolean; + /** + * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepWithNext: boolean; + /** + * Specifies the left indent. + * + * @remarks + * [Api set: WordApi 1.5] + */ + leftIndent: number; + /** + * Specifies the line spacing (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineSpacing: number; + /** + * Specifies the amount of spacing (in gridlines) after the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitAfter: number; + /** + * Specifies the amount of spacing (in gridlines) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitBefore: number; + /** + * Specifies whether left and right indents are the same width. + * + * @remarks + * [Api set: WordApi 1.5] + */ + mirrorIndents: boolean; + /** + * Specifies the outline level for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; + /** + * Specifies the right indent (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + rightIndent: number; + /** + * Specifies the amount of spacing (in points) after the specified paragraph or text column. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceAfter: number; + /** + * Specifies the spacing (in points) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceBefore: number; + /** + * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + widowControl: boolean; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ParagraphFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.ParagraphFormat): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ParagraphFormatLoadOptions): Word.ParagraphFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ParagraphFormat; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ParagraphFormat; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ParagraphFormat; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ParagraphFormat; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.ParagraphFormat` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphFormatData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ParagraphFormatData; + } + /** + * Represents a contiguous area in a document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class Range extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of content control objects in the range. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * Gets the collection of endnotes in the range. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly endnotes: Word.NoteItemCollection; + /** + * Gets the collection of field objects in the range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly fields: Word.FieldCollection; + /** + * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly font: Word.Font; + /** + * Gets the collection of footnotes in the range. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly footnotes: Word.NoteItemCollection; + /** + * Gets the collection of inline picture objects in the range. + * + * @remarks + * [Api set: WordApi 1.2] + */ + readonly inlinePictures: Word.InlinePictureCollection; + /** + * Gets the collection of list objects in the range. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly lists: Word.ListCollection; + /** + * Gets the collection of paragraph objects in the range. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Important: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this range aren't returned. From requirement set 1.3, paragraphs in such tables are also returned. + */ + readonly paragraphs: Word.ParagraphCollection; + /** + * Gets the parent body of the range. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentBody: Word.Body; + /** + * Gets the currently supported content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the currently supported content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the table that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the table cell that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCell: Word.TableCell; + /** + * Gets the table cell that contains the range. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * Gets the table that contains the range. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * Gets the collection of table objects in the range. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly tables: Word.TableCollection; + /** + * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.3] + */ + hyperlink: string; + /** + * Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly isEmpty: boolean; + /** + * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style: string; + /** + * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * Gets the text of the range. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly text: string; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.RangeUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Range): void; + /** + * Clears the contents of the range object. The user can perform the undo operation on the cleared content. + * + * @remarks + * [Api set: WordApi 1.1] + */ + clear(): void; + /** + * Compares this range's location with another range's location. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param range - Required. The range to compare with this range. + */ + compareLocationWith(range: Word.Range): OfficeExtension.ClientResult; + /** + * Deletes the range and its content from the document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + delete(): void; + /** + * Returns a new range that extends from this range in either direction to cover another range. This range isn't changed. Throws an `ItemNotFound` error if the two ranges do not have a union. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param range - Required. Another range. + */ + expandTo(range: Word.Range): Word.Range; + /** + * Returns a new range that extends from this range in either direction to cover another range. This range isn't changed. If the two ranges don't have a union, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param range - Required. Another range. + */ + expandToOrNullObject(range: Word.Range): Word.Range; + /** + * Gets the names all bookmarks in or overlapping the range. A bookmark is hidden if its name starts with the underscore character. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param includeHidden - Optional. Indicates whether to include hidden bookmarks. Default is false which indicates that the hidden bookmarks are excluded. + * @param includeAdjacent - Optional. Indicates whether to include bookmarks that are adjacent to the range. Default is false which indicates that the adjacent bookmarks are excluded. + */ + getBookmarks(includeHidden?: boolean, includeAdjacent?: boolean): OfficeExtension.ClientResult; + /** + * Gets comments associated with the range. + * + * @remarks + * [Api set: WordApi 1.4] + * @returns + */ + getComments(): Word.CommentCollection; + /** + * Gets the currently supported content controls in the range. + * + * @remarks + * [Api set: WordApi 1.5] + * + * **Important**: If specific types are provided in the options parameter, only content controls of supported types are returned. + * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. + * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. + * + * @param options - Optional. Options that define which content controls are returned. + */ + getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; + /** + * Gets an HTML representation of the range object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Range.getOoxml()` and convert the returned XML to HTML. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getHtml(): OfficeExtension.ClientResult; + /** + * Gets hyperlink child ranges within the range. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getHyperlinkRanges(): Word.RangeCollection; + /** + * Gets the next text range by using punctuation marks and/or other ending marks. Throws an `ItemNotFound` error if this text range is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. + * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the returned range. Default is false which indicates that spacing characters at the start and end of the range are included. + */ + getNextTextRange(endingMarks: string[], trimSpacing?: boolean): Word.Range; + /** + * Gets the next text range by using punctuation marks and/or other ending marks. If this text range is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. + * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the returned range. Default is false which indicates that spacing characters at the start and end of the range are included. + */ + getNextTextRangeOrNullObject(endingMarks: string[], trimSpacing?: boolean): Word.Range; + /** + * Gets the OOXML representation of the range object. + * + * @remarks + * [Api set: WordApi 1.1] + */ + getOoxml(): OfficeExtension.ClientResult; + /** + * Clones the range, or gets the starting or ending point of the range as a new range. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. + */ + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; + /** + * Gets reviewed text based on ChangeTrackingVersion selection. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param changeTrackingVersionString - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. + */ + getReviewedText(changeTrackingVersionString?: "Original" | "Current"): OfficeExtension.ClientResult; + /** + * Gets the text child ranges in the range by using punctuation marks and/or other ending marks. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. + * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. + */ + getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; + /** + * Gets the collection of the TrackedChange objects in the range. + * + * @remarks + * [Api set: WordApi 1.6] + */ + getTrackedChanges(): Word.TrackedChangeCollection; + + /** + * Inserts a bookmark on the range. If a bookmark of the same name exists somewhere, it is deleted first. + * + * @remarks + * [Api set: WordApi 1.4] + * + * Note: The conditions of inserting a bookmark are similar to doing so in the Word UI. To learn more about managing bookmarks in the Word UI, see {@link https://support.microsoft.com/office/f68d781f-0150-4583-a90e-a4009d99c2a0 | Add or delete bookmarks in a Word document or Outlook message}. + * + * @param name - Required. The case-insensitive bookmark name. Only alphanumeric and underscore characters are supported. It must begin with a letter but if you want to tag the bookmark as hidden, then start the name with an underscore character. Names can't be longer than 40 characters. + */ + insertBookmark(name: string): void; + /** + * Inserts a break at the specified location in the main document. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param breakType - Required. The break type to add. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + */ + insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; + /** + * Insert a comment on the range. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param commentText - Required. The comment text to be inserted. + * @returns comment object + */ + insertComment(commentText: string): Word.Comment; + /** + * Wraps the Range object with a content control. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. + * + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. + */ + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; + /** + * Inserts an endnote. The endnote reference is placed after the range. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param insertText - Optional. Text to be inserted into the endnote body. The default is "". + */ + insertEndnote(insertText?: string): Word.NoteItem; + /** + * Inserts a field at the specified location. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Important: + * + * In Word on Windows and on Mac, the API supports inserting and managing all types listed in {@link Word.FieldType} except `Word.FieldType.others`. + * + * In Word on the web, the API supports inserting and managing the following field types. + * + * - `Word.FieldType.addin` + * + * - `Word.FieldType.date` + * + * - `Word.FieldType.hyperlink` + * + * - `Word.FieldType.toc` + * + * @param insertLocation - Required. The location relative to the range where the field will be inserted. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + * @param fieldType - Optional. Can be any FieldType constant. The default value is Empty. + * @param text - Optional. Additional properties or options if needed for specified field type. + * @param removeFormatting - Optional. `true` to remove the formatting that's applied to the field during updates, `false` otherwise. The default value is `false`. + */ + insertField(insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After", fieldType?: Word.FieldType, text?: string, removeFormatting?: boolean): Word.Field; + /** + * Inserts a field at the specified location. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Important: + * + * In Word on Windows and on Mac, the API supports inserting and managing all types listed in {@link Word.FieldType} except `Word.FieldType.others`. + * + * In Word on the web, the API supports inserting and managing the following field types. + * + * - `Word.FieldType.addin` + * + * - `Word.FieldType.date` + * + * - `Word.FieldType.hyperlink` + * + * - `Word.FieldType.toc` + * + * @param insertLocation - Required. The location relative to the range where the field will be inserted. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + * @param fieldTypeString - Optional. Can be any FieldType constant. The default value is Empty. + * @param text - Optional. Additional properties or options if needed for specified field type. + * @param removeFormatting - Optional. `true` to remove the formatting that's applied to the field during updates, `false` otherwise. The default value is `false`. + */ + insertField(insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After", fieldTypeString?: "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined", text?: string, removeFormatting?: boolean): Word.Field; + /** + * Inserts a document at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Note: Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. + * + * @param base64File - Required. The Base64-encoded content of a .docx file. + * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; + /** + * Inserts a footnote. The footnote reference is placed after the range. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param insertText - Optional. Text to be inserted into the footnote body. The default is "". + */ + insertFootnote(insertText?: string): Word.NoteItem; + /** + * Inserts HTML at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param html - Required. The HTML to be inserted. + * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertHtml(html: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; + /** + * Inserts a picture at the specified location. + * + * @remarks + * [Api set: WordApi 1.2] + * + * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. + * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.InlinePicture; + /** + * Inserts OOXML at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param ooxml - Required. The OOXML to be inserted. + * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertOoxml(ooxml: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param paragraphText - Required. The paragraph text to be inserted. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; + /** + * Inserts a table with the specified number of rows and columns. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rowCount - Required. The number of rows in the table. + * @param columnCount - Required. The number of columns in the table. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; + /** + * Inserts text at the specified location. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param text - Required. Text to be inserted. + * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. + */ + insertText(text: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; + /** + * Returns a new range as the intersection of this range with another range. This range isn't changed. Throws an `ItemNotFound` error if the two ranges aren't overlapped or adjacent. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param range - Required. Another range. + */ + intersectWith(range: Word.Range): Word.Range; + /** + * Returns a new range as the intersection of this range with another range. This range isn't changed. If the two ranges aren't overlapped or adjacent, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param range - Required. Another range. + */ + intersectWithOrNullObject(range: Word.Range): Word.Range; + + /** + * Performs a search with the specified SearchOptions on the scope of the range object. The search results are a collection of range objects. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param searchText - Required. The search text. + * @param searchOptions - Optional. Options for the search. + */ + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + /** + * Selects and navigates the Word UI to the range. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects and navigates the Word UI to the range. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param selectionModeString - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionModeString?: "Select" | "Start" | "End"): void; + /** + * Splits the range into child ranges by using delimiters. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param delimiters - Required. The delimiters as an array of strings. + * @param multiParagraphs - Optional. Indicates whether a returned child range can cover multiple paragraphs. Default is false which indicates that the paragraph boundaries are also used as delimiters. + * @param trimDelimiters - Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. + * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. + */ + split(delimiters: string[], multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.RangeLoadOptions): Word.Range; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Range; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Range; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Range; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Range; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Range` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.RangeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.RangeData; + } + /** + * Contains a collection of {@link Word.Range} objects. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class RangeCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.Range[]; + /** + * Gets the first range in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.Range; + /** + * Gets the first range in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.Range; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.RangeCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.RangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.RangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.RangeCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.RangeCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.RangeCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.RangeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.RangeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.RangeCollectionData; + } + /** + * Specifies the options to determine what to copy when inserting a file. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export interface InsertFileOptions { + /** + * Represents whether the change tracking mode status from the source document should be imported. + * + * @remarks + * [Api set: WordApi 1.5] + */ + importChangeTrackingMode?: boolean; + /** + * Represents whether the custom properties from the source document should be imported. Overwrites existing properties with the same name. + * + * @remarks + * [Api set: WordApi 1.6] + */ + importCustomProperties?: boolean; + /** + * Represents whether the custom XML parts from the source document should be imported. + * + * @remarks + * [Api set: WordApi 1.6] + */ + importCustomXmlParts?: boolean; + + /** + * Represents whether the page color and other background information from the source document should be imported. + * + * @remarks + * [Api set: WordApi 1.5] + */ + importPageColor?: boolean; + /** + * Represents whether the paragraph spacing from the source document should be imported. + * + * @remarks + * [Api set: WordApi 1.5] + */ + importParagraphSpacing?: boolean; + /** + * Represents whether the styles from the source document should be imported. + * + * @remarks + * [Api set: WordApi 1.5] + */ + importStyles?: boolean; + /** + * Represents whether the theme from the source document should be imported. + * + * @remarks + * [Api set: WordApi 1.5] + */ + importTheme?: boolean; + } + /** + * Specifies the options to be included in a search operation. + To learn more about how to use search options in the Word JavaScript APIs, read {@link https://learn.microsoft.com/office/dev/add-ins/word/search-option-guidance | Use search options to find text in your Word add-in}. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class SearchOptions extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignorePunct: boolean; + /** + * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignoreSpace: boolean; + /** + * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchCase: boolean; + /** + * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchPrefix: boolean; + /** + * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchSuffix: boolean; + /** + * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWholeWord: boolean; + /** + * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWildcards: boolean; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.SearchOptionsUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.SearchOptions): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.SearchOptionsLoadOptions): Word.SearchOptions; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.SearchOptions; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.SearchOptions; + /** + * Create a new instance of the `Word.SearchOptions` object. + */ + static newObject(context: OfficeExtension.ClientRequestContext): Word.SearchOptions; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.SearchOptions` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SearchOptionsData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.SearchOptionsData; + } + + + /** + * Represents a section in a Word document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class Section extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the body object of the section. This doesn't include the header/footer and other section metadata. + * + * @remarks + * [Api set: WordApi 1.1] + */ + readonly body: Word.Body; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.SectionUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Section): void; + /** + * Gets one of the section's footers. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param type - Required. The type of footer to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. + */ + getFooter(type: Word.HeaderFooterType): Word.Body; + /** + * Gets one of the section's footers. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param typeString - Required. The type of footer to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. + */ + getFooter(typeString: "Primary" | "FirstPage" | "EvenPages"): Word.Body; + /** + * Gets one of the section's headers. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param type - Required. The type of header to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. + */ + getHeader(type: Word.HeaderFooterType): Word.Body; + /** + * Gets one of the section's headers. + * + * @remarks + * [Api set: WordApi 1.1] + * + * @param typeString - Required. The type of header to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. + */ + getHeader(typeString: "Primary" | "FirstPage" | "EvenPages"): Word.Body; + /** + * Gets the next section. Throws an `ItemNotFound` error if this section is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNext(): Word.Section; + /** + * Gets the next section. If this section is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.Section; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.SectionLoadOptions): Word.Section; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Section; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Section; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Section; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Section; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Section` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SectionData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.SectionData; + } + /** + * Contains the collection of the document's {@link Word.Section} objects. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export class SectionCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.Section[]; + /** + * Gets the first section in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.Section; + /** + * Gets the first section in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.Section; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.SectionCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.SectionCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.SectionCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.SectionCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.SectionCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.SectionCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.SectionCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SectionCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.SectionCollectionData; + } + /** + * Represents a setting of the add-in. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export class Setting extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the key of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly key: string; + /** + * Specifies the value of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + value: any; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.SettingUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Setting): void; + /** + * Deletes the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + delete(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.SettingLoadOptions): Word.Setting; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Setting; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Setting; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Setting; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Setting; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Setting` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SettingData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.SettingData; + } + /** + * Contains the collection of {@link Word.Setting} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export class SettingCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.Setting[]; + /** + * Creates a new setting or sets an existing setting. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param key - Required. The setting's key, which is case-sensitive. + * @param value - Required. The setting's value. + */ + add(key: string, value: any): Word.Setting; + /** + * Deletes all settings in this add-in. + * + * @remarks + * [Api set: WordApi 1.4] + */ + deleteAll(): void; + /** + * Gets the count of settings. + * + * @remarks + * [Api set: WordApi 1.4] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a setting object by its key, which is case-sensitive. Throws an `ItemNotFound` error if the setting doesn't exist. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param key - The key that identifies the setting object. + */ + getItem(key: string): Word.Setting; + /** + * Gets a setting object by its key, which is case-sensitive. If the setting doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param key - Required. The key that identifies the setting object. + */ + getItemOrNullObject(key: string): Word.Setting; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.SettingCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.SettingCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.SettingCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.SettingCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.SettingCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.SettingCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.SettingCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SettingCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.SettingCollectionData; + } + /** + * Contains a collection of {@link Word.Style} objects. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export class StyleCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.Style[]; + /** + * Get the style object by its name. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param name - Required. The style name. + */ + getByName(name: string): Word.Style; + /** + * If the corresponding style doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param name - Required. The style name. + */ + getByNameOrNullObject(name: string): Word.Style; + /** + * Gets the number of the styles in the collection. + * + * @remarks + * [Api set: WordApi 1.5] + */ + getCount(): OfficeExtension.ClientResult; + /** + * Gets a style object by its index in the collection. + * + * @remarks + * [Api set: WordApi 1.5] + * + * @param index - A number that identifies the index location of a style object. + */ + getItem(index: number): Word.Style; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.StyleCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.StyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.StyleCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.StyleCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.StyleCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.StyleCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.StyleCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.StyleCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.StyleCollectionData; + } + /** + * Represents a style in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class Style extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + + /** + * Gets a font object that represents the character formatting of the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly font: Word.Font; + + /** + * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly paragraphFormat: Word.ParagraphFormat; + /** + * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. + * + * @remarks + * [Api set: WordApi 1.6] + */ + readonly shading: Word.Shading; + /** + * Gets a TableStyle object representing Style properties that can be applied to a table. + * + * @remarks + * [Api set: WordApi 1.6] + */ + readonly tableStyle: Word.TableStyle; + /** + * Specifies the name of an existing style to use as the base formatting of another style. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. + */ + baseStyle: string; + /** + * Gets whether the specified style is a built-in style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly builtIn: boolean; + /** + * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly inUse: boolean; + /** + * Gets whether a style is a linked style that can be used for both paragraph and character formatting. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly linked: boolean; + /** + * Gets the name of a style in the language of the user. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly nameLocal: string; + /** + * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. + */ + nextParagraphStyle: string; + /** + * Specifies the priority. + * + * @remarks + * [Api set: WordApi 1.5] + */ + priority: number; + /** + * Specifies whether the style corresponds to an available quick style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + quickStyle: boolean; + /** + * Gets the style type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly type: Word.StyleType | "Character" | "List" | "Paragraph" | "Table"; + /** + * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + unhideWhenUsed: boolean; + /** + * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. + * + * @remarks + * [Api set: WordApi 1.5] + */ + visibility: boolean; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.StyleUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Style): void; + /** + * Deletes the style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + delete(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.StyleLoadOptions): Word.Style; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Style; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Style; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Style; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Style; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Style` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.StyleData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.StyleData; + } + /** + * Represents the shading object. + * + * @remarks + * [Api set: WordApi 1.6] + */ + export class Shading extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi 1.6] + */ + backgroundPatternColor: string; + + + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ShadingUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Shading): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ShadingLoadOptions): Word.Shading; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Shading; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Shading; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Shading; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Shading; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Shading` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShadingData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ShadingData; + } + /** + * Represents a table in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class Table extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of endnotes in the table. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly endnotes: Word.NoteItemCollection; + /** + * Gets the collection of field objects in the table. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly fields: Word.FieldCollection; + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly font: Word.Font; + /** + * Gets the collection of footnotes in the table. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly footnotes: Word.NoteItemCollection; + /** + * Gets the parent body of the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentBody: Word.Body; + /** + * Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControl: Word.ContentControl; + /** + * Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * Gets the table that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the table cell that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCell: Word.TableCell; + /** + * Gets the table cell that contains this table. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableCellOrNullObject: Word.TableCell; + /** + * Gets the table that contains this table. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTableOrNullObject: Word.Table; + /** + * Gets all of the table rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly rows: Word.TableRowCollection; + /** + * Gets the child tables nested one level deeper. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly tables: Word.TableCollection; + /** + * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the number of header rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + headerRowCount: number; + /** + * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Indicates whether all of the table rows are uniform. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly isUniform: boolean; + /** + * Gets the nesting level of the table. Top-level tables have level 1. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly nestingLevel: number; + /** + * Gets the number of rows in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly rowCount: number; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor: string; + /** + * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + style: string; + /** + * Specifies whether the table has banded columns. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedColumns: boolean; + /** + * Specifies whether the table has banded rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedRows: boolean; + /** + * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * Specifies whether the table has a first column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleFirstColumn: boolean; + /** + * Specifies whether the table has a last column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleLastColumn: boolean; + /** + * Specifies whether the table has a total (last) row with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleTotalRow: boolean; + /** + * Specifies the text values in the table, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values: string[][]; + /** + * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * Specifies the width of the table in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width: number; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.TableUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.Table): void; + /** + * Adds columns to the start or end of the table, using the first or last existing column as a template. This is applicable to uniform tables. The string values, if specified, are set in the newly inserted rows. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param insertLocation - Required. It must be 'Start' or 'End', corresponding to the appropriate side of the table. + * @param columnCount - Required. Number of columns to add. + * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + addColumns(insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End", columnCount: number, values?: string[][]): void; + /** + * Adds rows to the start or end of the table, using the first or last existing row as a template. The string values, if specified, are set in the newly inserted rows. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param insertLocation - Required. It must be 'Start' or 'End'. + * @param rowCount - Required. Number of rows to add. + * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + addRows(insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End", rowCount: number, values?: string[][]): Word.TableRowCollection; + /** + * Autofits the table columns to the width of the window. + * + * @remarks + * [Api set: WordApi 1.3] + */ + autoFitWindow(): void; + /** + * Clears the contents of the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + clear(): void; + /** + * Deletes the entire table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + delete(): void; + /** + * Deletes specific columns. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param columnIndex - Required. The first column to delete. + * @param columnCount - Optional. The number of columns to delete. Default 1. + */ + deleteColumns(columnIndex: number, columnCount?: number): void; + /** + * Deletes specific rows. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rowIndex - Required. The first row to delete. + * @param rowCount - Optional. The number of rows to delete. Default 1. + */ + deleteRows(rowIndex: number, rowCount?: number): void; + /** + * Distributes the column widths evenly. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + */ + distributeColumns(): void; + /** + * Gets the border style for the specified border. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param borderLocation - Required. The border location. + */ + getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; + /** + * Gets the border style for the specified border. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param borderLocationString - Required. The border location. + */ + getBorder(borderLocationString: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"): Word.TableBorder; + /** + * Gets the table cell at a specified row and column. Throws an `ItemNotFound` error if the specified table cell doesn't exist. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rowIndex - Required. The index of the row. + * @param cellIndex - Required. The index of the cell in the row. + */ + getCell(rowIndex: number, cellIndex: number): Word.TableCell; + /** + * Gets the table cell at a specified row and column. If the specified table cell doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rowIndex - Required. The index of the row. + * @param cellIndex - Required. The index of the cell in the row. + */ + getCellOrNullObject(rowIndex: number, cellIndex: number): Word.TableCell; + /** + * Gets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; + /** + * Gets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocationString - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocationString: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; + /** + * Gets the next table. Throws an `ItemNotFound` error if this table is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNext(): Word.Table; + /** + * Gets the next table. If this table is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.Table; + /** + * Gets the paragraph after the table. Throws an `ItemNotFound` error if there isn't a paragraph after the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getParagraphAfter(): Word.Paragraph; + /** + * Gets the paragraph after the table. If there isn't a paragraph after the table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getParagraphAfterOrNullObject(): Word.Paragraph; + /** + * Gets the paragraph before the table. Throws an `ItemNotFound` error if there isn't a paragraph before the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getParagraphBefore(): Word.Paragraph; + /** + * Gets the paragraph before the table. If there isn't a paragraph before the table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getParagraphBeforeOrNullObject(): Word.Paragraph; + /** + * Gets the range that contains this table, or the range at the start or end of the table. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', or 'After'. + */ + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | "Whole" | "Start" | "End" | "After"): Word.Range; + /** + * Inserts a content control on the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + insertContentControl(): Word.ContentControl; + /** + * Inserts a paragraph at the specified location. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param paragraphText - Required. The paragraph text to be inserted. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + */ + insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; + /** + * Inserts a table with the specified number of rows and columns. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param rowCount - Required. The number of rows in the table. + * @param columnCount - Required. The number of columns in the table. + * @param insertLocation - Required. The value must be 'Before' or 'After'. + * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; + /** + * Merges the cells bounded inclusively by a first and last cell. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param topRow - Required. The row of the first cell + * @param firstCell - Required. The index of the first cell in its row + * @param bottomRow - Required. The row of the last cell + * @param lastCell - Required. The index of the last cell in its row + */ + mergeCells(topRow: number, firstCell: number, bottomRow: number, lastCell: number): Word.TableCell; + /** + * Performs a search with the specified SearchOptions on the scope of the table object. The search results are a collection of range objects. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param searchText - Required. The search text. + * @param searchOptions - Optional. Options for the search. + */ + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + /** + * Selects the table, or the position at the start or end of the table, and navigates the Word UI to it. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects the table, or the position at the start or end of the table, and navigates the Word UI to it. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param selectionModeString - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionModeString?: "Select" | "Start" | "End"): void; + /** + * Sets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + * @param cellPadding - Required. The cell padding. + */ + setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; + /** + * Sets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocationString - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + * @param cellPadding - Required. The cell padding. + */ + setCellPadding(cellPaddingLocationString: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableLoadOptions): Word.Table; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.Table; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.Table; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.Table; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.Table; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.Table` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.TableData; + } + /** + * Represents the TableStyle object. + * + * @remarks + * [Api set: WordApi 1.6] + */ + export class TableStyle extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + + + /** + * Specifies the amount of space to add between the contents and the bottom borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + bottomCellMargin: number; + /** + * Specifies the spacing (in points) between the cells in a table style. + * + * @remarks + * [Api set: WordApi 1.6] + */ + cellSpacing: number; + /** + * Specifies the amount of space to add between the contents and the left borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + leftCellMargin: number; + /** + * Specifies the amount of space to add between the contents and the right borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + rightCellMargin: number; + /** + * Specifies the amount of space to add between the contents and the top borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + topCellMargin: number; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.TableStyleUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.TableStyle): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableStyleLoadOptions): Word.TableStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableStyle; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.TableStyle; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableStyle; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.TableStyle; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.TableStyle` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableStyleData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.TableStyleData; + } + /** + * Contains the collection of the document's Table objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class TableCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.Table[]; + /** + * Gets the first table in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.Table; + /** + * Gets the first table in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.Table; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.TableCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.TableCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.TableCollectionData; + } + /** + * Represents a row in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class TableRow extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets cells. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly cells: Word.TableCellCollection; + /** + * Gets the collection of endnotes in the table row. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly endnotes: Word.NoteItemCollection; + /** + * Gets the collection of field objects in the table row. + * + * @remarks + * [Api set: WordApi 1.4] + */ + readonly fields: Word.FieldCollection; + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly font: Word.Font; + /** + * Gets the collection of footnotes in the table row. + * + * @remarks + * [Api set: WordApi 1.5] + */ + readonly footnotes: Word.NoteItemCollection; + /** + * Gets parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the number of cells in the row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly cellCount: number; + /** + * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly isHeader: boolean; + /** + * Specifies the preferred height of the row in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + preferredHeight: number; + /** + * Gets the index of the row in its parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly rowIndex: number; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor: string; + /** + * Specifies the text values in the row, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values: string[][]; + /** + * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.TableRowUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.TableRow): void; + /** + * Clears the contents of the row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + clear(): void; + /** + * Deletes the entire row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + delete(): void; + /** + * Gets the border style of the cells in the row. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param borderLocation - Required. The border location. + */ + getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; + /** + * Gets the border style of the cells in the row. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param borderLocationString - Required. The border location. + */ + getBorder(borderLocationString: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"): Word.TableBorder; + /** + * Gets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; + /** + * Gets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocationString - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocationString: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; + /** + * Gets the next row. Throws an `ItemNotFound` error if this row is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNext(): Word.TableRow; + /** + * Gets the next row. If this row is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.TableRow; + + /** + * Inserts rows using this row as a template. If values are specified, inserts the values into the new rows. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param insertLocation - Required. Where the new rows should be inserted, relative to the current row. It must be 'Before' or 'After'. + * @param rowCount - Required. Number of rows to add + * @param values - Optional. Strings to insert in the new rows, specified as a 2D array. The number of cells in each row must not exceed the number of cells in the existing row. + */ + insertRows(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", rowCount: number, values?: string[][]): Word.TableRowCollection; + /** + * Merges the row into one cell. + * + * @remarks + * [Api set: WordApi 1.4] + */ + merge(): Word.TableCell; + /** + * Performs a search with the specified SearchOptions on the scope of the row. The search results are a collection of range objects. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param searchText - Required. The search text. + * @param searchOptions - Optional. Options for the search. + */ + search(searchText: string, searchOptions?: Word.SearchOptions | { + ignorePunct?: boolean; + ignoreSpace?: boolean; + matchCase?: boolean; + matchPrefix?: boolean; + matchSuffix?: boolean; + matchWholeWord?: boolean; + matchWildcards?: boolean; + }): Word.RangeCollection; + /** + * Selects the row and navigates the Word UI to it. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionMode?: Word.SelectionMode): void; + /** + * Selects the row and navigates the Word UI to it. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param selectionModeString - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. + */ + select(selectionModeString?: "Select" | "Start" | "End"): void; + /** + * Sets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + * @param cellPadding - Required. The cell padding. + */ + setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; + /** + * Sets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocationString - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + * @param cellPadding - Required. The cell padding. + */ + setCellPadding(cellPaddingLocationString: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableRowLoadOptions): Word.TableRow; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableRow; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.TableRow; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableRow; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.TableRow; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.TableRow` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableRowData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.TableRowData; + } + /** + * Contains the collection of the document's TableRow objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class TableRowCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.TableRow[]; + /** + * Gets the first row in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.TableRow; + /** + * Gets the first row in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.TableRow; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableRowCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableRowCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableRowCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableRowCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableRowCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.TableRowCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.TableRowCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableRowCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.TableRowCollectionData; + } + /** + * Represents a table cell in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class TableCell extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the body object of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly body: Word.Body; + /** + * Gets the parent row of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentRow: Word.TableRow; + /** + * Gets the parent table of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly parentTable: Word.Table; + /** + * Gets the index of the cell in its row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly cellIndex: number; + /** + * Specifies the width of the cell's column in points. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + */ + columnWidth: number; + /** + * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Gets the index of the cell's row in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly rowIndex: number; + /** + * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor: string; + /** + * Specifies the text of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + value: string; + /** + * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * Gets the width of the cell in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + readonly width: number; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.TableCellUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.TableCell): void; + /** + * Deletes the column containing this cell. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + */ + deleteColumn(): void; + /** + * Deletes the row containing this cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + deleteRow(): void; + /** + * Gets the border style for the specified border. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param borderLocation - Required. The border location. + */ + getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; + /** + * Gets the border style for the specified border. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param borderLocationString - Required. The border location. + */ + getBorder(borderLocationString: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"): Word.TableBorder; + /** + * Gets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; + /** + * Gets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocationString - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + */ + getCellPadding(cellPaddingLocationString: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; + /** + * Gets the next cell. Throws an `ItemNotFound` error if this cell is the last one. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNext(): Word.TableCell; + /** + * Gets the next cell. If this cell is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getNextOrNullObject(): Word.TableCell; + /** + * Adds columns to the left or right of the cell, using the cell's column as a template. This is applicable to uniform tables. The string values, if specified, are set in the newly inserted rows. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param insertLocation - Required. It must be 'Before' or 'After'. + * @param columnCount - Required. Number of columns to add. + * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertColumns(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", columnCount: number, values?: string[][]): void; + /** + * Inserts rows above or below the cell, using the cell's row as a template. The string values, if specified, are set in the newly inserted rows. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param insertLocation - Required. It must be 'Before' or 'After'. + * @param rowCount - Required. Number of rows to add. + * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. + */ + insertRows(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", rowCount: number, values?: string[][]): Word.TableRowCollection; + /** + * Sets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + * @param cellPadding - Required. The cell padding. + */ + setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; + /** + * Sets cell padding in points. + * + * @remarks + * [Api set: WordApi 1.3] + * + * @param cellPaddingLocationString - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. + * @param cellPadding - Required. The cell padding. + */ + setCellPadding(cellPaddingLocationString: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void; + /** + * Splits the cell into the specified number of rows and columns. + * + * @remarks + * [Api set: WordApi 1.4] + * + * @param rowCount - Required. The number of rows to split into. Must be a divisor of the number of underlying rows. + * @param columnCount - Required. The number of columns to split into. + */ + split(rowCount: number, columnCount: number): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableCellLoadOptions): Word.TableCell; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableCell; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.TableCell; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableCell; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.TableCell; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.TableCell` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCellData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.TableCellData; + } + /** + * Contains the collection of the document's TableCell objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class TableCellCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.TableCell[]; + /** + * Gets the first table cell in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirst(): Word.TableCell; + /** + * Gets the first table cell in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + getFirstOrNullObject(): Word.TableCell; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableCellCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableCellCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableCellCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableCellCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableCellCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.TableCellCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.TableCellCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCellCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.TableCellCollectionData; + } + /** + * Specifies the border style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export class TableBorder extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies the table border color. + * + * @remarks + * [Api set: WordApi 1.3] + */ + color: string; + /** + * Specifies the type of the table border. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; + /** + * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width: number; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.TableBorderUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.TableBorder): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TableBorderLoadOptions): Word.TableBorder; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TableBorder; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.TableBorder; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TableBorder; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.TableBorder; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.TableBorder` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableBorderData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.TableBorderData; + } + /** + * Represents a tracked change in a Word document. + * + * @remarks + * [Api set: WordApi 1.6] + */ + export class TrackedChange extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the author of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + readonly author: string; + /** + * Gets the date of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + readonly date: Date; + /** + * Gets the text of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + readonly text: string; + /** + * Gets the type of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + readonly type: Word.TrackedChangeType | "None" | "Added" | "Deleted" | "Formatted"; + /** + * Accepts the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + accept(): void; + /** + * Gets the next tracked change. Throws an `ItemNotFound` error if this tracked change is the last one. + * + * @remarks + * [Api set: WordApi 1.6] + */ + getNext(): Word.TrackedChange; + /** + * Gets the next tracked change. If this tracked change is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.6] + */ + getNextOrNullObject(): Word.TrackedChange; + /** + * Gets the range of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | "Whole" | "Start" | "End"): Word.Range; + /** + * Rejects the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + reject(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TrackedChangeLoadOptions): Word.TrackedChange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TrackedChange; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.TrackedChange; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TrackedChange; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.TrackedChange; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.TrackedChange` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TrackedChangeData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.TrackedChangeData; + } + /** + * Contains a collection of {@link Word.TrackedChange} objects. + * + * @remarks + * [Api set: WordApi 1.6] + */ + export class TrackedChangeCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.TrackedChange[]; + /** + * Accepts all the tracked changes in the collection. + * + * @remarks + * [Api set: WordApi 1.6] + */ + acceptAll(): void; + /** + * Gets the first TrackedChange in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.6] + */ + getFirst(): Word.TrackedChange; + /** + * Gets the first TrackedChange in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.6] + */ + getFirstOrNullObject(): Word.TrackedChange; + /** + * Rejects all the tracked changes in the collection. + * + * @remarks + * [Api set: WordApi 1.6] + */ + rejectAll(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.TrackedChangeCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TrackedChangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.TrackedChangeCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TrackedChangeCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.TrackedChangeCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You'll need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.TrackedChangeCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that's passed to it.) + * Whereas the original `Word.TrackedChangeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TrackedChangeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.TrackedChangeCollectionData; + } + /** + * ChangeTracking mode. + * + * @remarks + * [Api set: WordApi 1.4] + */ + enum ChangeTrackingMode { + /** + * ChangeTracking is turned off. + * @remarks + * [Api set: WordApi 1.4] + */ + off = "Off", + /** + * ChangeTracking is turned on for everyone. + * @remarks + * [Api set: WordApi 1.4] + */ + trackAll = "TrackAll", + /** + * Tracking is turned on for my changes only. + * @remarks + * [Api set: WordApi 1.4] + */ + trackMineOnly = "TrackMineOnly", + } + /** + * Specify the current version or the original version of the text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + enum ChangeTrackingVersion { + /** + * @remarks + * [Api set: WordApi 1.4] + */ + original = "Original", + /** + * @remarks + * [Api set: WordApi 1.4] + */ + current = "Current", + } + /** + * Specify the track state when ChangeTracking is on. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum ChangeTrackingState { + /** + * @remarks + * [Api set: WordApi 1.5] + */ + unknown = "Unknown", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + normal = "Normal", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + added = "Added", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + deleted = "Deleted", + } + /** + * TrackedChange type. + * + * @remarks + * [Api set: WordApi 1.6] + */ + enum TrackedChangeType { + /** + * No revision. + * @remarks + * [Api set: WordApi 1.6] + */ + none = "None", + /** + * Add change. + * @remarks + * [Api set: WordApi 1.6] + */ + added = "Added", + /** + * Delete change. + * @remarks + * [Api set: WordApi 1.6] + */ + deleted = "Deleted", + /** + * Format change. + * @remarks + * [Api set: WordApi 1.6] + */ + formatted = "Formatted", + } + /** + * Note item type + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum NoteItemType { + /** + * @remarks + * [Api set: WordApi 1.5] + */ + footnote = "Footnote", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + endnote = "Endnote", + } + /** + * Provides information about the type of a raised event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum EventType { + /** + * ContentControlDeleted represents the event that the content control has been deleted. + * @remarks + * [Api set: WordApi 1.5] + */ + contentControlDeleted = "ContentControlDeleted", + /** + * ContentControlSelectionChanged represents the event that the selection in the content control has been changed. + * @remarks + * [Api set: WordApi 1.5] + */ + contentControlSelectionChanged = "ContentControlSelectionChanged", + /** + * ContentControlDataChanged represents the event that the data in the content control have been changed. + * @remarks + * [Api set: WordApi 1.5] + */ + contentControlDataChanged = "ContentControlDataChanged", + /** + * ContentControlAdded represents the event a content control has been added to the document. + * @remarks + * [Api set: WordApi 1.5] + */ + contentControlAdded = "ContentControlAdded", + /** + * Represents that a content control has been entered. + * @remarks + * [Api set: WordApi 1.5] + */ + contentControlEntered = "ContentControlEntered", + /** + * Represents that a content control has been exited. + * @remarks + * [Api set: WordApi 1.5] + */ + contentControlExited = "ContentControlExited", + /** + * Represents that one or more new paragraphs were added. + * @remarks + * [Api set: WordApi 1.6] + */ + paragraphAdded = "ParagraphAdded", + /** + * Represents that one or more paragraphs were changed. + * @remarks + * [Api set: WordApi 1.6] + */ + paragraphChanged = "ParagraphChanged", + /** + * Represents that one or more paragraphs were deleted. + * @remarks + * [Api set: WordApi 1.6] + */ + paragraphDeleted = "ParagraphDeleted", + } + /** + * An enum that specifies an event's source. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum EventSource { + /** + * @remarks + * [Api set: WordApi 1.5] + */ + local = "Local", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + remote = "Remote", + } + /** + * Provides information about the content control that raised contentControlAdded event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export interface ContentControlAddedEventArgs { + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.5] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about the content control that raised contentControlDataChanged event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export interface ContentControlDataChangedEventArgs { + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.5] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about the content control that raised contentControlDeleted event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export interface ContentControlDeletedEventArgs { + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.5] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about the content control that raised contentControlEntered event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export interface ContentControlEnteredEventArgs { + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.5] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about the content control that raised contentControlExited event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export interface ContentControlExitedEventArgs { + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.5] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about the content control that raised contentControlSelectionChanged event. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export interface ContentControlSelectionChangedEventArgs { + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.5] + */ + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; + /** + * Gets the content control IDs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + ids: number[]; + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.5] + */ + source: Word.EventSource | "Local" | "Remote"; + } + /** + * Provides information about the paragraphs that raised the paragraphAdded event. + * + * @remarks + * [Api set: WordApi 1.6] + */ + export interface ParagraphAddedEventArgs { + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.6] + */ + source: Word.EventSource | "Local" | "Remote"; + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.6] + */ + type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; + /** + * Gets the unique IDs of the involved paragraphs. IDs are in standard 8-4-4-4-12 GUID format without curly braces and differ across sessions and coauthors. + * + * @remarks + * [Api set: WordApi 1.6] + */ + uniqueLocalIds: string[]; + } + /** + * Provides information about the paragraphs that raised the paragraphChanged event. + * + * @remarks + * [Api set: WordApi 1.6] + */ + export interface ParagraphChangedEventArgs { + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.6] + */ + source: Word.EventSource | "Local" | "Remote"; + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.6] + */ + type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; + /** + * Gets the unique IDs of the involved paragraphs. IDs are in standard 8-4-4-4-12 GUID format without curly braces and differ across sessions and coauthors. + * + * @remarks + * [Api set: WordApi 1.6] + */ + uniqueLocalIds: string[]; + } + /** + * Provides information about the paragraphs that raised the paragraphDeleted event. + * + * @remarks + * [Api set: WordApi 1.6] + */ + export interface ParagraphDeletedEventArgs { + /** + * The source of the event. It can be local or remote (through coauthoring). + * + * @remarks + * [Api set: WordApi 1.6] + */ + source: Word.EventSource | "Local" | "Remote"; + /** + * The event type. See Word.EventType for details. + * + * @remarks + * [Api set: WordApi 1.6] + */ + type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; + /** + * Gets the unique IDs of the involved paragraphs. IDs are in standard 8-4-4-4-12 GUID format without curly braces and differ across sessions and coauthors. + * + * @remarks + * [Api set: WordApi 1.6] + */ + uniqueLocalIds: string[]; + } + /** + * Specifies supported content control types and subtypes. + * + * @remarks + * [Api set: WordApi 1.1] + */ + enum ContentControlType { + /** + * @remarks + * [Api set: WordApi 1.1] + */ + unknown = "Unknown", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + richTextInline = "RichTextInline", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + richTextParagraphs = "RichTextParagraphs", + /** + * Contains a whole cell. + * @remarks + * [Api set: WordApi 1.1] + */ + richTextTableCell = "RichTextTableCell", + /** + * Contains a whole row. + * @remarks + * [Api set: WordApi 1.1] + */ + richTextTableRow = "RichTextTableRow", + /** + * Contains a whole table. + * @remarks + * [Api set: WordApi 1.1] + */ + richTextTable = "RichTextTable", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + plainTextInline = "PlainTextInline", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + plainTextParagraph = "PlainTextParagraph", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + picture = "Picture", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + buildingBlockGallery = "BuildingBlockGallery", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + checkBox = "CheckBox", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + comboBox = "ComboBox", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + dropDownList = "DropDownList", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + datePicker = "DatePicker", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + repeatingSection = "RepeatingSection", + /** + * Identifies a rich text content control. + * @remarks + * [Api set: WordApi 1.1] + */ + richText = "RichText", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + plainText = "PlainText", + } + /** + * ContentControl appearance. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Content control appearance options are BoundingBox, Tags, or Hidden. + */ + enum ContentControlAppearance { + /** + * Represents a content control shown as a shaded rectangle or bounding box (with optional title). + * @remarks + * [Api set: WordApi 1.1] + */ + boundingBox = "BoundingBox", + /** + * Represents a content control shown as start and end markers. + * @remarks + * [Api set: WordApi 1.1] + */ + tags = "Tags", + /** + * Represents a content control that isn't shown. + * @remarks + * [Api set: WordApi 1.1] + */ + hidden = "Hidden", + } + /** + * The supported styles for underline format. + * + * @remarks + * [Api set: WordApi 1.1] + */ + enum UnderlineType { + /** + * @remarks + * [Api set: WordApi 1.1] + */ + mixed = "Mixed", + /** + * No underline. + * @remarks + * [Api set: WordApi 1.1] + */ + none = "None", + /** + * Warning: hidden has been deprecated. + * @deprecated Hidden is no longer supported. + * @remarks + * [Api set: WordApi 1.1] + */ + hidden = "Hidden", + /** + * Warning: dotLine has been deprecated. + * @deprecated DotLine is no longer supported. + * @remarks + * [Api set: WordApi 1.1] + */ + dotLine = "DotLine", + /** + * A single underline. This is the default value. + * @remarks + * [Api set: WordApi 1.1] + */ + single = "Single", + /** + * Only underline individual words. + * @remarks + * [Api set: WordApi 1.1] + */ + word = "Word", + /** + * A double underline. + * @remarks + * [Api set: WordApi 1.1] + */ + double = "Double", + /** + * A single thick underline. + * @remarks + * [Api set: WordApi 1.1] + */ + thick = "Thick", + /** + * A dotted underline. + * @remarks + * [Api set: WordApi 1.1] + */ + dotted = "Dotted", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + dottedHeavy = "DottedHeavy", + /** + * A single dash underline. + * @remarks + * [Api set: WordApi 1.1] + */ + dashLine = "DashLine", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + dashLineHeavy = "DashLineHeavy", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + dashLineLong = "DashLineLong", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + dashLineLongHeavy = "DashLineLongHeavy", + /** + * An alternating dot-dash underline. + * @remarks + * [Api set: WordApi 1.1] + */ + dotDashLine = "DotDashLine", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + dotDashLineHeavy = "DotDashLineHeavy", + /** + * An alternating dot-dot-dash underline. + * @remarks + * [Api set: WordApi 1.1] + */ + twoDotDashLine = "TwoDotDashLine", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + twoDotDashLineHeavy = "TwoDotDashLineHeavy", + /** + * A single wavy underline. + * @remarks + * [Api set: WordApi 1.1] + */ + wave = "Wave", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + waveHeavy = "WaveHeavy", + /** + * @remarks + * [Api set: WordApi 1.1] + */ + waveDouble = "WaveDouble", + } + /** + * Specifies the form of a break. + * + * @remarks + * [Api set: WordApi 1.1] + */ + enum BreakType { + /** + * Page break at the insertion point. + * @remarks + * [Api set: WordApi 1.1] + */ + page = "Page", + /** + * Warning: next has been deprecated. Use sectionNext instead. + * @deprecated Use sectionNext instead. + * @remarks + * [Api set: WordApi 1.1] + */ + next = "Next", + /** + * Section break on next page. + * @remarks + * [Api set: WordApi 1.1] + */ + sectionNext = "SectionNext", + /** + * New section without a corresponding page break. + * @remarks + * [Api set: WordApi 1.1] + */ + sectionContinuous = "SectionContinuous", + /** + * Section break with the next section beginning on the next even-numbered page. If the section break falls on an even-numbered page, Word leaves the next odd-numbered page blank. + * @remarks + * [Api set: WordApi 1.1] + */ + sectionEven = "SectionEven", + /** + * Section break with the next section beginning on the next odd-numbered page. If the section break falls on an odd-numbered page, Word leaves the next even-numbered page blank. + * @remarks + * [Api set: WordApi 1.1] + */ + sectionOdd = "SectionOdd", + /** + * Line break. + * @remarks + * [Api set: WordApi 1.1] + */ + line = "Line", + } + /** + * The insertion location types. + * + * @remarks + * [Api set: WordApi 1.1] + * + * To be used with an API call, such as `obj.insertSomething(newStuff, location);`. + * If the location is "Before" or "After", the new content will be outside of the modified object. + * If the location is "Start" or "End", the new content will be included as part of the modified object. + */ + enum InsertLocation { + /** + * Add content before the contents of the calling object. + * @remarks + * [Api set: WordApi 1.1] + */ + before = "Before", + /** + * Add content after the contents of the calling object. + * @remarks + * [Api set: WordApi 1.1] + */ + after = "After", + /** + * Prepend content to the contents of the calling object. + * @remarks + * [Api set: WordApi 1.1] + */ + start = "Start", + /** + * Append content to the contents of the calling object. + * @remarks + * [Api set: WordApi 1.1] + */ + end = "End", + /** + * Replace the contents of the current object. + * @remarks + * [Api set: WordApi 1.1] + */ + replace = "Replace", + } + /** + * @remarks + * [Api set: WordApi 1.1] + */ + enum Alignment { + /** + * @remarks + * [Api set: WordApi 1.1] + */ + mixed = "Mixed", + /** + * Unknown alignment. + * @remarks + * [Api set: WordApi 1.1] + */ + unknown = "Unknown", + /** + * Alignment to the left. + * @remarks + * [Api set: WordApi 1.1] + */ + left = "Left", + /** + * Alignment to the center. + * @remarks + * [Api set: WordApi 1.1] + */ + centered = "Centered", + /** + * Alignment to the right. + * @remarks + * [Api set: WordApi 1.1] + */ + right = "Right", + /** + * Fully justified alignment. + * @remarks + * [Api set: WordApi 1.1] + */ + justified = "Justified", + } + /** + * @remarks + * [Api set: WordApi 1.1] + */ + enum HeaderFooterType { + /** + * Returns the header or footer on all pages of a section, but excludes the first page or even pages if they are different. + * @remarks + * [Api set: WordApi 1.1] + */ + primary = "Primary", + /** + * Returns the header or footer on the first page of a section. + * @remarks + * [Api set: WordApi 1.1] + */ + firstPage = "FirstPage", + /** + * Returns all headers or footers on even-numbered pages of a section. + * @remarks + * [Api set: WordApi 1.1] + */ + evenPages = "EvenPages", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum BodyType { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + unknown = "Unknown", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + mainDoc = "MainDoc", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + section = "Section", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + header = "Header", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + footer = "Footer", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + tableCell = "TableCell", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + footnote = "Footnote", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + endnote = "Endnote", + /** + * @remarks + * [Api set: WordApi 1.5] + */ + noteItem = "NoteItem", + } + /** + * This enum sets where the cursor (insertion point) in the document is after a selection. + * + * @remarks + * [Api set: WordApi 1.1] + */ + enum SelectionMode { + /** + * The entire range is selected. + * @remarks + * [Api set: WordApi 1.1] + */ + select = "Select", + /** + * The cursor is at the beginning of the selection (just before the start of the selected range). + * @remarks + * [Api set: WordApi 1.1] + */ + start = "Start", + /** + * The cursor is at the end of the selection (just after the end of the selected range). + * @remarks + * [Api set: WordApi 1.1] + */ + end = "End", + } + + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum RangeLocation { + /** + * The object's whole range. If the object is a paragraph content control or table content control, the EOP or Table characters after the content control are also included. + * @remarks + * [Api set: WordApi 1.3] + */ + whole = "Whole", + /** + * The starting point of the object. For content control, it is the point after the opening tag. + * @remarks + * [Api set: WordApi 1.3] + */ + start = "Start", + /** + * The ending point of the object. For paragraph, it is the point before the EOP. For content control, it is the point before the closing tag. + * @remarks + * [Api set: WordApi 1.3] + */ + end = "End", + /** + * For content control only. It is the point before the opening tag. + * @remarks + * [Api set: WordApi 1.3] + */ + before = "Before", + /** + * The point after the object. If the object is a paragraph content control or table content control, it is the point after the EOP or Table characters. + * @remarks + * [Api set: WordApi 1.3] + */ + after = "After", + /** + * The range between 'Start' and 'End'. + * @remarks + * [Api set: WordApi 1.3] + */ + content = "Content", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum LocationRelation { + /** + * Indicates that this instance and the range are in different sub-documents. + * @remarks + * [Api set: WordApi 1.3] + */ + unrelated = "Unrelated", + /** + * Indicates that this instance and the range represent the same range. + * @remarks + * [Api set: WordApi 1.3] + */ + equal = "Equal", + /** + * Indicates that this instance contains the range and that it shares the same start character. The range doesn't share the same end character as this instance. + * @remarks + * [Api set: WordApi 1.3] + */ + containsStart = "ContainsStart", + /** + * Indicates that this instance contains the range and that it shares the same end character. The range doesn't share the same start character as this instance. + * @remarks + * [Api set: WordApi 1.3] + */ + containsEnd = "ContainsEnd", + /** + * Indicates that this instance contains the range, with the exception of the start and end character of this instance. + * @remarks + * [Api set: WordApi 1.3] + */ + contains = "Contains", + /** + * Indicates that this instance is inside the range and that it shares the same start character. The range doesn't share the same end character as this instance. + * @remarks + * [Api set: WordApi 1.3] + */ + insideStart = "InsideStart", + /** + * Indicates that this instance is inside the range and that it shares the same end character. The range doesn't share the same start character as this instance. + * @remarks + * [Api set: WordApi 1.3] + */ + insideEnd = "InsideEnd", + /** + * Indicates that this instance is inside the range. The range doesn't share the same start and end characters as this instance. + * @remarks + * [Api set: WordApi 1.3] + */ + inside = "Inside", + /** + * Indicates that this instance occurs before, and is adjacent to, the range. + * @remarks + * [Api set: WordApi 1.3] + */ + adjacentBefore = "AdjacentBefore", + /** + * Indicates that this instance starts before the range and overlaps the range's first character. + * @remarks + * [Api set: WordApi 1.3] + */ + overlapsBefore = "OverlapsBefore", + /** + * Indicates that this instance occurs before the range. + * @remarks + * [Api set: WordApi 1.3] + */ + before = "Before", + /** + * Indicates that this instance occurs after, and is adjacent to, the range. + * @remarks + * [Api set: WordApi 1.3] + */ + adjacentAfter = "AdjacentAfter", + /** + * Indicates that this instance starts inside the range and overlaps the range’s last character. + * @remarks + * [Api set: WordApi 1.3] + */ + overlapsAfter = "OverlapsAfter", + /** + * Indicates that this instance occurs after the range. + * @remarks + * [Api set: WordApi 1.3] + */ + after = "After", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum BorderLocation { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + top = "Top", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + left = "Left", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + bottom = "Bottom", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + right = "Right", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + insideHorizontal = "InsideHorizontal", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + insideVertical = "InsideVertical", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + inside = "Inside", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + outside = "Outside", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + all = "All", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum CellPaddingLocation { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + top = "Top", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + left = "Left", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + bottom = "Bottom", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + right = "Right", + } + + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum BorderType { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + mixed = "Mixed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + none = "None", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + single = "Single", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + double = "Double", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + dotted = "Dotted", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + dashed = "Dashed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + dotDashed = "DotDashed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + dot2Dashed = "Dot2Dashed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + triple = "Triple", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thinThickSmall = "ThinThickSmall", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thickThinSmall = "ThickThinSmall", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thinThickThinSmall = "ThinThickThinSmall", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thinThickMed = "ThinThickMed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thickThinMed = "ThickThinMed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thinThickThinMed = "ThinThickThinMed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thinThickLarge = "ThinThickLarge", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thickThinLarge = "ThickThinLarge", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + thinThickThinLarge = "ThinThickThinLarge", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + wave = "Wave", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + doubleWave = "DoubleWave", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + dashedSmall = "DashedSmall", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + dashDotStroked = "DashDotStroked", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + threeDEmboss = "ThreeDEmboss", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + threeDEngrave = "ThreeDEngrave", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum VerticalAlignment { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + mixed = "Mixed", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + top = "Top", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + center = "Center", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + bottom = "Bottom", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum ListLevelType { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + bullet = "Bullet", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + number = "Number", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + picture = "Picture", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum ListBullet { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + custom = "Custom", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + solid = "Solid", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + hollow = "Hollow", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + square = "Square", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + diamonds = "Diamonds", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + arrow = "Arrow", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + checkmark = "Checkmark", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum ListNumbering { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + none = "None", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + arabic = "Arabic", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + upperRoman = "UpperRoman", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + lowerRoman = "LowerRoman", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + upperLetter = "UpperLetter", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + lowerLetter = "LowerLetter", + } + /** + * Represents the built-in style in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + * + * Important: This enum was renamed from `Style` to `BuiltInStyleName` in WordApi 1.5. + */ + enum BuiltInStyleName { + /** + * Mixed styles or other style not in this list. + * @remarks + * [Api set: WordApi 1.3] + */ + other = "Other", + /** + * Reset character and paragraph style to default. + * @remarks + * [Api set: WordApi 1.3] + */ + normal = "Normal", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading1 = "Heading1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading2 = "Heading2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading3 = "Heading3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading4 = "Heading4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading5 = "Heading5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading6 = "Heading6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading7 = "Heading7", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading8 = "Heading8", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + heading9 = "Heading9", + /** + * Table-of-content level 1. + * @remarks + * [Api set: WordApi 1.3] + */ + toc1 = "Toc1", + /** + * Table-of-content level 2. + * @remarks + * [Api set: WordApi 1.3] + */ + toc2 = "Toc2", + /** + * Table-of-content level 3. + * @remarks + * [Api set: WordApi 1.3] + */ + toc3 = "Toc3", + /** + * Table-of-content level 4. + * @remarks + * [Api set: WordApi 1.3] + */ + toc4 = "Toc4", + /** + * Table-of-content level 5. + * @remarks + * [Api set: WordApi 1.3] + */ + toc5 = "Toc5", + /** + * Table-of-content level 6. + * @remarks + * [Api set: WordApi 1.3] + */ + toc6 = "Toc6", + /** + * Table-of-content level 7. + * @remarks + * [Api set: WordApi 1.3] + */ + toc7 = "Toc7", + /** + * Table-of-content level 8. + * @remarks + * [Api set: WordApi 1.3] + */ + toc8 = "Toc8", + /** + * Table-of-content level 9. + * @remarks + * [Api set: WordApi 1.3] + */ + toc9 = "Toc9", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + footnoteText = "FootnoteText", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + header = "Header", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + footer = "Footer", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + caption = "Caption", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + footnoteReference = "FootnoteReference", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + endnoteReference = "EndnoteReference", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + endnoteText = "EndnoteText", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + title = "Title", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + subtitle = "Subtitle", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + hyperlink = "Hyperlink", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + strong = "Strong", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + emphasis = "Emphasis", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + noSpacing = "NoSpacing", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listParagraph = "ListParagraph", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + quote = "Quote", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + intenseQuote = "IntenseQuote", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + subtleEmphasis = "SubtleEmphasis", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + intenseEmphasis = "IntenseEmphasis", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + subtleReference = "SubtleReference", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + intenseReference = "IntenseReference", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + bookTitle = "BookTitle", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + bibliography = "Bibliography", + /** + * Table-of-content heading. + * @remarks + * [Api set: WordApi 1.3] + */ + tocHeading = "TocHeading", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + tableGrid = "TableGrid", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + plainTable1 = "PlainTable1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + plainTable2 = "PlainTable2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + plainTable3 = "PlainTable3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + plainTable4 = "PlainTable4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + plainTable5 = "PlainTable5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + tableGridLight = "TableGridLight", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light = "GridTable1Light", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light_Accent1 = "GridTable1Light_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light_Accent2 = "GridTable1Light_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light_Accent3 = "GridTable1Light_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light_Accent4 = "GridTable1Light_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light_Accent5 = "GridTable1Light_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable1Light_Accent6 = "GridTable1Light_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2 = "GridTable2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2_Accent1 = "GridTable2_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2_Accent2 = "GridTable2_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2_Accent3 = "GridTable2_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2_Accent4 = "GridTable2_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2_Accent5 = "GridTable2_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable2_Accent6 = "GridTable2_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3 = "GridTable3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3_Accent1 = "GridTable3_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3_Accent2 = "GridTable3_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3_Accent3 = "GridTable3_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3_Accent4 = "GridTable3_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3_Accent5 = "GridTable3_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable3_Accent6 = "GridTable3_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4 = "GridTable4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4_Accent1 = "GridTable4_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4_Accent2 = "GridTable4_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4_Accent3 = "GridTable4_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4_Accent4 = "GridTable4_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4_Accent5 = "GridTable4_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable4_Accent6 = "GridTable4_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark = "GridTable5Dark", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark_Accent1 = "GridTable5Dark_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark_Accent2 = "GridTable5Dark_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark_Accent3 = "GridTable5Dark_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark_Accent4 = "GridTable5Dark_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark_Accent5 = "GridTable5Dark_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable5Dark_Accent6 = "GridTable5Dark_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful = "GridTable6Colorful", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful_Accent1 = "GridTable6Colorful_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful_Accent2 = "GridTable6Colorful_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful_Accent3 = "GridTable6Colorful_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful_Accent4 = "GridTable6Colorful_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful_Accent5 = "GridTable6Colorful_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable6Colorful_Accent6 = "GridTable6Colorful_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful = "GridTable7Colorful", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful_Accent1 = "GridTable7Colorful_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful_Accent2 = "GridTable7Colorful_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful_Accent3 = "GridTable7Colorful_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful_Accent4 = "GridTable7Colorful_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful_Accent5 = "GridTable7Colorful_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + gridTable7Colorful_Accent6 = "GridTable7Colorful_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light = "ListTable1Light", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light_Accent1 = "ListTable1Light_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light_Accent2 = "ListTable1Light_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light_Accent3 = "ListTable1Light_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light_Accent4 = "ListTable1Light_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light_Accent5 = "ListTable1Light_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable1Light_Accent6 = "ListTable1Light_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2 = "ListTable2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2_Accent1 = "ListTable2_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2_Accent2 = "ListTable2_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2_Accent3 = "ListTable2_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2_Accent4 = "ListTable2_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2_Accent5 = "ListTable2_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable2_Accent6 = "ListTable2_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3 = "ListTable3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3_Accent1 = "ListTable3_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3_Accent2 = "ListTable3_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3_Accent3 = "ListTable3_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3_Accent4 = "ListTable3_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3_Accent5 = "ListTable3_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable3_Accent6 = "ListTable3_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4 = "ListTable4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4_Accent1 = "ListTable4_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4_Accent2 = "ListTable4_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4_Accent3 = "ListTable4_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4_Accent4 = "ListTable4_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4_Accent5 = "ListTable4_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable4_Accent6 = "ListTable4_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark = "ListTable5Dark", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark_Accent1 = "ListTable5Dark_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark_Accent2 = "ListTable5Dark_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark_Accent3 = "ListTable5Dark_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark_Accent4 = "ListTable5Dark_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark_Accent5 = "ListTable5Dark_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable5Dark_Accent6 = "ListTable5Dark_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful = "ListTable6Colorful", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful_Accent1 = "ListTable6Colorful_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful_Accent2 = "ListTable6Colorful_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful_Accent3 = "ListTable6Colorful_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful_Accent4 = "ListTable6Colorful_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful_Accent5 = "ListTable6Colorful_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable6Colorful_Accent6 = "ListTable6Colorful_Accent6", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful = "ListTable7Colorful", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful_Accent1 = "ListTable7Colorful_Accent1", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful_Accent2 = "ListTable7Colorful_Accent2", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful_Accent3 = "ListTable7Colorful_Accent3", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful_Accent4 = "ListTable7Colorful_Accent4", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful_Accent5 = "ListTable7Colorful_Accent5", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + listTable7Colorful_Accent6 = "ListTable7Colorful_Accent6", + } + /** + * @remarks + * [Api set: WordApi 1.3] + */ + enum DocumentPropertyType { + /** + * @remarks + * [Api set: WordApi 1.3] + */ + string = "String", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + number = "Number", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + date = "Date", + /** + * @remarks + * [Api set: WordApi 1.3] + */ + boolean = "Boolean", + } + /** + * Represents the type of style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum StyleType { + /** + * Represents that the style is a character style. + * @remarks + * [Api set: WordApi 1.5] + */ + character = "Character", + /** + * Represents that the style is a list style. Currently supported on desktop. + * @remarks + * [Api set: WordApi 1.5] + */ + list = "List", + /** + * Represents that the style is a paragraph style. + * @remarks + * [Api set: WordApi 1.5] + */ + paragraph = "Paragraph", + /** + * Represents that the style is a table style. + * @remarks + * [Api set: WordApi 1.5] + */ + table = "Table", + } + /** + * Represents the outline levels. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum OutlineLevel { + /** + * Represents outline level 1. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel1 = "OutlineLevel1", + /** + * Represents outline level 2. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel2 = "OutlineLevel2", + /** + * Represents outline level 3. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel3 = "OutlineLevel3", + /** + * Represents outline level 4. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel4 = "OutlineLevel4", + /** + * Represents outline level 5. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel5 = "OutlineLevel5", + /** + * Represents outline level 6. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel6 = "OutlineLevel6", + /** + * Represents outline level 7. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel7 = "OutlineLevel7", + /** + * Represents outline level 8. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel8 = "OutlineLevel8", + /** + * Represents outline level 9. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel9 = "OutlineLevel9", + /** + * Represents outline level body text, not an outline level. + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevelBodyText = "OutlineLevelBodyText", + } + /** + * Specifies the close behavior for `Document.close`. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum CloseBehavior { + /** + * Saves the changes before closing the document. + * @remarks + * [Api set: WordApi 1.5] + */ + save = "Save", + /** + * Discard the possible changes when closing the document. + * @remarks + * [Api set: WordApi 1.5] + */ + skipSave = "SkipSave", + } + /** + * Specifies the save behavior for `Document.save`. + * + * @remarks + * [Api set: WordApi 1.1] + */ + enum SaveBehavior { + /** + * Saves the document without prompting the user. If it's a new document, + it will be saved with the default name or specified name in the default location. + * @remarks + * [Api set: WordApi 1.1] + */ + save = "Save", + /** + * Displays the "Save As" dialog to the user if the document hasn't been saved. + Won't take effect if the document was previously saved. + * @remarks + * [Api set: WordApi 1.1] + */ + prompt = "Prompt", + } + /** + * Represents the type of Field. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum FieldType { + /** + * Represents that the field type is Add-in. + * @remarks + * [Api set: WordApi 1.5] + */ + addin = "Addin", + /** + * Represents that the field type is AddressBlock. + * @remarks + * [Api set: WordApi 1.5] + */ + addressBlock = "AddressBlock", + /** + * Represents that the field type is Advance. + * @remarks + * [Api set: WordApi 1.5] + */ + advance = "Advance", + /** + * Represents that the field type is Ask. + * @remarks + * [Api set: WordApi 1.5] + */ + ask = "Ask", + /** + * Represents that the field type is Author. + * @remarks + * [Api set: WordApi 1.5] + */ + author = "Author", + /** + * Represents that the field type is AutoText. + * @remarks + * [Api set: WordApi 1.5] + */ + autoText = "AutoText", + /** + * Represents that the field type is AutoTextList. + * @remarks + * [Api set: WordApi 1.5] + */ + autoTextList = "AutoTextList", + /** + * Represents that the field type is Barcode. + * @remarks + * [Api set: WordApi 1.5] + */ + barCode = "BarCode", + /** + * Represents that the field type is Bibliography. + * @remarks + * [Api set: WordApi 1.5] + */ + bibliography = "Bibliography", + /** + * Represents that the field type is BidiOutline. + * @remarks + * [Api set: WordApi 1.5] + */ + bidiOutline = "BidiOutline", + /** + * Represents that the field type is Citation. + * @remarks + * [Api set: WordApi 1.5] + */ + citation = "Citation", + /** + * Represents that the field type is Comments. + * @remarks + * [Api set: WordApi 1.5] + */ + comments = "Comments", + /** + * Represents that the field type is Compare. + * @remarks + * [Api set: WordApi 1.5] + */ + compare = "Compare", + /** + * Represents that the field type is CreateDate. + * @remarks + * [Api set: WordApi 1.5] + */ + createDate = "CreateDate", + /** + * Represents that the field type is Data. + * @remarks + * [Api set: WordApi 1.5] + */ + data = "Data", + /** + * Represents that the field type is Database. + * @remarks + * [Api set: WordApi 1.5] + */ + database = "Database", + /** + * Represents that the field type is Date. + * @remarks + * [Api set: WordApi 1.5] + */ + date = "Date", + /** + * Represents that the field type is DisplayBarcode. + * @remarks + * [Api set: WordApi 1.5] + */ + displayBarcode = "DisplayBarcode", + /** + * Represents that the field type is DocumentProperty + * @remarks + * [Api set: WordApi 1.5] + */ + docProperty = "DocProperty", + /** + * Represents that the field type is DocumentVariable. + * @remarks + * [Api set: WordApi 1.5] + */ + docVariable = "DocVariable", + /** + * Represents that the field type is EditTime. + * @remarks + * [Api set: WordApi 1.5] + */ + editTime = "EditTime", + /** + * Represents that the field type is Embedded. + * @remarks + * [Api set: WordApi 1.5] + */ + embedded = "Embedded", + /** + * Represents that the field type is Equation. + * @remarks + * [Api set: WordApi 1.5] + */ + eq = "EQ", + /** + * Represents that the field type is Expression. + * @remarks + * [Api set: WordApi 1.5] + */ + expression = "Expression", + /** + * Represents that the field type is FileName. + * @remarks + * [Api set: WordApi 1.5] + */ + fileName = "FileName", + /** + * Represents that the field type is FileSize. + * @remarks + * [Api set: WordApi 1.5] + */ + fileSize = "FileSize", + /** + * Represents that the field type is FillIn. + * @remarks + * [Api set: WordApi 1.5] + */ + fillIn = "FillIn", + /** + * Represents that the field type is FormCheckbox. + * @remarks + * [Api set: WordApi 1.5] + */ + formCheckbox = "FormCheckbox", + /** + * Represents that the field type is FormDropdown. + * @remarks + * [Api set: WordApi 1.5] + */ + formDropdown = "FormDropdown", + /** + * Represents that the field type is FormText. + * @remarks + * [Api set: WordApi 1.5] + */ + formText = "FormText", + /** + * Represents that the field type is GotoButton. + * @remarks + * [Api set: WordApi 1.5] + */ + gotoButton = "GotoButton", + /** + * Represents that the field type is GreetingLine. + * @remarks + * [Api set: WordApi 1.5] + */ + greetingLine = "GreetingLine", + /** + * Represents that the field type is Hyperlink. + * @remarks + * [Api set: WordApi 1.5] + */ + hyperlink = "Hyperlink", + /** + * Represents that the field type is If. + * @remarks + * [Api set: WordApi 1.5] + */ + if = "If", + /** + * Represents that the field type is Import. + * @remarks + * [Api set: WordApi 1.5] + */ + import = "Import", + /** + * Represents that the field type is Include. + * @remarks + * [Api set: WordApi 1.5] + */ + include = "Include", + /** + * Represents that the field type is IncludePicture. + * @remarks + * [Api set: WordApi 1.5] + */ + includePicture = "IncludePicture", + /** + * Represents that the field type is IncludeText. + * @remarks + * [Api set: WordApi 1.5] + */ + includeText = "IncludeText", + /** + * Represents that the field type is Index. + * @remarks + * [Api set: WordApi 1.5] + */ + index = "Index", + /** + * Represents that the field type is Information. + * @remarks + * [Api set: WordApi 1.5] + */ + info = "Info", + /** + * Represents that the field type is Keywords. + * @remarks + * [Api set: WordApi 1.5] + */ + keywords = "Keywords", + /** + * Represents that the field type is LastSavedBy. + * @remarks + * [Api set: WordApi 1.5] + */ + lastSavedBy = "LastSavedBy", + /** + * Represents that the field type is Link. + * @remarks + * [Api set: WordApi 1.5] + */ + link = "Link", + /** + * Represents that the field type is ListNumber. + * @remarks + * [Api set: WordApi 1.5] + */ + listNum = "ListNum", + /** + * Represents that the field type is MacroButton. + * @remarks + * [Api set: WordApi 1.5] + */ + macroButton = "MacroButton", + /** + * Represents that the field type is MergeBarcode. + * @remarks + * [Api set: WordApi 1.5] + */ + mergeBarcode = "MergeBarcode", + /** + * Represents that the field type is MergeField. + * @remarks + * [Api set: WordApi 1.5] + */ + mergeField = "MergeField", + /** + * Represents that the field type is MergeRecord. + * @remarks + * [Api set: WordApi 1.5] + */ + mergeRec = "MergeRec", + /** + * Represents that the field type is MergeSequence. + * @remarks + * [Api set: WordApi 1.5] + */ + mergeSeq = "MergeSeq", + /** + * Represents that the field type is Next. + * @remarks + * [Api set: WordApi 1.5] + */ + next = "Next", + /** + * Represents that the field type is NextIf. + * @remarks + * [Api set: WordApi 1.5] + */ + nextIf = "NextIf", + /** + * Represents that the field type is NoteReference. + * @remarks + * [Api set: WordApi 1.5] + */ + noteRef = "NoteRef", + /** + * Represents that the field type is NumberOfCharacters. + * @remarks + * [Api set: WordApi 1.5] + */ + numChars = "NumChars", + /** + * Represents that the field type is NumberOfPages. + * @remarks + * [Api set: WordApi 1.5] + */ + numPages = "NumPages", + /** + * Represents that the field type is NumberOfWords. + * @remarks + * [Api set: WordApi 1.5] + */ + numWords = "NumWords", + /** + * Represents that the field type is ActiveXControl. + * @remarks + * [Api set: WordApi 1.5] + */ + ocx = "OCX", + /** + * Represents that the field type is Page. + * @remarks + * [Api set: WordApi 1.5] + */ + page = "Page", + /** + * Represents that the field type is PageReference. + * @remarks + * [Api set: WordApi 1.5] + */ + pageRef = "PageRef", + /** + * Represents that the field type is Print. + * @remarks + * [Api set: WordApi 1.5] + */ + print = "Print", + /** + * Represents that the field type is PrintDate. + * @remarks + * [Api set: WordApi 1.5] + */ + printDate = "PrintDate", + /** + * Represents that the field type is Private. + * @remarks + * [Api set: WordApi 1.5] + */ + private = "Private", + /** + * Represents that the field type is Quote. + * @remarks + * [Api set: WordApi 1.5] + */ + quote = "Quote", + /** + * Represents that the field type is ReferencedDocument. + * @remarks + * [Api set: WordApi 1.5] + */ + rd = "RD", + /** + * Represents that the field type is Reference. + * @remarks + * [Api set: WordApi 1.5] + */ + ref = "Ref", + /** + * Represents that the field type is RevisionNumber. + * @remarks + * [Api set: WordApi 1.5] + */ + revNum = "RevNum", + /** + * Represents that the field type is SaveDate. + * @remarks + * [Api set: WordApi 1.5] + */ + saveDate = "SaveDate", + /** + * Represents that the field type is Section. + * @remarks + * [Api set: WordApi 1.5] + */ + section = "Section", + /** + * Represents that the field type is SectionPages. + * @remarks + * [Api set: WordApi 1.5] + */ + sectionPages = "SectionPages", + /** + * Represents that the field type is Sequence. + * @remarks + * [Api set: WordApi 1.5] + */ + seq = "Seq", + /** + * Represents that the field type is Set. + * @remarks + * [Api set: WordApi 1.5] + */ + set = "Set", + /** + * Represents that the field type is Shape. + * @remarks + * [Api set: WordApi 1.5] + */ + shape = "Shape", + /** + * Represents that the field type is SkipIf. + * @remarks + * [Api set: WordApi 1.5] + */ + skipIf = "SkipIf", + /** + * Represents that the field type is StyleReference. + * @remarks + * [Api set: WordApi 1.5] + */ + styleRef = "StyleRef", + /** + * Represents that the field type is Subject. + * @remarks + * [Api set: WordApi 1.5] + */ + subject = "Subject", + /** + * Represents that the field type is Subscriber. + * @remarks + * [Api set: WordApi 1.5] + */ + subscriber = "Subscriber", + /** + * Represents that the field type is Symbol. + * @remarks + * [Api set: WordApi 1.5] + */ + symbol = "Symbol", + /** + * Represents that the field type is TableOfAuthoritiesEntry. + * @remarks + * [Api set: WordApi 1.5] + */ + ta = "TA", + /** + * Represents that the field type is TableOfContentsEntry. + * @remarks + * [Api set: WordApi 1.5] + */ + tc = "TC", + /** + * Represents that the field type is Template. + * @remarks + * [Api set: WordApi 1.5] + */ + template = "Template", + /** + * Represents that the field type is Time. + * @remarks + * [Api set: WordApi 1.5] + */ + time = "Time", + /** + * Represents that the field type is Title. + * @remarks + * [Api set: WordApi 1.5] + */ + title = "Title", + /** + * Represents that the field type is TableOfAuthorities. + * @remarks + * [Api set: WordApi 1.5] + */ + toa = "TOA", + /** + * Represents that the field type is TableOfContents. + * @remarks + * [Api set: WordApi 1.5] + */ + toc = "TOC", + /** + * Represents that the field type is UserAddress. + * @remarks + * [Api set: WordApi 1.5] + */ + userAddress = "UserAddress", + /** + * Represents that the field type is UserInitials. + * @remarks + * [Api set: WordApi 1.5] + */ + userInitials = "UserInitials", + /** + * Represents that the field type is UserName. + * @remarks + * [Api set: WordApi 1.5] + */ + userName = "UserName", + /** + * Represents that the field type is IndexEntry. + * @remarks + * [Api set: WordApi 1.5] + */ + xe = "XE", + /** + * Represents that the field type is Empty. + * @remarks + * [Api set: WordApi 1.5] + */ + empty = "Empty", + /** + * Represents the field types not supported by the Office JavaScript API. + * @remarks + * [Api set: WordApi 1.5] + */ + others = "Others", + /** + * Represents that the field type is Undefined. + * @remarks + * [Api set: WordApi 1.5] + */ + undefined = "Undefined", + } + /** + * Represents the kind of field. Indicates how the field works in relation to updating. + * + * @remarks + * [Api set: WordApi 1.5] + */ + enum FieldKind { + /** + * Represents that the field is invalid. For example, a pair of field characters with nothing inside. + * @remarks + * [Api set: WordApi 1.5] + */ + none = "None", + /** + * Represents that the field is automatically updated each time it's displayed or each time the page is reformatted, but which can also be manually updated. + * @remarks + * [Api set: WordApi 1.5] + */ + hot = "Hot", + /** + * Represents that the field is automatically updated when the source changes or the field can be manually updated. + * @remarks + * [Api set: WordApi 1.5] + */ + warm = "Warm", + /** + * Represents that the field doesn't have a result. + * @remarks + * [Api set: WordApi 1.5] + */ + cold = "Cold", + } + + + + + + enum ErrorCodes { + accessDenied = "AccessDenied", + generalException = "GeneralException", + invalidArgument = "InvalidArgument", + itemNotFound = "ItemNotFound", + notAllowed = "NotAllowed", + notImplemented = "NotImplemented", + searchDialogIsOpen = "SearchDialogIsOpen", + searchStringInvalidOrTooLong = "SearchStringInvalidOrTooLong", + } + export namespace Interfaces { + /** + * Provides ways to load properties of only a subset of members of a collection. + */ + export interface CollectionLoadOptions { + /** + * Specify the number of items in the queried collection to be included in the result. + */ + $top?: number; + /** + * Specify the number of items in the collection that are to be skipped and not included in the result. If top is specified, the selection of result will start after skipping the specified number of items. + */ + $skip?: number; + } + /** An interface for updating data on the `AnnotationCollection` object, for use in `annotationCollection.set({ ... })`. */ + export interface AnnotationCollectionUpdateData { + items?: Word.Interfaces.AnnotationData[]; + } + /** An interface for updating data on the `Body` object, for use in `body.set({ ... })`. */ + export interface BodyUpdateData { + /** + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + } + /** An interface for updating data on the `Border` object, for use in `border.set({ ... })`. */ + export interface BorderUpdateData { + + + + + } + /** An interface for updating data on the `BorderCollection` object, for use in `borderCollection.set({ ... })`. */ + export interface BorderCollectionUpdateData { + + + + + + + items?: Word.Interfaces.BorderData[]; + } + /** An interface for updating data on the `CheckboxContentControl` object, for use in `checkboxContentControl.set({ ... })`. */ + export interface CheckboxContentControlUpdateData { + + } + /** An interface for updating data on the `Comment` object, for use in `comment.set({ ... })`. */ + export interface CommentUpdateData { + /** + * Specifies the comment's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeUpdateData; + /** + * Specifies the comment's content as plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: string; + /** + * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. + * + * @remarks + * [Api set: WordApi 1.4] + */ + resolved?: boolean; + } + /** An interface for updating data on the `CommentCollection` object, for use in `commentCollection.set({ ... })`. */ + export interface CommentCollectionUpdateData { + items?: Word.Interfaces.CommentData[]; + } + /** An interface for updating data on the `CommentContentRange` object, for use in `commentContentRange.set({ ... })`. */ + export interface CommentContentRangeUpdateData { + /** + * Specifies a value that indicates whether the comment text is bold. + * + * @remarks + * [Api set: WordApi 1.4] + */ + bold?: boolean; + /** + * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + hyperlink?: string; + /** + * Specifies a value that indicates whether the comment text is italicized. + * + * @remarks + * [Api set: WordApi 1.4] + */ + italic?: boolean; + /** + * Specifies a value that indicates whether the comment text has a strikethrough. + * + * @remarks + * [Api set: WordApi 1.4] + */ + strikeThrough?: boolean; + /** + * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. + * + * @remarks + * [Api set: WordApi 1.4] + */ + underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; + } + /** An interface for updating data on the `CommentReply` object, for use in `commentReply.set({ ... })`. */ + export interface CommentReplyUpdateData { + /** + * Specifies the commentReply's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeUpdateData; + /** + * Gets the parent comment of this reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentComment?: Word.Interfaces.CommentUpdateData; + /** + * Specifies the comment reply's content. The string is plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: string; + } + /** An interface for updating data on the `CommentReplyCollection` object, for use in `commentReplyCollection.set({ ... })`. */ + export interface CommentReplyCollectionUpdateData { + items?: Word.Interfaces.CommentReplyData[]; + } + /** An interface for updating data on the `ContentControl` object, for use in `contentControl.set({ ... })`. */ + export interface ContentControlUpdateData { + + /** + * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + appearance?: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; + /** + * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * Specifies a value that indicates whether the user can edit the contents of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. + * + * @remarks + * [Api set: WordApi 1.1] + */ + placeholderText?: string; + /** + * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * @remarks + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * Specifies a tag to identify a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + tag?: string; + /** + * Specifies the title for a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + title?: string; + } + /** An interface for updating data on the `ContentControlCollection` object, for use in `contentControlCollection.set({ ... })`. */ + export interface ContentControlCollectionUpdateData { + items?: Word.Interfaces.ContentControlData[]; + } + /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ + export interface ContentControlListItemUpdateData { + + + + } + /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ + export interface ContentControlListItemCollectionUpdateData { + items?: Word.Interfaces.ContentControlListItemData[]; + } + /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ + export interface CustomPropertyUpdateData { + /** + * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: any; + } + /** An interface for updating data on the `CustomPropertyCollection` object, for use in `customPropertyCollection.set({ ... })`. */ + export interface CustomPropertyCollectionUpdateData { + items?: Word.Interfaces.CustomPropertyData[]; + } + /** An interface for updating data on the `CustomXmlPartCollection` object, for use in `customXmlPartCollection.set({ ... })`. */ + export interface CustomXmlPartCollectionUpdateData { + items?: Word.Interfaces.CustomXmlPartData[]; + } + /** An interface for updating data on the `CustomXmlPartScopedCollection` object, for use in `customXmlPartScopedCollection.set({ ... })`. */ + export interface CustomXmlPartScopedCollectionUpdateData { + items?: Word.Interfaces.CustomXmlPartData[]; + } + /** An interface for updating data on the `Document` object, for use in `document.set({ ... })`. */ + export interface DocumentUpdateData { + /** + * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. + * + * @remarks + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyUpdateData; + /** + * Gets the properties of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesUpdateData; + /** + * Specifies the ChangeTracking mode. + * + * @remarks + * [Api set: WordApi 1.4] + */ + changeTrackingMode?: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; + } + /** An interface for updating data on the `DocumentCreated` object, for use in `documentCreated.set({ ... })`. */ + export interface DocumentCreatedUpdateData { + /** + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + body?: Word.Interfaces.BodyUpdateData; + /** + * Gets the properties of the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesUpdateData; + } + /** An interface for updating data on the `DocumentProperties` object, for use in `documentProperties.set({ ... })`. */ + export interface DocumentPropertiesUpdateData { + /** + * Specifies the author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + author?: string; + /** + * Specifies the category of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + category?: string; + /** + * Specifies the Comments field in the metadata of the document. These have no connection to comments by users made in the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + comments?: string; + /** + * Specifies the company of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + company?: string; + /** + * Specifies the format of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + format?: string; + /** + * Specifies the keywords of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + keywords?: string; + /** + * Specifies the manager of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + manager?: string; + /** + * Specifies the subject of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subject?: string; + /** + * Specifies the title of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + title?: string; + } + /** An interface for updating data on the `Field` object, for use in `field.set({ ... })`. */ + export interface FieldUpdateData { + /** + * Gets the field's result data. + * + * @remarks + * [Api set: WordApi 1.4] + */ + result?: Word.Interfaces.RangeUpdateData; + /** + * Specifies the field's code instruction. + * + * @remarks + * [Api set: WordApi 1.4] + * + * Note: The ability to set the code was introduced in WordApi 1.5. + */ + code?: string; + /** + * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. + * + * @remarks + * [Api set: WordApi 1.5] + */ + data?: string; + /** + * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. + * + * @remarks + * [Api set: WordApi 1.5] + */ + locked?: boolean; + + } + /** An interface for updating data on the `FieldCollection` object, for use in `fieldCollection.set({ ... })`. */ + export interface FieldCollectionUpdateData { + items?: Word.Interfaces.FieldData[]; + } + /** An interface for updating data on the `Font` object, for use in `font.set({ ... })`. */ + export interface FontUpdateData { + /** + * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + bold?: boolean; + /** + * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + doubleStrikeThrough?: boolean; + /** + * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + highlightColor?: string; + /** + * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + italic?: boolean; + /** + * Specifies a value that represents the name of the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + name?: string; + /** + * Specifies a value that represents the font size in points. + * + * @remarks + * [Api set: WordApi 1.1] + */ + size?: number; + /** + * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + strikeThrough?: boolean; + /** + * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + subscript?: boolean; + /** + * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + superscript?: boolean; + /** + * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. + * + * @remarks + * [Api set: WordApi 1.1] + */ + underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; + } + /** An interface for updating data on the `InlinePicture` object, for use in `inlinePicture.set({ ... })`. */ + export interface InlinePictureUpdateData { + /** + * Specifies a string that represents the alternative text associated with the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextDescription?: string; + /** + * Specifies a string that contains the title for the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextTitle?: string; + /** + * Specifies a number that describes the height of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + height?: number; + /** + * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.1] + */ + hyperlink?: string; + /** + * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * Specifies a number that describes the width of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + width?: number; + } + /** An interface for updating data on the `InlinePictureCollection` object, for use in `inlinePictureCollection.set({ ... })`. */ + export interface InlinePictureCollectionUpdateData { + items?: Word.Interfaces.InlinePictureData[]; + } + /** An interface for updating data on the `ListCollection` object, for use in `listCollection.set({ ... })`. */ + export interface ListCollectionUpdateData { + items?: Word.Interfaces.ListData[]; + } + /** An interface for updating data on the `ListItem` object, for use in `listItem.set({ ... })`. */ + export interface ListItemUpdateData { + /** + * Specifies the level of the item in the list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + level?: number; + } + /** An interface for updating data on the `ListLevel` object, for use in `listLevel.set({ ... })`. */ + export interface ListLevelUpdateData { + + + + + + + + + + + + } + /** An interface for updating data on the `ListLevelCollection` object, for use in `listLevelCollection.set({ ... })`. */ + export interface ListLevelCollectionUpdateData { + items?: Word.Interfaces.ListLevelData[]; + } + /** An interface for updating data on the `ListTemplate` object, for use in `listTemplate.set({ ... })`. */ + export interface ListTemplateUpdateData { + + } + /** An interface for updating data on the `NoteItem` object, for use in `noteItem.set({ ... })`. */ + export interface NoteItemUpdateData { + /** + * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + body?: Word.Interfaces.BodyUpdateData; + /** + * Represents a footnote or endnote reference in the main document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + reference?: Word.Interfaces.RangeUpdateData; + } + /** An interface for updating data on the `NoteItemCollection` object, for use in `noteItemCollection.set({ ... })`. */ + export interface NoteItemCollectionUpdateData { + items?: Word.Interfaces.NoteItemData[]; + } + /** An interface for updating data on the `Paragraph` object, for use in `paragraph.set({ ... })`. */ + export interface ParagraphUpdateData { + /** + * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemUpdateData; + /** + * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemUpdateData; + /** + * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * @remarks + * [Api set: WordApi 1.1] + */ + firstLineIndent?: number; + /** + * Specifies the left indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + leftIndent?: number; + /** + * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineSpacing?: number; + /** + * Specifies the amount of spacing, in grid lines, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: number; + /** + * Specifies the amount of spacing, in grid lines, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: number; + /** + * Specifies the outline level for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + outlineLevel?: number; + /** + * Specifies the right indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + rightIndent?: number; + /** + * Specifies the spacing, in points, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceAfter?: number; + /** + * Specifies the spacing, in points, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceBefore?: number; + /** + * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + } + /** An interface for updating data on the `ParagraphCollection` object, for use in `paragraphCollection.set({ ... })`. */ + export interface ParagraphCollectionUpdateData { + items?: Word.Interfaces.ParagraphData[]; + } + /** An interface for updating data on the `ParagraphFormat` object, for use in `paragraphFormat.set({ ... })`. */ + export interface ParagraphFormatUpdateData { + /** + * Specifies the alignment for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * @remarks + * [Api set: WordApi 1.5] + */ + firstLineIndent?: number; + /** + * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepTogether?: boolean; + /** + * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepWithNext?: boolean; + /** + * Specifies the left indent. + * + * @remarks + * [Api set: WordApi 1.5] + */ + leftIndent?: number; + /** + * Specifies the line spacing (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineSpacing?: number; + /** + * Specifies the amount of spacing (in gridlines) after the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitAfter?: number; + /** + * Specifies the amount of spacing (in gridlines) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitBefore?: number; + /** + * Specifies whether left and right indents are the same width. + * + * @remarks + * [Api set: WordApi 1.5] + */ + mirrorIndents?: boolean; + /** + * Specifies the outline level for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel?: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; + /** + * Specifies the right indent (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + rightIndent?: number; + /** + * Specifies the amount of spacing (in points) after the specified paragraph or text column. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceAfter?: number; + /** + * Specifies the spacing (in points) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceBefore?: number; + /** + * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + widowControl?: boolean; + } + /** An interface for updating data on the `Range` object, for use in `range.set({ ... })`. */ + export interface RangeUpdateData { + /** + * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.3] + */ + hyperlink?: string; + /** + * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + } + /** An interface for updating data on the `RangeCollection` object, for use in `rangeCollection.set({ ... })`. */ + export interface RangeCollectionUpdateData { + items?: Word.Interfaces.RangeData[]; + } + /** An interface for updating data on the `SearchOptions` object, for use in `searchOptions.set({ ... })`. */ + export interface SearchOptionsUpdateData { + /** + * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignorePunct?: boolean; + /** + * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignoreSpace?: boolean; + /** + * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchCase?: boolean; + /** + * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchPrefix?: boolean; + /** + * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchSuffix?: boolean; + /** + * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWholeWord?: boolean; + /** + * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWildcards?: boolean; + } + /** An interface for updating data on the `Section` object, for use in `section.set({ ... })`. */ + export interface SectionUpdateData { + /** + * Gets the body object of the section. This doesn't include the header/footer and other section metadata. + * + * @remarks + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyUpdateData; + } + /** An interface for updating data on the `SectionCollection` object, for use in `sectionCollection.set({ ... })`. */ + export interface SectionCollectionUpdateData { + items?: Word.Interfaces.SectionData[]; + } + /** An interface for updating data on the `Setting` object, for use in `setting.set({ ... })`. */ + export interface SettingUpdateData { + /** + * Specifies the value of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + value?: any; + } + /** An interface for updating data on the `SettingCollection` object, for use in `settingCollection.set({ ... })`. */ + export interface SettingCollectionUpdateData { + items?: Word.Interfaces.SettingData[]; + } + /** An interface for updating data on the `StyleCollection` object, for use in `styleCollection.set({ ... })`. */ + export interface StyleCollectionUpdateData { + items?: Word.Interfaces.StyleData[]; + } + /** An interface for updating data on the `Style` object, for use in `style.set({ ... })`. */ + export interface StyleUpdateData { + + /** + * Gets a font object that represents the character formatting of the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + font?: Word.Interfaces.FontUpdateData; + + /** + * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + paragraphFormat?: Word.Interfaces.ParagraphFormatUpdateData; + /** + * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. + * + * @remarks + * [Api set: WordApi 1.6] + */ + shading?: Word.Interfaces.ShadingUpdateData; + /** + * Gets a TableStyle object representing Style properties that can be applied to a table. + * + * @remarks + * [Api set: WordApi 1.6] + */ + tableStyle?: Word.Interfaces.TableStyleUpdateData; + /** + * Specifies the name of an existing style to use as the base formatting of another style. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. + */ + baseStyle?: string; + /** + * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. + */ + nextParagraphStyle?: string; + /** + * Specifies the priority. + * + * @remarks + * [Api set: WordApi 1.5] + */ + priority?: number; + /** + * Specifies whether the style corresponds to an available quick style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + quickStyle?: boolean; + /** + * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + unhideWhenUsed?: boolean; + /** + * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. + * + * @remarks + * [Api set: WordApi 1.5] + */ + visibility?: boolean; + } + /** An interface for updating data on the `Shading` object, for use in `shading.set({ ... })`. */ + export interface ShadingUpdateData { + /** + * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi 1.6] + */ + backgroundPatternColor?: string; + + + } + /** An interface for updating data on the `Table` object, for use in `table.set({ ... })`. */ + export interface TableUpdateData { + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the number of header rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + headerRowCount?: number; + /** + * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + style?: string; + /** + * Specifies whether the table has banded columns. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedColumns?: boolean; + /** + * Specifies whether the table has banded rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedRows?: boolean; + /** + * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * Specifies whether the table has a first column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleFirstColumn?: boolean; + /** + * Specifies whether the table has a last column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleLastColumn?: boolean; + /** + * Specifies whether the table has a total (last) row with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleTotalRow?: boolean; + /** + * Specifies the text values in the table, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: string[][]; + /** + * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * Specifies the width of the table in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: number; + } + /** An interface for updating data on the `TableStyle` object, for use in `tableStyle.set({ ... })`. */ + export interface TableStyleUpdateData { + + + /** + * Specifies the amount of space to add between the contents and the bottom borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + bottomCellMargin?: number; + /** + * Specifies the spacing (in points) between the cells in a table style. + * + * @remarks + * [Api set: WordApi 1.6] + */ + cellSpacing?: number; + /** + * Specifies the amount of space to add between the contents and the left borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + leftCellMargin?: number; + /** + * Specifies the amount of space to add between the contents and the right borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + rightCellMargin?: number; + /** + * Specifies the amount of space to add between the contents and the top borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + topCellMargin?: number; + } + /** An interface for updating data on the `TableCollection` object, for use in `tableCollection.set({ ... })`. */ + export interface TableCollectionUpdateData { + items?: Word.Interfaces.TableData[]; + } + /** An interface for updating data on the `TableRow` object, for use in `tableRow.set({ ... })`. */ + export interface TableRowUpdateData { + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the preferred height of the row in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + preferredHeight?: number; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * Specifies the text values in the row, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: string[][]; + /** + * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + } + /** An interface for updating data on the `TableRowCollection` object, for use in `tableRowCollection.set({ ... })`. */ + export interface TableRowCollectionUpdateData { + items?: Word.Interfaces.TableRowData[]; + } + /** An interface for updating data on the `TableCell` object, for use in `tableCell.set({ ... })`. */ + export interface TableCellUpdateData { + /** + * Gets the body object of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyUpdateData; + /** + * Specifies the width of the cell's column in points. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + */ + columnWidth?: number; + /** + * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * Specifies the text of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: string; + /** + * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + } + /** An interface for updating data on the `TableCellCollection` object, for use in `tableCellCollection.set({ ... })`. */ + export interface TableCellCollectionUpdateData { + items?: Word.Interfaces.TableCellData[]; + } + /** An interface for updating data on the `TableBorder` object, for use in `tableBorder.set({ ... })`. */ + export interface TableBorderUpdateData { + /** + * Specifies the table border color. + * + * @remarks + * [Api set: WordApi 1.3] + */ + color?: string; + /** + * Specifies the type of the table border. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; + /** + * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: number; + } + /** An interface for updating data on the `TrackedChangeCollection` object, for use in `trackedChangeCollection.set({ ... })`. */ + export interface TrackedChangeCollectionUpdateData { + items?: Word.Interfaces.TrackedChangeData[]; + } + /** An interface describing the data returned by calling `critiqueAnnotation.toJSON()`. */ + export interface CritiqueAnnotationData { + + } + /** An interface describing the data returned by calling `annotation.toJSON()`. */ + export interface AnnotationData { + + + } + /** An interface describing the data returned by calling `annotationCollection.toJSON()`. */ + export interface AnnotationCollectionData { + items?: Word.Interfaces.AnnotationData[]; + } + /** An interface describing the data returned by calling `body.toJSON()`. */ + export interface BodyData { + /** + * Gets the collection of rich text content control objects in the body. + * + * @remarks + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * Gets the collection of field objects in the body. + * + * @remarks + * [Api set: WordApi 1.4] + */ + fields?: Word.Interfaces.FieldData[]; + /** + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontData; + /** + * Gets the collection of InlinePicture objects in the body. The collection doesn't include floating images. + * + * @remarks + * [Api set: WordApi 1.1] + */ + inlinePictures?: Word.Interfaces.InlinePictureData[]; + /** + * Gets the collection of list objects in the body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lists?: Word.Interfaces.ListData[]; + /** + * Gets the collection of paragraph objects in the body. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Important: Paragraphs in tables aren't returned for requirement sets 1.1 and 1.2. From requirement set 1.3, paragraphs in tables are also returned. + */ + paragraphs?: Word.Interfaces.ParagraphData[]; + /** + * Gets the collection of table objects in the body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + tables?: Word.Interfaces.TableData[]; + /** + * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * Gets the text of the body. Use the insertText method to insert text. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: string; + /** + * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: Word.BodyType | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell" | "Footnote" | "Endnote" | "NoteItem"; + } + /** An interface describing the data returned by calling `border.toJSON()`. */ + export interface BorderData { + + + + + + } + /** An interface describing the data returned by calling `borderCollection.toJSON()`. */ + export interface BorderCollectionData { + items?: Word.Interfaces.BorderData[]; + } + /** An interface describing the data returned by calling `checkboxContentControl.toJSON()`. */ + export interface CheckboxContentControlData { + + } + /** An interface describing the data returned by calling `comment.toJSON()`. */ + export interface CommentData { + /** + * Specifies the comment's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeData; + /** + * Gets the collection of reply objects associated with the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + replies?: Word.Interfaces.CommentReplyData[]; + /** + * Gets the email of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorEmail?: string; + /** + * Gets the name of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorName?: string; + /** + * Specifies the comment's content as plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: string; + /** + * Gets the creation date of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + creationDate?: Date; + /** + * Gets the ID of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: string; + /** + * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. + * + * @remarks + * [Api set: WordApi 1.4] + */ + resolved?: boolean; + } + /** An interface describing the data returned by calling `commentCollection.toJSON()`. */ + export interface CommentCollectionData { + items?: Word.Interfaces.CommentData[]; + } + /** An interface describing the data returned by calling `commentContentRange.toJSON()`. */ + export interface CommentContentRangeData { + /** + * Specifies a value that indicates whether the comment text is bold. + * + * @remarks + * [Api set: WordApi 1.4] + */ + bold?: boolean; + /** + * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + hyperlink?: string; + /** + * Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.4] + */ + isEmpty?: boolean; + /** + * Specifies a value that indicates whether the comment text is italicized. + * + * @remarks + * [Api set: WordApi 1.4] + */ + italic?: boolean; + /** + * Specifies a value that indicates whether the comment text has a strikethrough. + * + * @remarks + * [Api set: WordApi 1.4] + */ + strikeThrough?: boolean; + /** + * Gets the text of the comment range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + text?: string; + /** + * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. + * + * @remarks + * [Api set: WordApi 1.4] + */ + underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; + } + /** An interface describing the data returned by calling `commentReply.toJSON()`. */ + export interface CommentReplyData { + /** + * Specifies the commentReply's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeData; + /** + * Gets the parent comment of this reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentComment?: Word.Interfaces.CommentData; + /** + * Gets the email of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorEmail?: string; + /** + * Gets the name of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorName?: string; + /** + * Specifies the comment reply's content. The string is plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: string; + /** + * Gets the creation date of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + creationDate?: Date; + /** + * Gets the ID of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: string; + } + /** An interface describing the data returned by calling `commentReplyCollection.toJSON()`. */ + export interface CommentReplyCollectionData { + items?: Word.Interfaces.CommentReplyData[]; + } + /** An interface describing the data returned by calling `contentControl.toJSON()`. */ + export interface ContentControlData { + + + /** + * Gets the collection of content control objects in the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + + /** + * Gets the collection of field objects in the content control. + * + * @remarks + * [Api set: WordApi 1.4] + */ + fields?: Word.Interfaces.FieldData[]; + /** + * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontData; + /** + * Gets the collection of InlinePicture objects in the content control. The collection doesn't include floating images. + * + * @remarks + * [Api set: WordApi 1.1] + */ + inlinePictures?: Word.Interfaces.InlinePictureData[]; + /** + * Gets the collection of list objects in the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lists?: Word.Interfaces.ListData[]; + /** + * Gets the collection of paragraph objects in the content control. + * + * @remarks + * [Api set: WordApi 1.1] + * + * Important: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this content control aren't returned. From requirement set 1.3, paragraphs in such tables are also returned. + */ + paragraphs?: Word.Interfaces.ParagraphData[]; + /** + * Gets the collection of table objects in the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + tables?: Word.Interfaces.TableData[]; + /** + * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + appearance?: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; + /** + * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * Specifies a value that indicates whether the user can edit the contents of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * Gets an integer that represents the content control identifier. + * + * @remarks + * [Api set: WordApi 1.1] + */ + id?: number; + /** + * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. + * + * @remarks + * [Api set: WordApi 1.1] + */ + placeholderText?: string; + /** + * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * @remarks + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subtype?: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText"; + /** + * Specifies a tag to identify a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + tag?: string; + /** + * Gets the text of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: string; + /** + * Specifies the title for a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + title?: string; + /** + * Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. + * + * @remarks + * [Api set: WordApi 1.1] + */ + type?: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText"; + } + /** An interface describing the data returned by calling `contentControlCollection.toJSON()`. */ + export interface ContentControlCollectionData { + items?: Word.Interfaces.ContentControlData[]; + } + /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ + export interface ContentControlListItemData { + + + + } + /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ + export interface ContentControlListItemCollectionData { + items?: Word.Interfaces.ContentControlListItemData[]; + } + /** An interface describing the data returned by calling `customProperty.toJSON()`. */ + export interface CustomPropertyData { + /** + * Gets the key of the custom property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + key?: string; + /** + * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: Word.DocumentPropertyType | "String" | "Number" | "Date" | "Boolean"; + /** + * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: any; + } + /** An interface describing the data returned by calling `customPropertyCollection.toJSON()`. */ + export interface CustomPropertyCollectionData { + items?: Word.Interfaces.CustomPropertyData[]; + } + /** An interface describing the data returned by calling `customXmlPart.toJSON()`. */ + export interface CustomXmlPartData { + /** + * Gets the ID of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: string; + /** + * Gets the namespace URI of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + namespaceUri?: string; + } + /** An interface describing the data returned by calling `customXmlPartCollection.toJSON()`. */ + export interface CustomXmlPartCollectionData { + items?: Word.Interfaces.CustomXmlPartData[]; + } + /** An interface describing the data returned by calling `customXmlPartScopedCollection.toJSON()`. */ + export interface CustomXmlPartScopedCollectionData { + items?: Word.Interfaces.CustomXmlPartData[]; + } + /** An interface describing the data returned by calling `document.toJSON()`. */ + export interface DocumentData { + /** + * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. + * + * @remarks + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyData; + /** + * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. + * + * @remarks + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * Gets the custom XML parts in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + customXmlParts?: Word.Interfaces.CustomXmlPartData[]; + /** + * Gets the properties of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesData; + /** + * Gets the collection of section objects in the document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + sections?: Word.Interfaces.SectionData[]; + /** + * Gets the add-in's settings in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + settings?: Word.Interfaces.SettingData[]; + /** + * Specifies the ChangeTracking mode. + * + * @remarks + * [Api set: WordApi 1.4] + */ + changeTrackingMode?: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; + /** + * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. + * + * @remarks + * [Api set: WordApi 1.1] + */ + saved?: boolean; + } + /** An interface describing the data returned by calling `documentCreated.toJSON()`. */ + export interface DocumentCreatedData { + /** + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + body?: Word.Interfaces.BodyData; + /** + * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + contentControls?: Word.Interfaces.ContentControlData[]; + /** + * Gets the custom XML parts in the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.4] + */ + customXmlParts?: Word.Interfaces.CustomXmlPartData[]; + /** + * Gets the properties of the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesData; + /** + * Gets the collection of section objects in the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + sections?: Word.Interfaces.SectionData[]; + /** + * Gets the add-in's settings in the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.4] + */ + settings?: Word.Interfaces.SettingData[]; + /** + * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + saved?: boolean; + } + /** An interface describing the data returned by calling `documentProperties.toJSON()`. */ + export interface DocumentPropertiesData { + /** + * Gets the collection of custom properties of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + customProperties?: Word.Interfaces.CustomPropertyData[]; + /** + * Gets the application name of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + applicationName?: string; + /** + * Specifies the author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + author?: string; + /** + * Specifies the category of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + category?: string; + /** + * Specifies the Comments field in the metadata of the document. These have no connection to comments by users made in the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + comments?: string; + /** + * Specifies the company of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + company?: string; + /** + * Gets the creation date of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + creationDate?: Date; + /** + * Specifies the format of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + format?: string; + /** + * Specifies the keywords of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + keywords?: string; + /** + * Gets the last author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lastAuthor?: string; + /** + * Gets the last print date of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lastPrintDate?: Date; + /** + * Gets the last save time of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lastSaveTime?: Date; + /** + * Specifies the manager of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + manager?: string; + /** + * Gets the revision number of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + revisionNumber?: string; + /** + * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. + * + * @remarks + * [Api set: WordApi 1.3] + */ + security?: number; + /** + * Specifies the subject of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subject?: string; + /** + * Gets the template of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + template?: string; + /** + * Specifies the title of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + title?: string; + } + /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ + export interface DropDownListContentControlData { + } + /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ + export interface ComboBoxContentControlData { + } + /** An interface describing the data returned by calling `field.toJSON()`. */ + export interface FieldData { + /** + * Gets the field's result data. + * + * @remarks + * [Api set: WordApi 1.4] + */ + result?: Word.Interfaces.RangeData; + /** + * Specifies the field's code instruction. + * + * @remarks + * [Api set: WordApi 1.4] + * + * Note: The ability to set the code was introduced in WordApi 1.5. + */ + code?: string; + /** + * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. + * + * @remarks + * [Api set: WordApi 1.5] + */ + data?: string; + /** + * Gets the field's kind. + * + * @remarks + * [Api set: WordApi 1.5] + */ + kind?: Word.FieldKind | "None" | "Hot" | "Warm" | "Cold"; + /** + * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. + * + * @remarks + * [Api set: WordApi 1.5] + */ + locked?: boolean; + + /** + * Gets the field's type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: Word.FieldType | "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined"; + } + /** An interface describing the data returned by calling `fieldCollection.toJSON()`. */ + export interface FieldCollectionData { + items?: Word.Interfaces.FieldData[]; + } + /** An interface describing the data returned by calling `font.toJSON()`. */ + export interface FontData { + /** + * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + bold?: boolean; + /** + * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + doubleStrikeThrough?: boolean; + /** + * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + highlightColor?: string; + /** + * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + italic?: boolean; + /** + * Specifies a value that represents the name of the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + name?: string; + /** + * Specifies a value that represents the font size in points. + * + * @remarks + * [Api set: WordApi 1.1] + */ + size?: number; + /** + * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + strikeThrough?: boolean; + /** + * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + subscript?: boolean; + /** + * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + superscript?: boolean; + /** + * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. + * + * @remarks + * [Api set: WordApi 1.1] + */ + underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; + } + /** An interface describing the data returned by calling `inlinePicture.toJSON()`. */ + export interface InlinePictureData { + /** + * Specifies a string that represents the alternative text associated with the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextDescription?: string; + /** + * Specifies a string that contains the title for the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextTitle?: string; + /** + * Specifies a number that describes the height of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + height?: number; + /** + * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.1] + */ + hyperlink?: string; + + /** + * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * Specifies a number that describes the width of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + width?: number; + } + /** An interface describing the data returned by calling `inlinePictureCollection.toJSON()`. */ + export interface InlinePictureCollectionData { + items?: Word.Interfaces.InlinePictureData[]; + } + /** An interface describing the data returned by calling `list.toJSON()`. */ + export interface ListData { + /** + * Gets paragraphs in the list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + paragraphs?: Word.Interfaces.ParagraphData[]; + /** + * Gets the list's id. + * + * @remarks + * [Api set: WordApi 1.3] + */ + id?: number; + /** + * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. + * + * @remarks + * [Api set: WordApi 1.3] + */ + levelExistences?: boolean[]; + /** + * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + levelTypes?: Word.ListLevelType[]; + } + /** An interface describing the data returned by calling `listCollection.toJSON()`. */ + export interface ListCollectionData { + items?: Word.Interfaces.ListData[]; + } + /** An interface describing the data returned by calling `listItem.toJSON()`. */ + export interface ListItemData { + /** + * Specifies the level of the item in the list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + level?: number; + /** + * Gets the list item bullet, number, or picture as a string. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listString?: string; + /** + * Gets the list item order number in relation to its siblings. + * + * @remarks + * [Api set: WordApi 1.3] + */ + siblingIndex?: number; + } + /** An interface describing the data returned by calling `listLevel.toJSON()`. */ + export interface ListLevelData { + + + + + + + + + + + + } + /** An interface describing the data returned by calling `listLevelCollection.toJSON()`. */ + export interface ListLevelCollectionData { + items?: Word.Interfaces.ListLevelData[]; + } + /** An interface describing the data returned by calling `listTemplate.toJSON()`. */ + export interface ListTemplateData { + + + } + /** An interface describing the data returned by calling `noteItem.toJSON()`. */ + export interface NoteItemData { + /** + * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + body?: Word.Interfaces.BodyData; + /** + * Represents a footnote or endnote reference in the main document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + reference?: Word.Interfaces.RangeData; + /** + * Represents the note item type: footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: Word.NoteItemType | "Footnote" | "Endnote"; + } + /** An interface describing the data returned by calling `noteItemCollection.toJSON()`. */ + export interface NoteItemCollectionData { + items?: Word.Interfaces.NoteItemData[]; + } + /** An interface describing the data returned by calling `paragraph.toJSON()`. */ + export interface ParagraphData { + /** + * Gets the collection of fields in the paragraph. + * + * @remarks + * [Api set: WordApi 1.4] + */ + fields?: Word.Interfaces.FieldData[]; + /** + * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontData; + /** + * Gets the collection of InlinePicture objects in the paragraph. The collection doesn't include floating images. + * + * @remarks + * [Api set: WordApi 1.1] + */ + inlinePictures?: Word.Interfaces.InlinePictureData[]; + /** + * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemData; + /** + * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemData; + /** + * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * @remarks + * [Api set: WordApi 1.1] + */ + firstLineIndent?: number; + /** + * Indicates the paragraph is the last one inside its parent body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isLastParagraph?: boolean; + /** + * Checks whether the paragraph is a list item. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isListItem?: boolean; + /** + * Specifies the left indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + leftIndent?: number; + /** + * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineSpacing?: number; + /** + * Specifies the amount of spacing, in grid lines, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: number; + /** + * Specifies the amount of spacing, in grid lines, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: number; + /** + * Specifies the outline level for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + outlineLevel?: number; + /** + * Specifies the right indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + rightIndent?: number; + /** + * Specifies the spacing, in points, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceAfter?: number; + /** + * Specifies the spacing, in points, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceBefore?: number; + /** + * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + tableNestingLevel?: number; + /** + * Gets the text of the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: string; + /** + * Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. + * + * @remarks + * [Api set: WordApi 1.6] + */ + uniqueLocalId?: string; + } + /** An interface describing the data returned by calling `paragraphCollection.toJSON()`. */ + export interface ParagraphCollectionData { + items?: Word.Interfaces.ParagraphData[]; + } + /** An interface describing the data returned by calling `paragraphFormat.toJSON()`. */ + export interface ParagraphFormatData { + /** + * Specifies the alignment for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * @remarks + * [Api set: WordApi 1.5] + */ + firstLineIndent?: number; + /** + * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepTogether?: boolean; + /** + * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepWithNext?: boolean; + /** + * Specifies the left indent. + * + * @remarks + * [Api set: WordApi 1.5] + */ + leftIndent?: number; + /** + * Specifies the line spacing (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineSpacing?: number; + /** + * Specifies the amount of spacing (in gridlines) after the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitAfter?: number; + /** + * Specifies the amount of spacing (in gridlines) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitBefore?: number; + /** + * Specifies whether left and right indents are the same width. + * + * @remarks + * [Api set: WordApi 1.5] + */ + mirrorIndents?: boolean; + /** + * Specifies the outline level for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel?: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; + /** + * Specifies the right indent (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + rightIndent?: number; + /** + * Specifies the amount of spacing (in points) after the specified paragraph or text column. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceAfter?: number; + /** + * Specifies the spacing (in points) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceBefore?: number; + /** + * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + widowControl?: boolean; + } + /** An interface describing the data returned by calling `range.toJSON()`. */ + export interface RangeData { + /** + * Gets the collection of field objects in the range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + fields?: Word.Interfaces.FieldData[]; + /** + * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontData; + /** + * Gets the collection of inline picture objects in the range. + * + * @remarks + * [Api set: WordApi 1.2] + */ + inlinePictures?: Word.Interfaces.InlinePictureData[]; + /** + * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.3] + */ + hyperlink?: string; + /** + * Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isEmpty?: boolean; + /** + * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * Gets the text of the range. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: string; + } + /** An interface describing the data returned by calling `rangeCollection.toJSON()`. */ + export interface RangeCollectionData { + items?: Word.Interfaces.RangeData[]; + } + /** An interface describing the data returned by calling `searchOptions.toJSON()`. */ + export interface SearchOptionsData { + /** + * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignorePunct?: boolean; + /** + * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignoreSpace?: boolean; + /** + * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchCase?: boolean; + /** + * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchPrefix?: boolean; + /** + * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchSuffix?: boolean; + /** + * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWholeWord?: boolean; + /** + * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWildcards?: boolean; + } + /** An interface describing the data returned by calling `section.toJSON()`. */ + export interface SectionData { + /** + * Gets the body object of the section. This doesn't include the header/footer and other section metadata. + * + * @remarks + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyData; + } + /** An interface describing the data returned by calling `sectionCollection.toJSON()`. */ + export interface SectionCollectionData { + items?: Word.Interfaces.SectionData[]; + } + /** An interface describing the data returned by calling `setting.toJSON()`. */ + export interface SettingData { + /** + * Gets the key of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + key?: string; + /** + * Specifies the value of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + value?: any; + } + /** An interface describing the data returned by calling `settingCollection.toJSON()`. */ + export interface SettingCollectionData { + items?: Word.Interfaces.SettingData[]; + } + /** An interface describing the data returned by calling `styleCollection.toJSON()`. */ + export interface StyleCollectionData { + items?: Word.Interfaces.StyleData[]; + } + /** An interface describing the data returned by calling `style.toJSON()`. */ + export interface StyleData { + + /** + * Gets a font object that represents the character formatting of the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + font?: Word.Interfaces.FontData; + + /** + * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + paragraphFormat?: Word.Interfaces.ParagraphFormatData; + /** + * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. + * + * @remarks + * [Api set: WordApi 1.6] + */ + shading?: Word.Interfaces.ShadingData; + /** + * Gets a TableStyle object representing Style properties that can be applied to a table. + * + * @remarks + * [Api set: WordApi 1.6] + */ + tableStyle?: Word.Interfaces.TableStyleData; + /** + * Specifies the name of an existing style to use as the base formatting of another style. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. + */ + baseStyle?: string; + /** + * Gets whether the specified style is a built-in style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + builtIn?: boolean; + /** + * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + inUse?: boolean; + /** + * Gets whether a style is a linked style that can be used for both paragraph and character formatting. + * + * @remarks + * [Api set: WordApi 1.5] + */ + linked?: boolean; + /** + * Gets the name of a style in the language of the user. + * + * @remarks + * [Api set: WordApi 1.5] + */ + nameLocal?: string; + /** + * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. + */ + nextParagraphStyle?: string; + /** + * Specifies the priority. + * + * @remarks + * [Api set: WordApi 1.5] + */ + priority?: number; + /** + * Specifies whether the style corresponds to an available quick style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + quickStyle?: boolean; + /** + * Gets the style type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: Word.StyleType | "Character" | "List" | "Paragraph" | "Table"; + /** + * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + unhideWhenUsed?: boolean; + /** + * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. + * + * @remarks + * [Api set: WordApi 1.5] + */ + visibility?: boolean; + } + /** An interface describing the data returned by calling `shading.toJSON()`. */ + export interface ShadingData { + /** + * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi 1.6] + */ + backgroundPatternColor?: string; + + + } + /** An interface describing the data returned by calling `table.toJSON()`. */ + export interface TableData { + /** + * Gets the collection of field objects in the table. + * + * @remarks + * [Api set: WordApi 1.4] + */ + fields?: Word.Interfaces.FieldData[]; + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontData; + /** + * Gets all of the table rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rows?: Word.Interfaces.TableRowData[]; + /** + * Gets the child tables nested one level deeper. + * + * @remarks + * [Api set: WordApi 1.3] + */ + tables?: Word.Interfaces.TableData[]; + /** + * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Specifies the number of header rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + headerRowCount?: number; + /** + * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Indicates whether all of the table rows are uniform. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isUniform?: boolean; + /** + * Gets the nesting level of the table. Top-level tables have level 1. + * + * @remarks + * [Api set: WordApi 1.3] + */ + nestingLevel?: number; + /** + * Gets the number of rows in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowCount?: number; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + style?: string; + /** + * Specifies whether the table has banded columns. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedColumns?: boolean; + /** + * Specifies whether the table has banded rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedRows?: boolean; + /** + * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; + /** + * Specifies whether the table has a first column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleFirstColumn?: boolean; + /** + * Specifies whether the table has a last column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleLastColumn?: boolean; + /** + * Specifies whether the table has a total (last) row with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleTotalRow?: boolean; + /** + * Specifies the text values in the table, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: string[][]; + /** + * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * Specifies the width of the table in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: number; + } + /** An interface describing the data returned by calling `tableStyle.toJSON()`. */ + export interface TableStyleData { + + + /** + * Specifies the amount of space to add between the contents and the bottom borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + bottomCellMargin?: number; + /** + * Specifies the spacing (in points) between the cells in a table style. + * + * @remarks + * [Api set: WordApi 1.6] + */ + cellSpacing?: number; + /** + * Specifies the amount of space to add between the contents and the left borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + leftCellMargin?: number; + /** + * Specifies the amount of space to add between the contents and the right borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + rightCellMargin?: number; + /** + * Specifies the amount of space to add between the contents and the top borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + topCellMargin?: number; + } + /** An interface describing the data returned by calling `tableCollection.toJSON()`. */ + export interface TableCollectionData { + items?: Word.Interfaces.TableData[]; + } + /** An interface describing the data returned by calling `tableRow.toJSON()`. */ + export interface TableRowData { + /** + * Gets cells. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cells?: Word.Interfaces.TableCellData[]; + /** + * Gets the collection of field objects in the table row. + * + * @remarks + * [Api set: WordApi 1.4] + */ + fields?: Word.Interfaces.FieldData[]; + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontData; + /** + * Gets the number of cells in the row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cellCount?: number; + /** + * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isHeader?: boolean; + /** + * Specifies the preferred height of the row in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + preferredHeight?: number; + /** + * Gets the index of the row in its parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowIndex?: number; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * Specifies the text values in the row, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: string[][]; + /** + * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + } + /** An interface describing the data returned by calling `tableRowCollection.toJSON()`. */ + export interface TableRowCollectionData { + items?: Word.Interfaces.TableRowData[]; + } + /** An interface describing the data returned by calling `tableCell.toJSON()`. */ + export interface TableCellData { + /** + * Gets the body object of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyData; + /** + * Gets the index of the cell in its row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cellIndex?: number; + /** + * Specifies the width of the cell's column in points. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + */ + columnWidth?: number; + /** + * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; + /** + * Gets the index of the cell's row in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowIndex?: number; + /** + * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * Specifies the text of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: string; + /** + * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; + /** + * Gets the width of the cell in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: number; + } + /** An interface describing the data returned by calling `tableCellCollection.toJSON()`. */ + export interface TableCellCollectionData { + items?: Word.Interfaces.TableCellData[]; + } + /** An interface describing the data returned by calling `tableBorder.toJSON()`. */ + export interface TableBorderData { + /** + * Specifies the table border color. + * + * @remarks + * [Api set: WordApi 1.3] + */ + color?: string; + /** + * Specifies the type of the table border. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; + /** + * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: number; + } + /** An interface describing the data returned by calling `trackedChange.toJSON()`. */ + export interface TrackedChangeData { + /** + * Gets the author of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + author?: string; + /** + * Gets the date of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + date?: Date; + /** + * Gets the text of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + text?: string; + /** + * Gets the type of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + type?: Word.TrackedChangeType | "None" | "Added" | "Deleted" | "Formatted"; + } + /** An interface describing the data returned by calling `trackedChangeCollection.toJSON()`. */ + export interface TrackedChangeCollectionData { + items?: Word.Interfaces.TrackedChangeData[]; + } + + + + /** + * Represents the body of a document or a section. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface BodyLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws an `ItemNotFound` error if there isn't a parent body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the parent body of the body. For example, a table cell body's parent body could be a header. If there isn't a parent body, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBodyOrNullObject?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the content control that contains the body. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the body. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the parent section of the body. Throws an `ItemNotFound` error if there isn't a parent section. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentSection?: Word.Interfaces.SectionLoadOptions; + /** + * Gets the parent section of the body. If there isn't a parent section, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentSectionOrNullObject?: Word.Interfaces.SectionLoadOptions; + /** + * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * Gets the text of the body. Use the insertText method to insert text. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: boolean; + } + + + + /** + * Represents a comment in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export interface CommentLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the comment's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; + /** + * Gets the email of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorEmail?: boolean; + /** + * Gets the name of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorName?: boolean; + /** + * Specifies the comment's content as plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: boolean; + /** + * Gets the creation date of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + creationDate?: boolean; + /** + * Gets the ID of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + /** + * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. + * + * @remarks + * [Api set: WordApi 1.4] + */ + resolved?: boolean; + } + /** + * Contains a collection of {@link Word.Comment} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export interface CommentCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the comment's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; + /** + * For EACH ITEM in the collection: Gets the email of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorEmail?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of the comment's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorName?: boolean; + /** + * For EACH ITEM in the collection: Specifies the comment's content as plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: boolean; + /** + * For EACH ITEM in the collection: Gets the creation date of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + creationDate?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the comment. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. + * + * @remarks + * [Api set: WordApi 1.4] + */ + resolved?: boolean; + } + /** + * @remarks + * [Api set: WordApi 1.4] + */ + export interface CommentContentRangeLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies a value that indicates whether the comment text is bold. + * + * @remarks + * [Api set: WordApi 1.4] + */ + bold?: boolean; + /** + * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + hyperlink?: boolean; + /** + * Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.4] + */ + isEmpty?: boolean; + /** + * Specifies a value that indicates whether the comment text is italicized. + * + * @remarks + * [Api set: WordApi 1.4] + */ + italic?: boolean; + /** + * Specifies a value that indicates whether the comment text has a strikethrough. + * + * @remarks + * [Api set: WordApi 1.4] + */ + strikeThrough?: boolean; + /** + * Gets the text of the comment range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + text?: boolean; + /** + * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. + * + * @remarks + * [Api set: WordApi 1.4] + */ + underline?: boolean; + } + /** + * Represents a comment reply in the document. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export interface CommentReplyLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the commentReply's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; + /** + * Gets the parent comment of this reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentComment?: Word.Interfaces.CommentLoadOptions; + /** + * Gets the email of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorEmail?: boolean; + /** + * Gets the name of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorName?: boolean; + /** + * Specifies the comment reply's content. The string is plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: boolean; + /** + * Gets the creation date of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + creationDate?: boolean; + /** + * Gets the ID of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + } + /** + * Contains a collection of {@link Word.CommentReply} objects. Represents all comment replies in one comment thread. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export interface CommentReplyCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the commentReply's content range. + * + * @remarks + * [Api set: WordApi 1.4] + */ + contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent comment of this reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentComment?: Word.Interfaces.CommentLoadOptions; + /** + * For EACH ITEM in the collection: Gets the email of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorEmail?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of the comment reply's author. + * + * @remarks + * [Api set: WordApi 1.4] + */ + authorName?: boolean; + /** + * For EACH ITEM in the collection: Specifies the comment reply's content. The string is plain text. + * + * @remarks + * [Api set: WordApi 1.4] + */ + content?: boolean; + /** + * For EACH ITEM in the collection: Gets the creation date of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + creationDate?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the comment reply. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + } + /** + * Represents a content control. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text, plain text, and checkbox content controls are supported. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface ContentControlLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + + /** + * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Gets the parent body of the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the table that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table cell that contains the content control. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table that contains the content control. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + appearance?: boolean; + /** + * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * Specifies a value that indicates whether the user can edit the contents of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: boolean; + /** + * Gets an integer that represents the content control identifier. + * + * @remarks + * [Api set: WordApi 1.1] + */ + id?: boolean; + /** + * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. + * + * @remarks + * [Api set: WordApi 1.1] + */ + placeholderText?: boolean; + /** + * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * @remarks + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subtype?: boolean; + /** + * Specifies a tag to identify a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + tag?: boolean; + /** + * Gets the text of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * Specifies the title for a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + title?: boolean; + /** + * Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. + * + * @remarks + * [Api set: WordApi 1.1] + */ + type?: boolean; + } + /** + * Contains a collection of {@link Word.ContentControl} objects. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text and plain text content controls are supported. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface ContentControlCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + + /** + * For EACH ITEM in the collection: Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent body of the content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the content control. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the content control. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + appearance?: boolean; + /** + * For EACH ITEM in the collection: Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * For EACH ITEM in the collection: Specifies a value that indicates whether the user can edit the contents of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * For EACH ITEM in the collection: Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: boolean; + /** + * For EACH ITEM in the collection: Gets an integer that represents the content control identifier. + * + * @remarks + * [Api set: WordApi 1.1] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. + * + * @remarks + * [Api set: WordApi 1.1] + */ + placeholderText?: boolean; + /** + * For EACH ITEM in the collection: Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * @remarks + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * For EACH ITEM in the collection: Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * For EACH ITEM in the collection: Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * For EACH ITEM in the collection: Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subtype?: boolean; + /** + * For EACH ITEM in the collection: Specifies a tag to identify a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + tag?: boolean; + /** + * For EACH ITEM in the collection: Gets the text of the content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * For EACH ITEM in the collection: Specifies the title for a content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + title?: boolean; + /** + * For EACH ITEM in the collection: Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. + * + * @remarks + * [Api set: WordApi 1.1] + */ + type?: boolean; + } + + + /** + * Represents a custom property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface CustomPropertyLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the key of the custom property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + key?: boolean; + /** + * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: boolean; + /** + * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: boolean; + } + /** + * Contains the collection of {@link Word.CustomProperty} objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface CustomPropertyCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the key of the custom property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + key?: boolean; + /** + * For EACH ITEM in the collection: Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: boolean; + /** + * For EACH ITEM in the collection: Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: boolean; + } + /** + * Represents a custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export interface CustomXmlPartLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the ID of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + /** + * Gets the namespace URI of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + namespaceUri?: boolean; + } + /** + * Contains the collection of {@link Word.CustomXmlPart} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export interface CustomXmlPartCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Gets the namespace URI of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + namespaceUri?: boolean; + } + /** + * Contains the collection of {@link Word.CustomXmlPart} objects with a specific namespace. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export interface CustomXmlPartScopedCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the ID of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Gets the namespace URI of the custom XML part. + * + * @remarks + * [Api set: WordApi 1.4] + */ + namespaceUri?: boolean; + } + /** + * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface DocumentLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. + * + * @remarks + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the properties of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesLoadOptions; + /** + * Specifies the ChangeTracking mode. + * + * @remarks + * [Api set: WordApi 1.4] + */ + changeTrackingMode?: boolean; + /** + * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. + * + * @remarks + * [Api set: WordApi 1.1] + */ + saved?: boolean; + } + /** + * The DocumentCreated object is the top level object created by Application.CreateDocument. A DocumentCreated object is a special Document object. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface DocumentCreatedLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the properties of the document. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesLoadOptions; + /** + * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. + * + * @remarks + * [Api set: WordApiHiddenDocument 1.3] + */ + saved?: boolean; + } + /** + * Represents document properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface DocumentPropertiesLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the application name of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + applicationName?: boolean; + /** + * Specifies the author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + author?: boolean; + /** + * Specifies the category of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + category?: boolean; + /** + * Specifies the Comments field in the metadata of the document. These have no connection to comments by users made in the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + comments?: boolean; + /** + * Specifies the company of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + company?: boolean; + /** + * Gets the creation date of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + creationDate?: boolean; + /** + * Specifies the format of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + format?: boolean; + /** + * Specifies the keywords of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + keywords?: boolean; + /** + * Gets the last author of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lastAuthor?: boolean; + /** + * Gets the last print date of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lastPrintDate?: boolean; + /** + * Gets the last save time of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + lastSaveTime?: boolean; + /** + * Specifies the manager of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + manager?: boolean; + /** + * Gets the revision number of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + revisionNumber?: boolean; + /** + * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. + * + * @remarks + * [Api set: WordApi 1.3] + */ + security?: boolean; + /** + * Specifies the subject of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + subject?: boolean; + /** + * Gets the template of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + template?: boolean; + /** + * Specifies the title of the document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + title?: boolean; + } + /** + * Represents a field. + * + * @remarks + * [Api set: WordApi 1.4] + * + * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField` API introduced in requirement set 1.5. + * Support for managing fields is similar to what's available in the Word UI. + * However, while the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}), + * the `Addin` field is editable. To learn more about Word UI clients that more fully support fields, + * see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. + */ + export interface FieldLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the parent body of the field. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the table that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the table cell that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table cell that contains the field. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table that contains the field. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * Gets the field's result data. + * + * @remarks + * [Api set: WordApi 1.4] + */ + result?: Word.Interfaces.RangeLoadOptions; + /** + * Specifies the field's code instruction. + * + * @remarks + * [Api set: WordApi 1.4] + * + * Note: The ability to set the code was introduced in WordApi 1.5. + */ + code?: boolean; + /** + * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. + * + * @remarks + * [Api set: WordApi 1.5] + */ + data?: boolean; + /** + * Gets the field's kind. + * + * @remarks + * [Api set: WordApi 1.5] + */ + kind?: boolean; + /** + * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. + * + * @remarks + * [Api set: WordApi 1.5] + */ + locked?: boolean; + + /** + * Gets the field's type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: boolean; + } + /** + * Contains a collection of {@link Word.Field} objects. + * + * @remarks + * [Api set: WordApi 1.4] + * + * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField API` introduced in requirement set 1.5. + * Support for managing fields is similar to what's available in the Word UI. + * However, while the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}), + * the `Addin` field is editable. To learn more about Word UI clients that more fully support fields, + * see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. + */ + export interface FieldCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the parent body of the field. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the field. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the field. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.4] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the field's result data. + * + * @remarks + * [Api set: WordApi 1.4] + */ + result?: Word.Interfaces.RangeLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the field's code instruction. + * + * @remarks + * [Api set: WordApi 1.4] + * + * Note: The ability to set the code was introduced in WordApi 1.5. + */ + code?: boolean; + /** + * For EACH ITEM in the collection: Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. + * + * @remarks + * [Api set: WordApi 1.5] + */ + data?: boolean; + /** + * For EACH ITEM in the collection: Gets the field's kind. + * + * @remarks + * [Api set: WordApi 1.5] + */ + kind?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. + * + * @remarks + * [Api set: WordApi 1.5] + */ + locked?: boolean; + + /** + * For EACH ITEM in the collection: Gets the field's type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: boolean; + } + /** + * Represents a font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface FontLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + bold?: boolean; + /** + * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi 1.1] + */ + color?: boolean; + /** + * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + doubleStrikeThrough?: boolean; + /** + * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + highlightColor?: boolean; + /** + * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + italic?: boolean; + /** + * Specifies a value that represents the name of the font. + * + * @remarks + * [Api set: WordApi 1.1] + */ + name?: boolean; + /** + * Specifies a value that represents the font size in points. + * + * @remarks + * [Api set: WordApi 1.1] + */ + size?: boolean; + /** + * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + strikeThrough?: boolean; + /** + * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + subscript?: boolean; + /** + * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. + * + * @remarks + * [Api set: WordApi 1.1] + */ + superscript?: boolean; + /** + * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. + * + * @remarks + * [Api set: WordApi 1.1] + */ + underline?: boolean; + } + /** + * Represents an inline picture. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface InlinePictureLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the parent paragraph that contains the inline image. + * + * @remarks + * [Api set: WordApi 1.2] + */ + paragraph?: Word.Interfaces.ParagraphLoadOptions; + /** + * Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the table that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table cell that contains the inline image. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table that contains the inline image. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * Specifies a string that represents the alternative text associated with the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextDescription?: boolean; + /** + * Specifies a string that contains the title for the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextTitle?: boolean; + /** + * Specifies a number that describes the height of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + height?: boolean; + /** + * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.1] + */ + hyperlink?: boolean; + + /** + * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * Specifies a number that describes the width of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + width?: boolean; + } + /** + * Contains a collection of {@link Word.InlinePicture} objects. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface InlinePictureCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the parent paragraph that contains the inline image. + * + * @remarks + * [Api set: WordApi 1.2] + */ + paragraph?: Word.Interfaces.ParagraphLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the inline image. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the inline image. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Specifies a string that represents the alternative text associated with the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextDescription?: boolean; + /** + * For EACH ITEM in the collection: Specifies a string that contains the title for the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + altTextTitle?: boolean; + /** + * For EACH ITEM in the collection: Specifies a number that describes the height of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + height?: boolean; + /** + * For EACH ITEM in the collection: Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.1] + */ + hyperlink?: boolean; + + /** + * For EACH ITEM in the collection: Specifies a value that indicates whether the inline image retains its original proportions when you resize it. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * For EACH ITEM in the collection: Specifies a number that describes the width of the inline image. + * + * @remarks + * [Api set: WordApi 1.1] + */ + width?: boolean; + } + /** + * Contains a collection of {@link Word.Paragraph} objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface ListLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the list's id. + * + * @remarks + * [Api set: WordApi 1.3] + */ + id?: boolean; + /** + * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. + * + * @remarks + * [Api set: WordApi 1.3] + */ + levelExistences?: boolean; + /** + * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + levelTypes?: boolean; + } + /** + * Contains a collection of {@link Word.List} objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface ListCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the list's id. + * + * @remarks + * [Api set: WordApi 1.3] + */ + id?: boolean; + /** + * For EACH ITEM in the collection: Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. + * + * @remarks + * [Api set: WordApi 1.3] + */ + levelExistences?: boolean; + /** + * For EACH ITEM in the collection: Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + levelTypes?: boolean; + } + /** + * Represents the paragraph list item format. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface ListItemLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the level of the item in the list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + level?: boolean; + /** + * Gets the list item bullet, number, or picture as a string. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listString?: boolean; + /** + * Gets the list item order number in relation to its siblings. + * + * @remarks + * [Api set: WordApi 1.3] + */ + siblingIndex?: boolean; + } + + + + /** + * Represents a footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export interface NoteItemLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * Represents a footnote or endnote reference in the main document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + reference?: Word.Interfaces.RangeLoadOptions; + /** + * Represents the note item type: footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: boolean; + } + /** + * Contains a collection of {@link Word.NoteItem} objects. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export interface NoteItemCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Represents the body object of the note item. It's the portion of the text within the footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Represents a footnote or endnote reference in the main document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + reference?: Word.Interfaces.RangeLoadOptions; + /** + * For EACH ITEM in the collection: Represents the note item type: footnote or endnote. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: boolean; + } + /** + * Represents a single paragraph in a selection, range, content control, or document body. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface ParagraphLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph isn't in a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + list?: Word.Interfaces.ListLoadOptions; + /** + * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemLoadOptions; + /** + * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions; + /** + * Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listOrNullObject?: Word.Interfaces.ListLoadOptions; + /** + * Gets the parent body of the paragraph. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table cell that contains the paragraph. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table that contains the paragraph. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + alignment?: boolean; + /** + * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * @remarks + * [Api set: WordApi 1.1] + */ + firstLineIndent?: boolean; + /** + * Indicates the paragraph is the last one inside its parent body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isLastParagraph?: boolean; + /** + * Checks whether the paragraph is a list item. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isListItem?: boolean; + /** + * Specifies the left indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + leftIndent?: boolean; + /** + * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineSpacing?: boolean; + /** + * Specifies the amount of spacing, in grid lines, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: boolean; + /** + * Specifies the amount of spacing, in grid lines, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: boolean; + /** + * Specifies the outline level for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + outlineLevel?: boolean; + /** + * Specifies the right indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + rightIndent?: boolean; + /** + * Specifies the spacing, in points, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceAfter?: boolean; + /** + * Specifies the spacing, in points, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceBefore?: boolean; + /** + * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + tableNestingLevel?: boolean; + /** + * Gets the text of the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. + * + * @remarks + * [Api set: WordApi 1.6] + */ + uniqueLocalId?: boolean; + } + /** + * Contains a collection of {@link Word.Paragraph} objects. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface ParagraphCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * For EACH ITEM in the collection: Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph isn't in a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + list?: Word.Interfaces.ListLoadOptions; + /** + * For EACH ITEM in the collection: Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemLoadOptions; + /** + * For EACH ITEM in the collection: Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions; + /** + * For EACH ITEM in the collection: Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + listOrNullObject?: Word.Interfaces.ListLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent body of the paragraph. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the paragraph. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the paragraph. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * @remarks + * [Api set: WordApi 1.1] + */ + alignment?: boolean; + /** + * For EACH ITEM in the collection: Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * @remarks + * [Api set: WordApi 1.1] + */ + firstLineIndent?: boolean; + /** + * For EACH ITEM in the collection: Indicates the paragraph is the last one inside its parent body. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isLastParagraph?: boolean; + /** + * For EACH ITEM in the collection: Checks whether the paragraph is a list item. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isListItem?: boolean; + /** + * For EACH ITEM in the collection: Specifies the left indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + leftIndent?: boolean; + /** + * For EACH ITEM in the collection: Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineSpacing?: boolean; + /** + * For EACH ITEM in the collection: Specifies the amount of spacing, in grid lines, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: boolean; + /** + * For EACH ITEM in the collection: Specifies the amount of spacing, in grid lines, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: boolean; + /** + * For EACH ITEM in the collection: Specifies the outline level for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + outlineLevel?: boolean; + /** + * For EACH ITEM in the collection: Specifies the right indent value, in points, for the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + rightIndent?: boolean; + /** + * For EACH ITEM in the collection: Specifies the spacing, in points, after the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceAfter?: boolean; + /** + * For EACH ITEM in the collection: Specifies the spacing, in points, before the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + spaceBefore?: boolean; + /** + * For EACH ITEM in the collection: Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * For EACH ITEM in the collection: Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * For EACH ITEM in the collection: Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + tableNestingLevel?: boolean; + /** + * For EACH ITEM in the collection: Gets the text of the paragraph. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * For EACH ITEM in the collection: Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. + * + * @remarks + * [Api set: WordApi 1.6] + */ + uniqueLocalId?: boolean; + } + /** + * Represents a style of paragraph in a document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export interface ParagraphFormatLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the alignment for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + alignment?: boolean; + /** + * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * @remarks + * [Api set: WordApi 1.5] + */ + firstLineIndent?: boolean; + /** + * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepTogether?: boolean; + /** + * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + keepWithNext?: boolean; + /** + * Specifies the left indent. + * + * @remarks + * [Api set: WordApi 1.5] + */ + leftIndent?: boolean; + /** + * Specifies the line spacing (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineSpacing?: boolean; + /** + * Specifies the amount of spacing (in gridlines) after the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitAfter?: boolean; + /** + * Specifies the amount of spacing (in gridlines) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + lineUnitBefore?: boolean; + /** + * Specifies whether left and right indents are the same width. + * + * @remarks + * [Api set: WordApi 1.5] + */ + mirrorIndents?: boolean; + /** + * Specifies the outline level for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + outlineLevel?: boolean; + /** + * Specifies the right indent (in points) for the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + rightIndent?: boolean; + /** + * Specifies the amount of spacing (in points) after the specified paragraph or text column. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceAfter?: boolean; + /** + * Specifies the spacing (in points) before the specified paragraphs. + * + * @remarks + * [Api set: WordApi 1.5] + */ + spaceBefore?: boolean; + /** + * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + widowControl?: boolean; + } + /** + * Represents a contiguous area in a document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface RangeLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Gets the parent body of the range. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the currently supported content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the currently supported content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the table that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the table cell that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table cell that contains the range. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table that contains the range. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.3] + */ + hyperlink?: boolean; + /** + * Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isEmpty?: boolean; + /** + * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * Gets the text of the range. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + } + /** + * Contains a collection of {@link Word.Range} objects. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface RangeCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the text format of the range. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent body of the range. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Gets the currently supported content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the currently supported content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains the range. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains the range. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. + * + * @remarks + * [Api set: WordApi 1.3] + */ + hyperlink?: boolean; + /** + * For EACH ITEM in the collection: Checks whether the range length is zero. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isEmpty?: boolean; + /** + * For EACH ITEM in the collection: Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * For EACH ITEM in the collection: Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * For EACH ITEM in the collection: Gets the text of the range. + * + * @remarks + * [Api set: WordApi 1.1] + */ + text?: boolean; + } + /** + * Specifies the options to be included in a search operation. + To learn more about how to use search options in the Word JavaScript APIs, read {@link https://learn.microsoft.com/office/dev/add-ins/word/search-option-guidance | Use search options to find text in your Word add-in}. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface SearchOptionsLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignorePunct?: boolean; + /** + * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + ignoreSpace?: boolean; + /** + * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchCase?: boolean; + /** + * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchPrefix?: boolean; + /** + * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchSuffix?: boolean; + /** + * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWholeWord?: boolean; + /** + * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. + * + * @remarks + * [Api set: WordApi 1.1] + */ + matchWildcards?: boolean; + } + /** + * Represents a section in a Word document. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface SectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the body object of the section. This doesn't include the header/footer and other section metadata. + * + * @remarks + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyLoadOptions; + } + /** + * Contains the collection of the document's {@link Word.Section} objects. + * + * @remarks + * [Api set: WordApi 1.1] + */ + export interface SectionCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the body object of the section. This doesn't include the header/footer and other section metadata. + * + * @remarks + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyLoadOptions; + } + /** + * Represents a setting of the add-in. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export interface SettingLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the key of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + key?: boolean; + /** + * Specifies the value of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + value?: boolean; + } + /** + * Contains the collection of {@link Word.Setting} objects. + * + * @remarks + * [Api set: WordApi 1.4] + */ + export interface SettingCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the key of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + key?: boolean; + /** + * For EACH ITEM in the collection: Specifies the value of the setting. + * + * @remarks + * [Api set: WordApi 1.4] + */ + value?: boolean; + } + /** + * Contains a collection of {@link Word.Style} objects. + * + * @remarks + * [Api set: WordApi 1.5] + */ + export interface StyleCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + + /** + * For EACH ITEM in the collection: Gets a font object that represents the character formatting of the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + font?: Word.Interfaces.FontLoadOptions; + + /** + * For EACH ITEM in the collection: Gets a ParagraphFormat object that represents the paragraph settings for the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + paragraphFormat?: Word.Interfaces.ParagraphFormatLoadOptions; + /** + * For EACH ITEM in the collection: Gets a Shading object that represents the shading for the specified style. Not applicable to List style. + * + * @remarks + * [Api set: WordApi 1.6] + */ + shading?: Word.Interfaces.ShadingLoadOptions; + /** + * For EACH ITEM in the collection: Gets a TableStyle object representing Style properties that can be applied to a table. + * + * @remarks + * [Api set: WordApi 1.6] + */ + tableStyle?: Word.Interfaces.TableStyleLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the name of an existing style to use as the base formatting of another style. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. + */ + baseStyle?: boolean; + /** + * For EACH ITEM in the collection: Gets whether the specified style is a built-in style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + builtIn?: boolean; + /** + * For EACH ITEM in the collection: Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + inUse?: boolean; + /** + * For EACH ITEM in the collection: Gets whether a style is a linked style that can be used for both paragraph and character formatting. + * + * @remarks + * [Api set: WordApi 1.5] + */ + linked?: boolean; + /** + * For EACH ITEM in the collection: Gets the name of a style in the language of the user. + * + * @remarks + * [Api set: WordApi 1.5] + */ + nameLocal?: boolean; + /** + * For EACH ITEM in the collection: Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. + */ + nextParagraphStyle?: boolean; + /** + * For EACH ITEM in the collection: Specifies the priority. + * + * @remarks + * [Api set: WordApi 1.5] + */ + priority?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the style corresponds to an available quick style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + quickStyle?: boolean; + /** + * For EACH ITEM in the collection: Gets the style type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + unhideWhenUsed?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. + * + * @remarks + * [Api set: WordApi 1.5] + */ + visibility?: boolean; + } + /** + * Represents a style in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface StyleLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + + /** + * Gets a font object that represents the character formatting of the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + font?: Word.Interfaces.FontLoadOptions; + + /** + * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + paragraphFormat?: Word.Interfaces.ParagraphFormatLoadOptions; + /** + * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. + * + * @remarks + * [Api set: WordApi 1.6] + */ + shading?: Word.Interfaces.ShadingLoadOptions; + /** + * Gets a TableStyle object representing Style properties that can be applied to a table. + * + * @remarks + * [Api set: WordApi 1.6] + */ + tableStyle?: Word.Interfaces.TableStyleLoadOptions; + /** + * Specifies the name of an existing style to use as the base formatting of another style. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. + */ + baseStyle?: boolean; + /** + * Gets whether the specified style is a built-in style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + builtIn?: boolean; + /** + * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + inUse?: boolean; + /** + * Gets whether a style is a linked style that can be used for both paragraph and character formatting. + * + * @remarks + * [Api set: WordApi 1.5] + */ + linked?: boolean; + /** + * Gets the name of a style in the language of the user. + * + * @remarks + * [Api set: WordApi 1.5] + */ + nameLocal?: boolean; + /** + * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. + * + * @remarks + * [Api set: WordApi 1.5] + * + * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. + */ + nextParagraphStyle?: boolean; + /** + * Specifies the priority. + * + * @remarks + * [Api set: WordApi 1.5] + */ + priority?: boolean; + /** + * Specifies whether the style corresponds to an available quick style. + * + * @remarks + * [Api set: WordApi 1.5] + */ + quickStyle?: boolean; + /** + * Gets the style type. + * + * @remarks + * [Api set: WordApi 1.5] + */ + type?: boolean; + /** + * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. + * + * @remarks + * [Api set: WordApi 1.5] + */ + unhideWhenUsed?: boolean; + /** + * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. + * + * @remarks + * [Api set: WordApi 1.5] + */ + visibility?: boolean; + } + /** + * Represents the shading object. + * + * @remarks + * [Api set: WordApi 1.6] + */ + export interface ShadingLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. + * + * @remarks + * [Api set: WordApi 1.6] + */ + backgroundPatternColor?: boolean; + + + } + /** + * Represents a table in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface TableLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Gets the parent body of the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * Gets the table that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the table cell that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table cell that contains this table. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * Gets the table that contains this table. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + alignment?: boolean; + /** + * Specifies the number of header rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + headerRowCount?: boolean; + /** + * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * Indicates whether all of the table rows are uniform. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isUniform?: boolean; + /** + * Gets the nesting level of the table. Top-level tables have level 1. + * + * @remarks + * [Api set: WordApi 1.3] + */ + nestingLevel?: boolean; + /** + * Gets the number of rows in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowCount?: boolean; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + style?: boolean; + /** + * Specifies whether the table has banded columns. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedColumns?: boolean; + /** + * Specifies whether the table has banded rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedRows?: boolean; + /** + * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * Specifies whether the table has a first column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleFirstColumn?: boolean; + /** + * Specifies whether the table has a last column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleLastColumn?: boolean; + /** + * Specifies whether the table has a total (last) row with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleTotalRow?: boolean; + /** + * Specifies the text values in the table, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: boolean; + /** + * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + /** + * Specifies the width of the table in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * Represents the TableStyle object. + * + * @remarks + * [Api set: WordApi 1.6] + */ + export interface TableStyleLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + + + /** + * Specifies the amount of space to add between the contents and the bottom borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + bottomCellMargin?: boolean; + /** + * Specifies the spacing (in points) between the cells in a table style. + * + * @remarks + * [Api set: WordApi 1.6] + */ + cellSpacing?: boolean; + /** + * Specifies the amount of space to add between the contents and the left borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + leftCellMargin?: boolean; + /** + * Specifies the amount of space to add between the contents and the right borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + rightCellMargin?: boolean; + /** + * Specifies the amount of space to add between the contents and the top borders of the cells. + * + * @remarks + * [Api set: WordApi 1.6] + */ + topCellMargin?: boolean; + } + /** + * Contains the collection of the document's Table objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface TableCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent body of the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table cell that contains this table. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * For EACH ITEM in the collection: Gets the table that contains this table. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + alignment?: boolean; + /** + * For EACH ITEM in the collection: Specifies the number of header rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + headerRowCount?: boolean; + /** + * For EACH ITEM in the collection: Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * For EACH ITEM in the collection: Indicates whether all of the table rows are uniform. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isUniform?: boolean; + /** + * For EACH ITEM in the collection: Gets the nesting level of the table. Top-level tables have level 1. + * + * @remarks + * [Api set: WordApi 1.3] + */ + nestingLevel?: boolean; + /** + * For EACH ITEM in the collection: Gets the number of rows in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowCount?: boolean; + /** + * For EACH ITEM in the collection: Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * For EACH ITEM in the collection: Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + style?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the table has banded columns. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedColumns?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the table has banded rows. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBandedRows?: boolean; + /** + * For EACH ITEM in the collection: Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the table has a first column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleFirstColumn?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the table has a last column with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleLastColumn?: boolean; + /** + * For EACH ITEM in the collection: Specifies whether the table has a total (last) row with a special style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + styleTotalRow?: boolean; + /** + * For EACH ITEM in the collection: Specifies the text values in the table, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: boolean; + /** + * For EACH ITEM in the collection: Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + /** + * For EACH ITEM in the collection: Specifies the width of the table in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * Represents a row in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface TableRowLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * Gets parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the number of cells in the row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cellCount?: boolean; + /** + * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isHeader?: boolean; + /** + * Specifies the preferred height of the row in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + preferredHeight?: boolean; + /** + * Gets the index of the row in its parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowIndex?: boolean; + /** + * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * Specifies the text values in the row, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: boolean; + /** + * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + } + /** + * Contains the collection of the document's TableRow objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface TableRowCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other properties. + * + * @remarks + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * For EACH ITEM in the collection: Gets parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the number of cells in the row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cellCount?: boolean; + /** + * For EACH ITEM in the collection: Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * For EACH ITEM in the collection: Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. + * + * @remarks + * [Api set: WordApi 1.3] + */ + isHeader?: boolean; + /** + * For EACH ITEM in the collection: Specifies the preferred height of the row in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + preferredHeight?: boolean; + /** + * For EACH ITEM in the collection: Gets the index of the row in its parent table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowIndex?: boolean; + /** + * For EACH ITEM in the collection: Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * For EACH ITEM in the collection: Specifies the text values in the row, as a 2D JavaScript array. + * + * @remarks + * [Api set: WordApi 1.3] + */ + values?: boolean; + /** + * For EACH ITEM in the collection: Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + } + /** + * Represents a table cell in a Word document. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface TableCellLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the body object of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * Gets the parent row of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentRow?: Word.Interfaces.TableRowLoadOptions; + /** + * Gets the parent table of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * Gets the index of the cell in its row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cellIndex?: boolean; + /** + * Specifies the width of the cell's column in points. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + */ + columnWidth?: boolean; + /** + * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * Gets the index of the cell's row in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowIndex?: boolean; + /** + * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * Specifies the text of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: boolean; + /** + * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + /** + * Gets the width of the cell in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * Contains the collection of the document's TableCell objects. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface TableCellCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the body object of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent row of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentRow?: Word.Interfaces.TableRowLoadOptions; + /** + * For EACH ITEM in the collection: Gets the parent table of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * For EACH ITEM in the collection: Gets the index of the cell in its row. + * + * @remarks + * [Api set: WordApi 1.3] + */ + cellIndex?: boolean; + /** + * For EACH ITEM in the collection: Specifies the width of the cell's column in points. This is applicable to uniform tables. + * + * @remarks + * [Api set: WordApi 1.3] + */ + columnWidth?: boolean; + /** + * For EACH ITEM in the collection: Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: boolean; + /** + * For EACH ITEM in the collection: Gets the index of the cell's row in the table. + * + * @remarks + * [Api set: WordApi 1.3] + */ + rowIndex?: boolean; + /** + * For EACH ITEM in the collection: Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * @remarks + * [Api set: WordApi 1.3] + */ + shadingColor?: boolean; + /** + * For EACH ITEM in the collection: Specifies the text of the cell. + * + * @remarks + * [Api set: WordApi 1.3] + */ + value?: boolean; + /** + * For EACH ITEM in the collection: Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. + * + * @remarks + * [Api set: WordApi 1.3] + */ + verticalAlignment?: boolean; + /** + * For EACH ITEM in the collection: Gets the width of the cell in points. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * Specifies the border style. + * + * @remarks + * [Api set: WordApi 1.3] + */ + export interface TableBorderLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the table border color. + * + * @remarks + * [Api set: WordApi 1.3] + */ + color?: boolean; + /** + * Specifies the type of the table border. + * + * @remarks + * [Api set: WordApi 1.3] + */ + type?: boolean; + /** + * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. + * + * @remarks + * [Api set: WordApi 1.3] + */ + width?: boolean; + } + /** + * Represents a tracked change in a Word document. + * + * @remarks + * [Api set: WordApi 1.6] + */ + export interface TrackedChangeLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Gets the author of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + author?: boolean; + /** + * Gets the date of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + date?: boolean; + /** + * Gets the text of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + text?: boolean; + /** + * Gets the type of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + type?: boolean; + } + /** + * Contains a collection of {@link Word.TrackedChange} objects. + * + * @remarks + * [Api set: WordApi 1.6] + */ + export interface TrackedChangeCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Gets the author of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + author?: boolean; + /** + * For EACH ITEM in the collection: Gets the date of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + date?: boolean; + /** + * For EACH ITEM in the collection: Gets the text of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + text?: boolean; + /** + * For EACH ITEM in the collection: Gets the type of the tracked change. + * + * @remarks + * [Api set: WordApi 1.6] + */ + type?: boolean; + } + } +} +export declare namespace Word { + /** + * The RequestContext object facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the request context is required to get access to the Word object model from the add-in. + */ + export class RequestContext extends OfficeExtension.ClientRequestContext { + constructor(url?: string); + readonly document: Document; + /** [Api set: WordApi 1.3] **/ + readonly application: Application; + } + /** + * Executes a batch script that performs actions on the Word object model, using the RequestContext of previously created API objects. + * @param objects - An array of previously created API objects. The array will be validated to make sure that all of the objects share the same context. The batch will use this shared RequestContext, which means that any changes applied to these objects will be picked up by `context.sync()`. + * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of `context.sync()`). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. + */ + export function run(objects: OfficeExtension.ClientObject[], batch: (context: Word.RequestContext) => Promise): Promise; + /** + * Executes a batch script that performs actions on the Word object model, using the RequestContext of a previously created API object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + * @param object - A previously created API object. The batch will use the same RequestContext as the passed-in object, which means that any changes applied to the object will be picked up by `context.sync()`. + * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of `context.sync()`). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. + */ + export function run(object: OfficeExtension.ClientObject, batch: (context: Word.RequestContext) => Promise): Promise; + /** + * Executes a batch script that performs actions on the Word object model, using a new RequestContext. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of `context.sync()`). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. + */ + export function run(batch: (context: Word.RequestContext) => Promise): Promise; +} + + +//////////////////////////////////////////////////////////////// +//////////////////////// End Word APIs ///////////////////////// +//////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/generate-docs/api-extractor-inputs-word-release/word_desktop_1_1/word.d.ts b/generate-docs/api-extractor-inputs-word-release/word_desktop_1_1/word.d.ts index 25f9dbc1b8..0d02d3dd6b 100644 --- a/generate-docs/api-extractor-inputs-word-release/word_desktop_1_1/word.d.ts +++ b/generate-docs/api-extractor-inputs-word-release/word_desktop_1_1/word.d.ts @@ -747,10 +747,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the body at the specified location. * @@ -1629,12 +1630,13 @@ export declare namespace Word { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ readonly checkboxContentControl: Word.CheckboxContentControl; + /** * Gets the collection of content control objects in the content control. * @@ -1642,6 +1644,7 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ readonly contentControls: Word.ContentControlCollection; + /** * Gets the collection of endnotes in the content control. * @@ -2281,6 +2284,8 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.ContentControlCollectionData; } + + /** * Specifies the options that define which content controls are returned. * @@ -2289,12 +2294,13 @@ export declare namespace Word { */ export interface ContentControlOptions { /** - * An array of content control types, item must be 'RichText', 'PlainText', or 'CheckBox'. + * An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. * * @remarks * [Api set: WordApi 1.5] * - * Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. + * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9. */ types: Word.ContentControlType[]; } @@ -3127,9 +3133,24 @@ export declare namespace Word { * @remarks * [Api set: WordApi 1.6] * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. */ - importStylesFromJson(stylesJson: string): OfficeExtension.ClientResult; + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult; + /** + * Import styles from a JSON-formatted string. + * + * @remarks + * [Api set: WordApi 1.6] + * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * + * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehaviorString - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. + */ + importStylesFromJson(stylesJson: string, importedStylesConflictBehaviorString?: "Ignore" | "Overwrite" | "CreateNew"): OfficeExtension.ClientResult; /** * Inserts a document into the target document at a specific location with additional properties. Headers, footers, watermarks, and other section properties are copied by default. @@ -3690,6 +3711,8 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.DocumentPropertiesData; } + + /** * Represents a field. * @@ -5687,10 +5710,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the paragraph at the specified location. * @@ -6444,10 +6468,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts an endnote. The endnote reference is placed after the range. * @@ -12981,6 +13006,32 @@ export declare namespace Word { */ compareTargetNew = "CompareTargetNew", } + /** + * Specifies how to handle any conflicts, that is, when imported styles have the same name as existing styles in the current document. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + enum ImportedStylesConflictBehavior { + /** + * Ignore conflicting imported styles and keep the existing version of those styles in the current document. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + ignore = "Ignore", + /** + * Overwrite the existing styles in the current document. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + overwrite = "Overwrite", + /** + * Rename conflicting imported styles so that both versions are kept in the current document. For example, if MyStyle already exists in the document, then the imported version could be added as MyStyle1. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + createNew = "CreateNew", + } enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", @@ -13217,7 +13268,7 @@ export declare namespace Word { /** An interface for updating data on the `ContentControl` object, for use in `contentControl.set({ ... })`. */ export interface ContentControlUpdateData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -13305,6 +13356,16 @@ export declare namespace Word { export interface ContentControlCollectionUpdateData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ + export interface ContentControlListItemUpdateData { + + + + } + /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ + export interface ContentControlListItemCollectionUpdateData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ export interface CustomPropertyUpdateData { /** @@ -14812,12 +14873,13 @@ export declare namespace Word { /** An interface describing the data returned by calling `contentControl.toJSON()`. */ export interface ContentControlData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ checkboxContentControl?: Word.Interfaces.CheckboxContentControlData; + /** * Gets the collection of content control objects in the content control. * @@ -14825,6 +14887,7 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ contentControls?: Word.Interfaces.ContentControlData[]; + /** * Gets the collection of field objects in the content control. * @@ -14972,6 +15035,16 @@ export declare namespace Word { export interface ContentControlCollectionData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ + export interface ContentControlListItemData { + + + + } + /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ + export interface ContentControlListItemCollectionData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface describing the data returned by calling `customProperty.toJSON()`. */ export interface CustomPropertyData { /** @@ -15265,6 +15338,12 @@ export declare namespace Word { */ title?: string; } + /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ + export interface DropDownListContentControlData { + } + /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ + export interface ComboBoxContentControlData { + } /** An interface describing the data returned by calling `field.toJSON()`. */ export interface FieldData { /** @@ -17241,7 +17320,7 @@ export declare namespace Word { */ $all?: boolean; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -17414,7 +17493,7 @@ export declare namespace Word { */ $all?: boolean; /** - * For EACH ITEM in the collection: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * For EACH ITEM in the collection: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -17575,6 +17654,8 @@ export declare namespace Word { */ type?: boolean; } + + /** * Represents a custom property. * diff --git a/generate-docs/api-extractor-inputs-word-release/word_online/word-init.d.ts b/generate-docs/api-extractor-inputs-word-release/word_online/word-init.d.ts index 25f9dbc1b8..0e8b61e8e3 100644 --- a/generate-docs/api-extractor-inputs-word-release/word_online/word-init.d.ts +++ b/generate-docs/api-extractor-inputs-word-release/word_online/word-init.d.ts @@ -747,10 +747,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the body at the specified location. * @@ -1629,12 +1630,19 @@ export declare namespace Word { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ readonly checkboxContentControl: Word.CheckboxContentControl; + /** + * Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly comboBoxContentControl: Word.ComboBoxContentControl; /** * Gets the collection of content control objects in the content control. * @@ -1642,6 +1650,13 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ readonly contentControls: Word.ContentControlCollection; + /** + * Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly dropDownListContentControl: Word.DropDownListContentControl; /** * Gets the collection of endnotes in the content control. * @@ -2281,6 +2296,152 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.ContentControlCollectionData; } + /** + * Represents a list item in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class ContentControlListItem extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText: string; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index: number; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value: string; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ContentControlListItemUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.ContentControlListItem): void; + /** + * Deletes the list item. + * + * @remarks + * [Api set: WordApi 1.9] + */ + delete(): void; + /** + * Selects the list item and sets the text of the content control to the value of the list item. + * + * @remarks + * [Api set: WordApi 1.9] + */ + select(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ContentControlListItemLoadOptions): Word.ContentControlListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ContentControlListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ContentControlListItem; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ContentControlListItem; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ContentControlListItem; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ContentControlListItem` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ContentControlListItemData; + } + /** + * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class ContentControlListItemCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.ContentControlListItem[]; + /** + * Gets the first list item in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.9] + */ + getFirst(): Word.ContentControlListItem; + /** + * Gets the first list item in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. + For further information, + see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.9] + */ + getFirstOrNullObject(): Word.ContentControlListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ContentControlListItemCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ContentControlListItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ContentControlListItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ContentControlListItemCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ContentControlListItemCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ContentControlListItemCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ContentControlListItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.ContentControlListItemCollectionData; + } /** * Specifies the options that define which content controls are returned. * @@ -2289,12 +2450,13 @@ export declare namespace Word { */ export interface ContentControlOptions { /** - * An array of content control types, item must be 'RichText', 'PlainText', or 'CheckBox'. + * An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. * * @remarks * [Api set: WordApi 1.5] * - * Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. + * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9. */ types: Word.ContentControlType[]; } @@ -3127,9 +3289,24 @@ export declare namespace Word { * @remarks * [Api set: WordApi 1.6] * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * + * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. + */ + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult; + /** + * Import styles from a JSON-formatted string. + * + * @remarks + * [Api set: WordApi 1.6] + * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehaviorString - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. */ - importStylesFromJson(stylesJson: string): OfficeExtension.ClientResult; + importStylesFromJson(stylesJson: string, importedStylesConflictBehaviorString?: "Ignore" | "Overwrite" | "CreateNew"): OfficeExtension.ClientResult; /** * Inserts a document into the target document at a specific location with additional properties. Headers, footers, watermarks, and other section properties are copied by default. @@ -3690,6 +3867,132 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.DocumentPropertiesData; } + /** + * The data specific to content controls of type DropDownList. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class DropDownListContentControl extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of list items in the dropdown list content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly listItems: Word.ContentControlListItemCollection; + /** + * Adds a new list item to this dropdown list content control and returns a {@link Word.ContentControlListItem} object. + * + * @remarks + * [Api set: WordApi 1.9] + * + * @param displayText - Required. Display text of the list item. + * @param value - Optional. Value of the list item. + * @param index - Optional. Index location of the new item in the list. If an item exists at the position specified, the existing item is pushed down in the list. If omitted, the new item is added to the end of the list. + */ + addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem; + /** + * Deletes all list items in this dropdown list content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + deleteAllListItems(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.DropDownListContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.DropDownListContentControl; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.DropDownListContentControl; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.DropDownListContentControl; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.DropDownListContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DropDownListContentControlData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.DropDownListContentControlData; + } + /** + * The data specific to content controls of type 'ComboBox'. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class ComboBoxContentControl extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of list items in the combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly listItems: Word.ContentControlListItemCollection; + /** + * Adds a new list item to this combo box content control and returns a {@link Word.ContentControlListItem} object. + * + * @remarks + * [Api set: WordApi 1.9] + * + * @param displayText - Required. Display text of the list item. + * @param value - Optional. Value of the list item. + * @param index - Optional. Index location of the new item in the list. If an item exists at the position specified, the existing item is pushed down in the list. If omitted, the new item is added to the end of the list. + */ + addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem; + /** + * Deletes all list items in this combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + deleteAllListItems(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ComboBoxContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ComboBoxContentControl; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ComboBoxContentControl; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ComboBoxContentControl; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ComboBoxContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ComboBoxContentControlData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ComboBoxContentControlData; + } /** * Represents a field. * @@ -5687,10 +5990,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the paragraph at the specified location. * @@ -6444,10 +6748,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts an endnote. The endnote reference is placed after the range. * @@ -12981,6 +13286,32 @@ export declare namespace Word { */ compareTargetNew = "CompareTargetNew", } + /** + * Specifies how to handle any conflicts, that is, when imported styles have the same name as existing styles in the current document. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + enum ImportedStylesConflictBehavior { + /** + * Ignore conflicting imported styles and keep the existing version of those styles in the current document. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + ignore = "Ignore", + /** + * Overwrite the existing styles in the current document. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + overwrite = "Overwrite", + /** + * Rename conflicting imported styles so that both versions are kept in the current document. For example, if MyStyle already exists in the document, then the imported version could be added as MyStyle1. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + createNew = "CreateNew", + } enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", @@ -13217,7 +13548,7 @@ export declare namespace Word { /** An interface for updating data on the `ContentControl` object, for use in `contentControl.set({ ... })`. */ export interface ContentControlUpdateData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -13305,6 +13636,34 @@ export declare namespace Word { export interface ContentControlCollectionUpdateData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ + export interface ContentControlListItemUpdateData { + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: string; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: number; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: string; + } + /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ + export interface ContentControlListItemCollectionUpdateData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ export interface CustomPropertyUpdateData { /** @@ -14812,12 +15171,19 @@ export declare namespace Word { /** An interface describing the data returned by calling `contentControl.toJSON()`. */ export interface ContentControlData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ checkboxContentControl?: Word.Interfaces.CheckboxContentControlData; + /** + * Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + comboBoxContentControl?: Word.Interfaces.ComboBoxContentControlData; /** * Gets the collection of content control objects in the content control. * @@ -14825,6 +15191,13 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ contentControls?: Word.Interfaces.ContentControlData[]; + /** + * Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + dropDownListContentControl?: Word.Interfaces.DropDownListContentControlData; /** * Gets the collection of field objects in the content control. * @@ -14972,6 +15345,34 @@ export declare namespace Word { export interface ContentControlCollectionData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ + export interface ContentControlListItemData { + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: string; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: number; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: string; + } + /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ + export interface ContentControlListItemCollectionData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface describing the data returned by calling `customProperty.toJSON()`. */ export interface CustomPropertyData { /** @@ -15265,6 +15666,12 @@ export declare namespace Word { */ title?: string; } + /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ + export interface DropDownListContentControlData { + } + /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ + export interface ComboBoxContentControlData { + } /** An interface describing the data returned by calling `field.toJSON()`. */ export interface FieldData { /** @@ -17241,7 +17648,7 @@ export declare namespace Word { */ $all?: boolean; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -17414,7 +17821,7 @@ export declare namespace Word { */ $all?: boolean; /** - * For EACH ITEM in the collection: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * For EACH ITEM in the collection: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -17575,6 +17982,72 @@ export declare namespace Word { */ type?: boolean; } + /** + * Represents a list item in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export interface ContentControlListItemLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: boolean; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: boolean; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: boolean; + } + /** + * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export interface ContentControlListItemCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: boolean; + /** + * For EACH ITEM in the collection: Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: boolean; + /** + * For EACH ITEM in the collection: Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: boolean; + } /** * Represents a custom property. * diff --git a/generate-docs/api-extractor-inputs-word-release/word_online/word-online1.d.ts b/generate-docs/api-extractor-inputs-word-release/word_online/word-online1.d.ts index ce15a25c64..c8978a2f72 100644 --- a/generate-docs/api-extractor-inputs-word-release/word_online/word-online1.d.ts +++ b/generate-docs/api-extractor-inputs-word-release/word_online/word-online1.d.ts @@ -747,10 +747,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the body at the specified location. * @@ -1429,12 +1430,19 @@ export declare namespace Word { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ readonly checkboxContentControl: Word.CheckboxContentControl; + /** + * Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly comboBoxContentControl: Word.ComboBoxContentControl; /** * Gets the collection of content control objects in the content control. * @@ -1442,6 +1450,13 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ readonly contentControls: Word.ContentControlCollection; + /** + * Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly dropDownListContentControl: Word.DropDownListContentControl; /** * Gets the collection of endnotes in the content control. * @@ -2081,6 +2096,152 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.ContentControlCollectionData; } + /** + * Represents a list item in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class ContentControlListItem extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText: string; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index: number; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value: string; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ContentControlListItemUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.ContentControlListItem): void; + /** + * Deletes the list item. + * + * @remarks + * [Api set: WordApi 1.9] + */ + delete(): void; + /** + * Selects the list item and sets the text of the content control to the value of the list item. + * + * @remarks + * [Api set: WordApi 1.9] + */ + select(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ContentControlListItemLoadOptions): Word.ContentControlListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ContentControlListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ContentControlListItem; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ContentControlListItem; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ContentControlListItem; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ContentControlListItem` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ContentControlListItemData; + } + /** + * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class ContentControlListItemCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.ContentControlListItem[]; + /** + * Gets the first list item in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.9] + */ + getFirst(): Word.ContentControlListItem; + /** + * Gets the first list item in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. + For further information, + see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.9] + */ + getFirstOrNullObject(): Word.ContentControlListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ContentControlListItemCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ContentControlListItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ContentControlListItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ContentControlListItemCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ContentControlListItemCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ContentControlListItemCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ContentControlListItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.ContentControlListItemCollectionData; + } /** * Specifies the options that define which content controls are returned. * @@ -2089,12 +2250,13 @@ export declare namespace Word { */ export interface ContentControlOptions { /** - * An array of content control types, item must be 'RichText', 'PlainText', or 'CheckBox'. + * An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. * * @remarks * [Api set: WordApi 1.5] * - * Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. + * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9. */ types: Word.ContentControlType[]; } @@ -2918,9 +3080,24 @@ export declare namespace Word { * @remarks * [Api set: WordApi 1.6] * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * + * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. + */ + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult; + /** + * Import styles from a JSON-formatted string. + * + * @remarks + * [Api set: WordApi 1.6] + * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehaviorString - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. */ - importStylesFromJson(stylesJson: string): OfficeExtension.ClientResult; + importStylesFromJson(stylesJson: string, importedStylesConflictBehaviorString?: "Ignore" | "Overwrite" | "CreateNew"): OfficeExtension.ClientResult; /** * Inserts a document into the target document at a specific location with additional properties. Headers, footers, watermarks, and other section properties are copied by default. @@ -3481,6 +3658,132 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.DocumentPropertiesData; } + /** + * The data specific to content controls of type DropDownList. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class DropDownListContentControl extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of list items in the dropdown list content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly listItems: Word.ContentControlListItemCollection; + /** + * Adds a new list item to this dropdown list content control and returns a {@link Word.ContentControlListItem} object. + * + * @remarks + * [Api set: WordApi 1.9] + * + * @param displayText - Required. Display text of the list item. + * @param value - Optional. Value of the list item. + * @param index - Optional. Index location of the new item in the list. If an item exists at the position specified, the existing item is pushed down in the list. If omitted, the new item is added to the end of the list. + */ + addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem; + /** + * Deletes all list items in this dropdown list content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + deleteAllListItems(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.DropDownListContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.DropDownListContentControl; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.DropDownListContentControl; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.DropDownListContentControl; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.DropDownListContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DropDownListContentControlData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.DropDownListContentControlData; + } + /** + * The data specific to content controls of type 'ComboBox'. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class ComboBoxContentControl extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of list items in the combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly listItems: Word.ContentControlListItemCollection; + /** + * Adds a new list item to this combo box content control and returns a {@link Word.ContentControlListItem} object. + * + * @remarks + * [Api set: WordApi 1.9] + * + * @param displayText - Required. Display text of the list item. + * @param value - Optional. Value of the list item. + * @param index - Optional. Index location of the new item in the list. If an item exists at the position specified, the existing item is pushed down in the list. If omitted, the new item is added to the end of the list. + */ + addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem; + /** + * Deletes all list items in this combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + deleteAllListItems(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ComboBoxContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ComboBoxContentControl; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ComboBoxContentControl; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ComboBoxContentControl; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ComboBoxContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ComboBoxContentControlData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ComboBoxContentControlData; + } /** * Represents a field. * @@ -5183,10 +5486,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the paragraph at the specified location. * @@ -5940,10 +6244,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts an endnote. The endnote reference is placed after the range. * @@ -11606,6 +11911,7 @@ export declare namespace Word { + enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", @@ -11782,7 +12088,7 @@ export declare namespace Word { /** An interface for updating data on the `ContentControl` object, for use in `contentControl.set({ ... })`. */ export interface ContentControlUpdateData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -11870,6 +12176,34 @@ export declare namespace Word { export interface ContentControlCollectionUpdateData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ + export interface ContentControlListItemUpdateData { + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: string; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: number; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: string; + } + /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ + export interface ContentControlListItemCollectionUpdateData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ export interface CustomPropertyUpdateData { /** @@ -13233,12 +13567,19 @@ export declare namespace Word { /** An interface describing the data returned by calling `contentControl.toJSON()`. */ export interface ContentControlData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ checkboxContentControl?: Word.Interfaces.CheckboxContentControlData; + /** + * Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + comboBoxContentControl?: Word.Interfaces.ComboBoxContentControlData; /** * Gets the collection of content control objects in the content control. * @@ -13246,6 +13587,13 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ contentControls?: Word.Interfaces.ContentControlData[]; + /** + * Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + dropDownListContentControl?: Word.Interfaces.DropDownListContentControlData; /** * Gets the collection of field objects in the content control. * @@ -13393,6 +13741,34 @@ export declare namespace Word { export interface ContentControlCollectionData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ + export interface ContentControlListItemData { + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: string; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: number; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: string; + } + /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ + export interface ContentControlListItemCollectionData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface describing the data returned by calling `customProperty.toJSON()`. */ export interface CustomPropertyData { /** @@ -13686,6 +14062,12 @@ export declare namespace Word { */ title?: string; } + /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ + export interface DropDownListContentControlData { + } + /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ + export interface ComboBoxContentControlData { + } /** An interface describing the data returned by calling `field.toJSON()`. */ export interface FieldData { /** @@ -15444,7 +15826,7 @@ export declare namespace Word { */ $all?: boolean; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -15617,7 +15999,7 @@ export declare namespace Word { */ $all?: boolean; /** - * For EACH ITEM in the collection: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * For EACH ITEM in the collection: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -15778,6 +16160,72 @@ export declare namespace Word { */ type?: boolean; } + /** + * Represents a list item in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export interface ContentControlListItemLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: boolean; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: boolean; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: boolean; + } + /** + * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export interface ContentControlListItemCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: boolean; + /** + * For EACH ITEM in the collection: Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: boolean; + /** + * For EACH ITEM in the collection: Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: boolean; + } /** * Represents a custom property. * diff --git a/generate-docs/api-extractor-inputs-word-release/word_online/word-online2.d.ts b/generate-docs/api-extractor-inputs-word-release/word_online/word-online2.d.ts index 85d3c95f64..fd2c2ddb8e 100644 --- a/generate-docs/api-extractor-inputs-word-release/word_online/word-online2.d.ts +++ b/generate-docs/api-extractor-inputs-word-release/word_online/word-online2.d.ts @@ -747,10 +747,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the body at the specified location. * @@ -1429,12 +1430,19 @@ export declare namespace Word { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ readonly checkboxContentControl: Word.CheckboxContentControl; + /** + * Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly comboBoxContentControl: Word.ComboBoxContentControl; /** * Gets the collection of content control objects in the content control. * @@ -1442,6 +1450,13 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ readonly contentControls: Word.ContentControlCollection; + /** + * Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly dropDownListContentControl: Word.DropDownListContentControl; /** * Gets the collection of endnotes in the content control. * @@ -2081,6 +2096,152 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.ContentControlCollectionData; } + /** + * Represents a list item in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class ContentControlListItem extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText: string; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index: number; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value: string; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ContentControlListItemUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.ContentControlListItem): void; + /** + * Deletes the list item. + * + * @remarks + * [Api set: WordApi 1.9] + */ + delete(): void; + /** + * Selects the list item and sets the text of the content control to the value of the list item. + * + * @remarks + * [Api set: WordApi 1.9] + */ + select(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ContentControlListItemLoadOptions): Word.ContentControlListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ContentControlListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ContentControlListItem; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ContentControlListItem; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ContentControlListItem; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ContentControlListItem` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ContentControlListItemData; + } + /** + * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class ContentControlListItemCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.ContentControlListItem[]; + /** + * Gets the first list item in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.9] + */ + getFirst(): Word.ContentControlListItem; + /** + * Gets the first list item in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. + For further information, + see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.9] + */ + getFirstOrNullObject(): Word.ContentControlListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ContentControlListItemCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ContentControlListItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ContentControlListItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ContentControlListItemCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ContentControlListItemCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ContentControlListItemCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ContentControlListItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.ContentControlListItemCollectionData; + } /** * Specifies the options that define which content controls are returned. * @@ -2089,12 +2250,13 @@ export declare namespace Word { */ export interface ContentControlOptions { /** - * An array of content control types, item must be 'RichText', 'PlainText', or 'CheckBox'. + * An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. * * @remarks * [Api set: WordApi 1.5] * - * Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. + * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9. */ types: Word.ContentControlType[]; } @@ -2918,9 +3080,24 @@ export declare namespace Word { * @remarks * [Api set: WordApi 1.6] * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * + * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. + */ + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult; + /** + * Import styles from a JSON-formatted string. + * + * @remarks + * [Api set: WordApi 1.6] + * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehaviorString - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. */ - importStylesFromJson(stylesJson: string): OfficeExtension.ClientResult; + importStylesFromJson(stylesJson: string, importedStylesConflictBehaviorString?: "Ignore" | "Overwrite" | "CreateNew"): OfficeExtension.ClientResult; /** * Inserts a document into the target document at a specific location with additional properties. Headers, footers, watermarks, and other section properties are copied by default. @@ -3432,6 +3609,132 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.DocumentPropertiesData; } + /** + * The data specific to content controls of type DropDownList. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class DropDownListContentControl extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of list items in the dropdown list content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly listItems: Word.ContentControlListItemCollection; + /** + * Adds a new list item to this dropdown list content control and returns a {@link Word.ContentControlListItem} object. + * + * @remarks + * [Api set: WordApi 1.9] + * + * @param displayText - Required. Display text of the list item. + * @param value - Optional. Value of the list item. + * @param index - Optional. Index location of the new item in the list. If an item exists at the position specified, the existing item is pushed down in the list. If omitted, the new item is added to the end of the list. + */ + addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem; + /** + * Deletes all list items in this dropdown list content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + deleteAllListItems(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.DropDownListContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.DropDownListContentControl; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.DropDownListContentControl; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.DropDownListContentControl; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.DropDownListContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DropDownListContentControlData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.DropDownListContentControlData; + } + /** + * The data specific to content controls of type 'ComboBox'. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class ComboBoxContentControl extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of list items in the combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly listItems: Word.ContentControlListItemCollection; + /** + * Adds a new list item to this combo box content control and returns a {@link Word.ContentControlListItem} object. + * + * @remarks + * [Api set: WordApi 1.9] + * + * @param displayText - Required. Display text of the list item. + * @param value - Optional. Value of the list item. + * @param index - Optional. Index location of the new item in the list. If an item exists at the position specified, the existing item is pushed down in the list. If omitted, the new item is added to the end of the list. + */ + addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem; + /** + * Deletes all list items in this combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + deleteAllListItems(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ComboBoxContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ComboBoxContentControl; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ComboBoxContentControl; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ComboBoxContentControl; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ComboBoxContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ComboBoxContentControlData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ComboBoxContentControlData; + } /** * Represents a field. * @@ -5134,10 +5437,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the paragraph at the specified location. * @@ -5891,10 +6195,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts an endnote. The endnote reference is placed after the range. * @@ -11557,6 +11862,7 @@ export declare namespace Word { + enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", @@ -11733,7 +12039,7 @@ export declare namespace Word { /** An interface for updating data on the `ContentControl` object, for use in `contentControl.set({ ... })`. */ export interface ContentControlUpdateData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -11821,6 +12127,34 @@ export declare namespace Word { export interface ContentControlCollectionUpdateData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ + export interface ContentControlListItemUpdateData { + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: string; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: number; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: string; + } + /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ + export interface ContentControlListItemCollectionUpdateData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ export interface CustomPropertyUpdateData { /** @@ -13184,12 +13518,19 @@ export declare namespace Word { /** An interface describing the data returned by calling `contentControl.toJSON()`. */ export interface ContentControlData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ checkboxContentControl?: Word.Interfaces.CheckboxContentControlData; + /** + * Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + comboBoxContentControl?: Word.Interfaces.ComboBoxContentControlData; /** * Gets the collection of content control objects in the content control. * @@ -13197,6 +13538,13 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ contentControls?: Word.Interfaces.ContentControlData[]; + /** + * Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + dropDownListContentControl?: Word.Interfaces.DropDownListContentControlData; /** * Gets the collection of field objects in the content control. * @@ -13344,6 +13692,34 @@ export declare namespace Word { export interface ContentControlCollectionData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ + export interface ContentControlListItemData { + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: string; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: number; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: string; + } + /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ + export interface ContentControlListItemCollectionData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface describing the data returned by calling `customProperty.toJSON()`. */ export interface CustomPropertyData { /** @@ -13637,6 +14013,12 @@ export declare namespace Word { */ title?: string; } + /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ + export interface DropDownListContentControlData { + } + /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ + export interface ComboBoxContentControlData { + } /** An interface describing the data returned by calling `field.toJSON()`. */ export interface FieldData { /** @@ -15395,7 +15777,7 @@ export declare namespace Word { */ $all?: boolean; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -15568,7 +15950,7 @@ export declare namespace Word { */ $all?: boolean; /** - * For EACH ITEM in the collection: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * For EACH ITEM in the collection: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -15729,6 +16111,72 @@ export declare namespace Word { */ type?: boolean; } + /** + * Represents a list item in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export interface ContentControlListItemLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: boolean; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: boolean; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: boolean; + } + /** + * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export interface ContentControlListItemCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: boolean; + /** + * For EACH ITEM in the collection: Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: boolean; + /** + * For EACH ITEM in the collection: Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: boolean; + } /** * Represents a custom property. * diff --git a/generate-docs/api-extractor-inputs-word-release/word_online/word-online3.d.ts b/generate-docs/api-extractor-inputs-word-release/word_online/word-online3.d.ts index 9b38a4b42f..837f227263 100644 --- a/generate-docs/api-extractor-inputs-word-release/word_online/word-online3.d.ts +++ b/generate-docs/api-extractor-inputs-word-release/word_online/word-online3.d.ts @@ -747,10 +747,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the body at the specified location. * @@ -1429,12 +1430,19 @@ export declare namespace Word { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ readonly checkboxContentControl: Word.CheckboxContentControl; + /** + * Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly comboBoxContentControl: Word.ComboBoxContentControl; /** * Gets the collection of content control objects in the content control. * @@ -1442,6 +1450,13 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ readonly contentControls: Word.ContentControlCollection; + /** + * Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly dropDownListContentControl: Word.DropDownListContentControl; /** * Gets the collection of endnotes in the content control. * @@ -2081,6 +2096,152 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.ContentControlCollectionData; } + /** + * Represents a list item in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class ContentControlListItem extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText: string; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index: number; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value: string; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ContentControlListItemUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.ContentControlListItem): void; + /** + * Deletes the list item. + * + * @remarks + * [Api set: WordApi 1.9] + */ + delete(): void; + /** + * Selects the list item and sets the text of the content control to the value of the list item. + * + * @remarks + * [Api set: WordApi 1.9] + */ + select(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ContentControlListItemLoadOptions): Word.ContentControlListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ContentControlListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ContentControlListItem; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ContentControlListItem; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ContentControlListItem; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ContentControlListItem` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ContentControlListItemData; + } + /** + * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class ContentControlListItemCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.ContentControlListItem[]; + /** + * Gets the first list item in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.9] + */ + getFirst(): Word.ContentControlListItem; + /** + * Gets the first list item in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. + For further information, + see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.9] + */ + getFirstOrNullObject(): Word.ContentControlListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ContentControlListItemCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ContentControlListItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ContentControlListItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ContentControlListItemCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ContentControlListItemCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ContentControlListItemCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ContentControlListItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.ContentControlListItemCollectionData; + } /** * Specifies the options that define which content controls are returned. * @@ -2089,12 +2250,13 @@ export declare namespace Word { */ export interface ContentControlOptions { /** - * An array of content control types, item must be 'RichText', 'PlainText', or 'CheckBox'. + * An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. * * @remarks * [Api set: WordApi 1.5] * - * Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. + * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9. */ types: Word.ContentControlType[]; } @@ -2918,9 +3080,24 @@ export declare namespace Word { * @remarks * [Api set: WordApi 1.6] * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * + * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. + */ + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult; + /** + * Import styles from a JSON-formatted string. + * + * @remarks + * [Api set: WordApi 1.6] + * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehaviorString - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. */ - importStylesFromJson(stylesJson: string): OfficeExtension.ClientResult; + importStylesFromJson(stylesJson: string, importedStylesConflictBehaviorString?: "Ignore" | "Overwrite" | "CreateNew"): OfficeExtension.ClientResult; /** * Inserts a document into the target document at a specific location with additional properties. Headers, footers, watermarks, and other section properties are copied by default. @@ -3396,6 +3573,132 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.DocumentPropertiesData; } + /** + * The data specific to content controls of type DropDownList. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class DropDownListContentControl extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of list items in the dropdown list content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly listItems: Word.ContentControlListItemCollection; + /** + * Adds a new list item to this dropdown list content control and returns a {@link Word.ContentControlListItem} object. + * + * @remarks + * [Api set: WordApi 1.9] + * + * @param displayText - Required. Display text of the list item. + * @param value - Optional. Value of the list item. + * @param index - Optional. Index location of the new item in the list. If an item exists at the position specified, the existing item is pushed down in the list. If omitted, the new item is added to the end of the list. + */ + addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem; + /** + * Deletes all list items in this dropdown list content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + deleteAllListItems(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.DropDownListContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.DropDownListContentControl; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.DropDownListContentControl; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.DropDownListContentControl; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.DropDownListContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DropDownListContentControlData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.DropDownListContentControlData; + } + /** + * The data specific to content controls of type 'ComboBox'. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class ComboBoxContentControl extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of list items in the combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly listItems: Word.ContentControlListItemCollection; + /** + * Adds a new list item to this combo box content control and returns a {@link Word.ContentControlListItem} object. + * + * @remarks + * [Api set: WordApi 1.9] + * + * @param displayText - Required. Display text of the list item. + * @param value - Optional. Value of the list item. + * @param index - Optional. Index location of the new item in the list. If an item exists at the position specified, the existing item is pushed down in the list. If omitted, the new item is added to the end of the list. + */ + addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem; + /** + * Deletes all list items in this combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + deleteAllListItems(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ComboBoxContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ComboBoxContentControl; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ComboBoxContentControl; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ComboBoxContentControl; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ComboBoxContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ComboBoxContentControlData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ComboBoxContentControlData; + } /** * Represents a field. * @@ -5098,10 +5401,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the paragraph at the specified location. * @@ -5855,10 +6159,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts an endnote. The endnote reference is placed after the range. * @@ -11521,6 +11826,7 @@ export declare namespace Word { + enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", @@ -11697,7 +12003,7 @@ export declare namespace Word { /** An interface for updating data on the `ContentControl` object, for use in `contentControl.set({ ... })`. */ export interface ContentControlUpdateData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -11785,6 +12091,34 @@ export declare namespace Word { export interface ContentControlCollectionUpdateData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ + export interface ContentControlListItemUpdateData { + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: string; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: number; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: string; + } + /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ + export interface ContentControlListItemCollectionUpdateData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ export interface CustomPropertyUpdateData { /** @@ -13148,12 +13482,19 @@ export declare namespace Word { /** An interface describing the data returned by calling `contentControl.toJSON()`. */ export interface ContentControlData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ checkboxContentControl?: Word.Interfaces.CheckboxContentControlData; + /** + * Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + comboBoxContentControl?: Word.Interfaces.ComboBoxContentControlData; /** * Gets the collection of content control objects in the content control. * @@ -13161,6 +13502,13 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ contentControls?: Word.Interfaces.ContentControlData[]; + /** + * Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + dropDownListContentControl?: Word.Interfaces.DropDownListContentControlData; /** * Gets the collection of field objects in the content control. * @@ -13308,6 +13656,34 @@ export declare namespace Word { export interface ContentControlCollectionData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ + export interface ContentControlListItemData { + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: string; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: number; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: string; + } + /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ + export interface ContentControlListItemCollectionData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface describing the data returned by calling `customProperty.toJSON()`. */ export interface CustomPropertyData { /** @@ -13589,6 +13965,12 @@ export declare namespace Word { */ title?: string; } + /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ + export interface DropDownListContentControlData { + } + /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ + export interface ComboBoxContentControlData { + } /** An interface describing the data returned by calling `field.toJSON()`. */ export interface FieldData { /** @@ -15347,7 +15729,7 @@ export declare namespace Word { */ $all?: boolean; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -15520,7 +15902,7 @@ export declare namespace Word { */ $all?: boolean; /** - * For EACH ITEM in the collection: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * For EACH ITEM in the collection: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -15681,6 +16063,72 @@ export declare namespace Word { */ type?: boolean; } + /** + * Represents a list item in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export interface ContentControlListItemLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: boolean; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: boolean; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: boolean; + } + /** + * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export interface ContentControlListItemCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: boolean; + /** + * For EACH ITEM in the collection: Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: boolean; + /** + * For EACH ITEM in the collection: Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: boolean; + } /** * Represents a custom property. * diff --git a/generate-docs/api-extractor-inputs-word-release/word_online/word.d.ts b/generate-docs/api-extractor-inputs-word-release/word_online/word.d.ts index af546d1444..d8a3921bc0 100644 --- a/generate-docs/api-extractor-inputs-word-release/word_online/word.d.ts +++ b/generate-docs/api-extractor-inputs-word-release/word_online/word.d.ts @@ -747,10 +747,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the body at the specified location. * @@ -1429,12 +1430,19 @@ export declare namespace Word { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ readonly checkboxContentControl: Word.CheckboxContentControl; + /** + * Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly comboBoxContentControl: Word.ComboBoxContentControl; /** * Gets the collection of content control objects in the content control. * @@ -1442,6 +1450,13 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ readonly contentControls: Word.ContentControlCollection; + /** + * Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly dropDownListContentControl: Word.DropDownListContentControl; /** * Gets the collection of endnotes in the content control. * @@ -2081,6 +2096,152 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.ContentControlCollectionData; } + /** + * Represents a list item in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class ContentControlListItem extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText: string; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index: number; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value: string; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ContentControlListItemUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.ContentControlListItem): void; + /** + * Deletes the list item. + * + * @remarks + * [Api set: WordApi 1.9] + */ + delete(): void; + /** + * Selects the list item and sets the text of the content control to the value of the list item. + * + * @remarks + * [Api set: WordApi 1.9] + */ + select(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ContentControlListItemLoadOptions): Word.ContentControlListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ContentControlListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ContentControlListItem; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ContentControlListItem; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ContentControlListItem; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ContentControlListItem` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ContentControlListItemData; + } + /** + * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class ContentControlListItemCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.ContentControlListItem[]; + /** + * Gets the first list item in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.9] + */ + getFirst(): Word.ContentControlListItem; + /** + * Gets the first list item in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. + For further information, + see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.9] + */ + getFirstOrNullObject(): Word.ContentControlListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options - Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ContentControlListItemCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ContentControlListItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ContentControlListItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ContentControlListItemCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ContentControlListItemCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ContentControlListItemCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ContentControlListItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.ContentControlListItemCollectionData; + } /** * Specifies the options that define which content controls are returned. * @@ -2089,12 +2250,13 @@ export declare namespace Word { */ export interface ContentControlOptions { /** - * An array of content control types, item must be 'RichText', 'PlainText', or 'CheckBox'. + * An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. * * @remarks * [Api set: WordApi 1.5] * - * Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. + * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9. */ types: Word.ContentControlType[]; } @@ -2918,9 +3080,24 @@ export declare namespace Word { * @remarks * [Api set: WordApi 1.6] * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * + * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. + */ + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult; + /** + * Import styles from a JSON-formatted string. + * + * @remarks + * [Api set: WordApi 1.6] + * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehaviorString - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. */ - importStylesFromJson(stylesJson: string): OfficeExtension.ClientResult; + importStylesFromJson(stylesJson: string, importedStylesConflictBehaviorString?: "Ignore" | "Overwrite" | "CreateNew"): OfficeExtension.ClientResult; /** * Inserts a document into the target document at a specific location with additional properties. Headers, footers, watermarks, and other section properties are copied by default. @@ -3344,6 +3521,132 @@ export declare namespace Word { */ toJSON(): Word.Interfaces.DocumentPropertiesData; } + /** + * The data specific to content controls of type DropDownList. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class DropDownListContentControl extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of list items in the dropdown list content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly listItems: Word.ContentControlListItemCollection; + /** + * Adds a new list item to this dropdown list content control and returns a {@link Word.ContentControlListItem} object. + * + * @remarks + * [Api set: WordApi 1.9] + * + * @param displayText - Required. Display text of the list item. + * @param value - Optional. Value of the list item. + * @param index - Optional. Index location of the new item in the list. If an item exists at the position specified, the existing item is pushed down in the list. If omitted, the new item is added to the end of the list. + */ + addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem; + /** + * Deletes all list items in this dropdown list content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + deleteAllListItems(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.DropDownListContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.DropDownListContentControl; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.DropDownListContentControl; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.DropDownListContentControl; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.DropDownListContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DropDownListContentControlData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.DropDownListContentControlData; + } + /** + * The data specific to content controls of type 'ComboBox'. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export class ComboBoxContentControl extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of list items in the combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly listItems: Word.ContentControlListItemCollection; + /** + * Adds a new list item to this combo box content control and returns a {@link Word.ContentControlListItem} object. + * + * @remarks + * [Api set: WordApi 1.9] + * + * @param displayText - Required. Display text of the list item. + * @param value - Optional. Value of the list item. + * @param index - Optional. Index location of the new item in the list. If an item exists at the position specified, the existing item is pushed down in the list. If omitted, the new item is added to the end of the list. + */ + addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem; + /** + * Deletes all list items in this combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + deleteAllListItems(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ComboBoxContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths - `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ComboBoxContentControl; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ComboBoxContentControl; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ComboBoxContentControl; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ComboBoxContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ComboBoxContentControlData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ComboBoxContentControlData; + } /** * Represents a field. * @@ -5046,10 +5349,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the paragraph at the specified location. * @@ -5803,10 +6107,11 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts an endnote. The endnote reference is placed after the range. * @@ -11469,6 +11774,7 @@ export declare namespace Word { + enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", @@ -11645,7 +11951,7 @@ export declare namespace Word { /** An interface for updating data on the `ContentControl` object, for use in `contentControl.set({ ... })`. */ export interface ContentControlUpdateData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -11733,6 +12039,34 @@ export declare namespace Word { export interface ContentControlCollectionUpdateData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ + export interface ContentControlListItemUpdateData { + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: string; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: number; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: string; + } + /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ + export interface ContentControlListItemCollectionUpdateData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ export interface CustomPropertyUpdateData { /** @@ -13084,12 +13418,19 @@ export declare namespace Word { /** An interface describing the data returned by calling `contentControl.toJSON()`. */ export interface ContentControlData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ checkboxContentControl?: Word.Interfaces.CheckboxContentControlData; + /** + * Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + comboBoxContentControl?: Word.Interfaces.ComboBoxContentControlData; /** * Gets the collection of content control objects in the content control. * @@ -13097,6 +13438,13 @@ export declare namespace Word { * [Api set: WordApi 1.1] */ contentControls?: Word.Interfaces.ContentControlData[]; + /** + * Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + dropDownListContentControl?: Word.Interfaces.DropDownListContentControlData; /** * Gets the collection of field objects in the content control. * @@ -13244,6 +13592,34 @@ export declare namespace Word { export interface ContentControlCollectionData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ + export interface ContentControlListItemData { + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: string; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: number; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: string; + } + /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ + export interface ContentControlListItemCollectionData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface describing the data returned by calling `customProperty.toJSON()`. */ export interface CustomPropertyData { /** @@ -13495,6 +13871,12 @@ export declare namespace Word { */ title?: string; } + /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ + export interface DropDownListContentControlData { + } + /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ + export interface ComboBoxContentControlData { + } /** An interface describing the data returned by calling `field.toJSON()`. */ export interface FieldData { /** @@ -15253,7 +15635,7 @@ export declare namespace Word { */ $all?: boolean; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -15426,7 +15808,7 @@ export declare namespace Word { */ $all?: boolean; /** - * For EACH ITEM in the collection: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * For EACH ITEM in the collection: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -15587,6 +15969,72 @@ export declare namespace Word { */ type?: boolean; } + /** + * Represents a list item in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export interface ContentControlListItemLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: boolean; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: boolean; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: boolean; + } + /** + * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + export interface ContentControlListItemCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: boolean; + /** + * For EACH ITEM in the collection: Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: boolean; + /** + * For EACH ITEM in the collection: Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: boolean; + } /** * Represents a custom property. * diff --git a/generate-docs/api-extractor-inputs-word/word.d.ts b/generate-docs/api-extractor-inputs-word/word.d.ts index f694d82cd5..0d59e81729 100644 --- a/generate-docs/api-extractor-inputs-word/word.d.ts +++ b/generate-docs/api-extractor-inputs-word/word.d.ts @@ -747,7 +747,7 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. - * `DropDownList` and `ComboBox` support are currently in preview. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ @@ -1680,18 +1680,17 @@ export declare namespace Word { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ readonly checkboxContentControl: Word.CheckboxContentControl; /** - * Specifies the combo box-related data if the content control's type is 'ComboBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ readonly comboBoxContentControl: Word.ComboBoxContentControl; /** @@ -1702,11 +1701,10 @@ export declare namespace Word { */ readonly contentControls: Word.ContentControlCollection; /** - * Specifies the dropdown list-related data if the content control's type is 'DropDownList'. It's `null` otherwise. + * Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ readonly dropDownListContentControl: Word.DropDownListContentControl; /** @@ -2420,8 +2418,7 @@ export declare namespace Word { * Represents a list item in a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ export class ContentControlListItem extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ @@ -2430,24 +2427,21 @@ export declare namespace Word { * Specifies the display text of a list item for a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ displayText: string; /** * Specifies the index location of a content control list item in the collection of list items. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ index: number; /** * Specifies the programmatic value of a list item for a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ value: string; /** @@ -2462,16 +2456,14 @@ export declare namespace Word { * Deletes the list item. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ delete(): void; /** * Selects the list item and sets the text of the content control to the value of the list item. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ select(): void; /** @@ -2513,8 +2505,7 @@ export declare namespace Word { * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ export class ContentControlListItemCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ @@ -2525,8 +2516,7 @@ export declare namespace Word { * Gets the first list item in this collection. Throws an `ItemNotFound` error if this collection is empty. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ getFirst(): Word.ContentControlListItem; /** @@ -2535,8 +2525,7 @@ export declare namespace Word { see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ getFirstOrNullObject(): Word.ContentControlListItem; /** @@ -2585,7 +2574,7 @@ export declare namespace Word { * [Api set: WordApi 1.5] * * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. - * 'DropDownList' and 'ComboBox' support are currently in preview. + * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9. */ types: Word.ContentControlType[]; } @@ -3429,9 +3418,24 @@ export declare namespace Word { * @remarks * [Api set: WordApi 1.6] * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. */ - importStylesFromJson(stylesJson: string): OfficeExtension.ClientResult; + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult; + /** + * Import styles from a JSON-formatted string. + * + * @remarks + * [Api set: WordApi 1.6] + * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * + * @param stylesJson - Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehaviorString - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. + */ + importStylesFromJson(stylesJson: string, importedStylesConflictBehaviorString?: "Ignore" | "Overwrite" | "CreateNew"): OfficeExtension.ClientResult; /** * Inserts a document into the target document at a specific location with additional properties. Headers, footers, watermarks, and other section properties are copied by default. @@ -3996,8 +4000,7 @@ export declare namespace Word { * The data specific to content controls of type DropDownList. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ export class DropDownListContentControl extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ @@ -4006,16 +4009,14 @@ export declare namespace Word { * Gets the collection of list items in the dropdown list content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ readonly listItems: Word.ContentControlListItemCollection; /** * Adds a new list item to this dropdown list content control and returns a {@link Word.ContentControlListItem} object. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] * * @param displayText - Required. Display text of the list item. * @param value - Optional. Value of the list item. @@ -4026,8 +4027,7 @@ export declare namespace Word { * Deletes all list items in this dropdown list content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ deleteAllListItems(): void; /** @@ -4063,8 +4063,7 @@ export declare namespace Word { * The data specific to content controls of type 'ComboBox'. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ export class ComboBoxContentControl extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ @@ -4073,16 +4072,14 @@ export declare namespace Word { * Gets the collection of list items in the combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ readonly listItems: Word.ContentControlListItemCollection; /** * Adds a new list item to this combo box content control and returns a {@link Word.ContentControlListItem} object. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] * * @param displayText - Required. Display text of the list item. * @param value - Optional. Value of the list item. @@ -4093,8 +4090,7 @@ export declare namespace Word { * Deletes all list items in this combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ deleteAllListItems(): void; /** @@ -6131,7 +6127,7 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. - * `DropDownList` and `ComboBox` support are currently in preview. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ @@ -6939,7 +6935,7 @@ export declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. - * `DropDownList` and `ComboBox` support are currently in preview. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ @@ -13707,6 +13703,32 @@ export declare namespace Word { */ compareTargetNew = "CompareTargetNew", } + /** + * Specifies how to handle any conflicts, that is, when imported styles have the same name as existing styles in the current document. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + enum ImportedStylesConflictBehavior { + /** + * Ignore conflicting imported styles and keep the existing version of those styles in the current document. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + ignore = "Ignore", + /** + * Overwrite the existing styles in the current document. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + overwrite = "Overwrite", + /** + * Rename conflicting imported styles so that both versions are kept in the current document. For example, if MyStyle already exists in the document, then the imported version could be added as MyStyle1. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + createNew = "CreateNew", + } enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", @@ -13943,7 +13965,7 @@ export declare namespace Word { /** An interface for updating data on the `ContentControl` object, for use in `contentControl.set({ ... })`. */ export interface ContentControlUpdateData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -14037,24 +14059,21 @@ export declare namespace Word { * Specifies the display text of a list item for a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ displayText?: string; /** * Specifies the index location of a content control list item in the collection of list items. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ index?: number; /** * Specifies the programmatic value of a list item for a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ value?: string; } @@ -15577,18 +15596,17 @@ export declare namespace Word { /** An interface describing the data returned by calling `contentControl.toJSON()`. */ export interface ContentControlData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ checkboxContentControl?: Word.Interfaces.CheckboxContentControlData; /** - * Specifies the combo box-related data if the content control's type is 'ComboBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ comboBoxContentControl?: Word.Interfaces.ComboBoxContentControlData; /** @@ -15599,11 +15617,10 @@ export declare namespace Word { */ contentControls?: Word.Interfaces.ContentControlData[]; /** - * Specifies the dropdown list-related data if the content control's type is 'DropDownList'. It's `null` otherwise. + * Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ dropDownListContentControl?: Word.Interfaces.DropDownListContentControlData; /** @@ -15759,24 +15776,21 @@ export declare namespace Word { * Specifies the display text of a list item for a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ displayText?: string; /** * Specifies the index location of a content control list item in the collection of list items. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ index?: number; /** * Specifies the programmatic value of a list item for a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ value?: string; } @@ -18075,7 +18089,7 @@ export declare namespace Word { */ $all?: boolean; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -18248,7 +18262,7 @@ export declare namespace Word { */ $all?: boolean; /** - * For EACH ITEM in the collection: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * For EACH ITEM in the collection: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -18413,8 +18427,7 @@ export declare namespace Word { * Represents a list item in a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ export interface ContentControlListItemLoadOptions { /** @@ -18425,24 +18438,21 @@ export declare namespace Word { * Specifies the display text of a list item for a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ displayText?: boolean; /** * Specifies the index location of a content control list item in the collection of list items. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ index?: boolean; /** * Specifies the programmatic value of a list item for a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ value?: boolean; } @@ -18450,8 +18460,7 @@ export declare namespace Word { * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ export interface ContentControlListItemCollectionLoadOptions { /** @@ -18462,24 +18471,21 @@ export declare namespace Word { * For EACH ITEM in the collection: Specifies the display text of a list item for a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ displayText?: boolean; /** * For EACH ITEM in the collection: Specifies the index location of a content control list item in the collection of list items. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ index?: boolean; /** * For EACH ITEM in the collection: Specifies the programmatic value of a list item for a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ value?: boolean; } diff --git a/generate-docs/script-inputs/office.d.ts b/generate-docs/script-inputs/office.d.ts index c4f5f00e67..ad25957183 100644 --- a/generate-docs/script-inputs/office.d.ts +++ b/generate-docs/script-inputs/office.d.ts @@ -86309,10 +86309,11 @@ declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the body at the specified location. * @@ -87191,12 +87192,19 @@ declare namespace Word { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ readonly checkboxContentControl: Word.CheckboxContentControl; + /** + * Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly comboBoxContentControl: Word.ComboBoxContentControl; /** * Gets the collection of content control objects in the content control. * @@ -87204,6 +87212,13 @@ declare namespace Word { * [Api set: WordApi 1.1] */ readonly contentControls: Word.ContentControlCollection; + /** + * Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly dropDownListContentControl: Word.DropDownListContentControl; /** * Gets the collection of endnotes in the content control. * @@ -87843,6 +87858,152 @@ declare namespace Word { */ toJSON(): Word.Interfaces.ContentControlCollectionData; } + /** + * Represents a list item in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + class ContentControlListItem extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText: string; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index: number; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value: string; + /** + * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type. + * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. + * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties. + */ + set(properties: Interfaces.ContentControlListItemUpdateData, options?: OfficeExtension.UpdateOptions): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Word.ContentControlListItem): void; + /** + * Deletes the list item. + * + * @remarks + * [Api set: WordApi 1.9] + */ + delete(): void; + /** + * Selects the list item and sets the text of the content control to the value of the list item. + * + * @remarks + * [Api set: WordApi 1.9] + */ + select(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ContentControlListItemLoadOptions): Word.ContentControlListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ContentControlListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ContentControlListItem; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ContentControlListItem; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ContentControlListItem; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ContentControlListItem` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ContentControlListItemData; + } + /** + * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + class ContentControlListItemCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** Gets the loaded child items in this collection. */ + readonly items: Word.ContentControlListItem[]; + /** + * Gets the first list item in this collection. Throws an `ItemNotFound` error if this collection is empty. + * + * @remarks + * [Api set: WordApi 1.9] + */ + getFirst(): Word.ContentControlListItem; + /** + * Gets the first list item in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. + For further information, + see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. + * + * @remarks + * [Api set: WordApi 1.9] + */ + getFirstOrNullObject(): Word.ContentControlListItem; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param options Provides options for which properties of the object to load. + */ + load(options?: Word.Interfaces.ContentControlListItemCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ContentControlListItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ContentControlListItemCollection; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ContentControlListItemCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ContentControlListItemCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ContentControlListItemCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ContentControlListItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ + toJSON(): Word.Interfaces.ContentControlListItemCollectionData; + } /** * Specifies the options that define which content controls are returned. * @@ -87851,12 +88012,13 @@ declare namespace Word { */ interface ContentControlOptions { /** - * An array of content control types, item must be 'RichText', 'PlainText', or 'CheckBox'. + * An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. * * @remarks * [Api set: WordApi 1.5] * - * Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. + * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9. */ types: Word.ContentControlType[]; } @@ -88689,9 +88851,24 @@ declare namespace Word { * @remarks * [Api set: WordApi 1.6] * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * + * @param stylesJson Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehavior Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. + */ + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult; + /** + * Import styles from a JSON-formatted string. + * + * @remarks + * [Api set: WordApi 1.6] + * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * * @param stylesJson Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehavior Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. */ - importStylesFromJson(stylesJson: string): OfficeExtension.ClientResult; + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: "Ignore" | "Overwrite" | "CreateNew"): OfficeExtension.ClientResult; /** * Inserts a document into the target document at a specific location with additional properties. Headers, footers, watermarks, and other section properties are copied by default. @@ -89252,6 +89429,132 @@ declare namespace Word { */ toJSON(): Word.Interfaces.DocumentPropertiesData; } + /** + * The data specific to content controls of type DropDownList. + * + * @remarks + * [Api set: WordApi 1.9] + */ + class DropDownListContentControl extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of list items in the dropdown list content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly listItems: Word.ContentControlListItemCollection; + /** + * Adds a new list item to this dropdown list content control and returns a {@link Word.ContentControlListItem} object. + * + * @remarks + * [Api set: WordApi 1.9] + * + * @param displayText Required. Display text of the list item. + * @param value Optional. Value of the list item. + * @param index Optional. Index location of the new item in the list. If an item exists at the position specified, the existing item is pushed down in the list. If omitted, the new item is added to the end of the list. + */ + addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem; + /** + * Deletes all list items in this dropdown list content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + deleteAllListItems(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.DropDownListContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.DropDownListContentControl; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.DropDownListContentControl; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.DropDownListContentControl; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.DropDownListContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DropDownListContentControlData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.DropDownListContentControlData; + } + /** + * The data specific to content controls of type 'ComboBox'. + * + * @remarks + * [Api set: WordApi 1.9] + */ + class ComboBoxContentControl extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; + /** + * Gets the collection of list items in the combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + readonly listItems: Word.ContentControlListItemCollection; + /** + * Adds a new list item to this combo box content control and returns a {@link Word.ContentControlListItem} object. + * + * @remarks + * [Api set: WordApi 1.9] + * + * @param displayText Required. Display text of the list item. + * @param value Optional. Value of the list item. + * @param index Optional. Index location of the new item in the list. If an item exists at the position specified, the existing item is pushed down in the list. If omitted, the new item is added to the end of the list. + */ + addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem; + /** + * Deletes all list items in this combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + deleteAllListItems(): void; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load. + */ + load(propertyNames?: string | string[]): Word.ComboBoxContentControl; + /** + * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. + * + * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load. + */ + load(propertyNamesAndPaths?: { + select?: string; + expand?: string; + }): Word.ComboBoxContentControl; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection. + */ + track(): Word.ComboBoxContentControl; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect. + */ + untrack(): Word.ComboBoxContentControl; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ComboBoxContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ComboBoxContentControlData`) that contains shallow copies of any loaded child properties from the original object. + */ + toJSON(): Word.Interfaces.ComboBoxContentControlData; + } /** * Represents a field. * @@ -91249,10 +91552,11 @@ declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts a document into the paragraph at the specified location. * @@ -92006,10 +92310,11 @@ declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * - * @param contentControlType Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'. + * @param contentControlType Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl; + insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; /** * Inserts an endnote. The endnote reference is placed after the range. * @@ -98543,6 +98848,32 @@ declare namespace Word { */ compareTargetNew = "CompareTargetNew", } + /** + * Specifies how to handle any conflicts, that is, when imported styles have the same name as existing styles in the current document. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + enum ImportedStylesConflictBehavior { + /** + * Ignore conflicting imported styles and keep the existing version of those styles in the current document. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + ignore = "Ignore", + /** + * Overwrite the existing styles in the current document. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + overwrite = "Overwrite", + /** + * Rename conflicting imported styles so that both versions are kept in the current document. For example, if MyStyle already exists in the document, then the imported version could be added as MyStyle1. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + createNew = "CreateNew", + } enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", @@ -98779,7 +99110,7 @@ declare namespace Word { /** An interface for updating data on the `ContentControl` object, for use in `contentControl.set({ ... })`. */ interface ContentControlUpdateData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -98867,6 +99198,34 @@ declare namespace Word { interface ContentControlCollectionUpdateData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ + interface ContentControlListItemUpdateData { + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: string; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: number; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: string; + } + /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ + interface ContentControlListItemCollectionUpdateData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ interface CustomPropertyUpdateData { /** @@ -100374,12 +100733,19 @@ declare namespace Word { /** An interface describing the data returned by calling `contentControl.toJSON()`. */ interface ContentControlData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ checkboxContentControl?: Word.Interfaces.CheckboxContentControlData; + /** + * Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + comboBoxContentControl?: Word.Interfaces.ComboBoxContentControlData; /** * Gets the collection of content control objects in the content control. * @@ -100387,6 +100753,13 @@ declare namespace Word { * [Api set: WordApi 1.1] */ contentControls?: Word.Interfaces.ContentControlData[]; + /** + * Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. + * + * @remarks + * [Api set: WordApi 1.9] + */ + dropDownListContentControl?: Word.Interfaces.DropDownListContentControlData; /** * Gets the collection of field objects in the content control. * @@ -100534,6 +100907,34 @@ declare namespace Word { interface ContentControlCollectionData { items?: Word.Interfaces.ContentControlData[]; } + /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ + interface ContentControlListItemData { + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: string; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: number; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: string; + } + /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ + interface ContentControlListItemCollectionData { + items?: Word.Interfaces.ContentControlListItemData[]; + } /** An interface describing the data returned by calling `customProperty.toJSON()`. */ interface CustomPropertyData { /** @@ -100827,6 +101228,12 @@ declare namespace Word { */ title?: string; } + /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ + interface DropDownListContentControlData { + } + /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ + interface ComboBoxContentControlData { + } /** An interface describing the data returned by calling `field.toJSON()`. */ interface FieldData { /** @@ -102803,7 +103210,7 @@ declare namespace Word { */ $all?: boolean; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -102976,7 +103383,7 @@ declare namespace Word { */ $all?: boolean; /** - * For EACH ITEM in the collection: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * For EACH ITEM in the collection: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -103137,6 +103544,72 @@ declare namespace Word { */ type?: boolean; } + /** + * Represents a list item in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + interface ContentControlListItemLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: boolean; + /** + * Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: boolean; + /** + * Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: boolean; + } + /** + * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + interface ContentControlListItemCollectionLoadOptions { + /** + Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`). + */ + $all?: boolean; + /** + * For EACH ITEM in the collection: Specifies the display text of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + displayText?: boolean; + /** + * For EACH ITEM in the collection: Specifies the index location of a content control list item in the collection of list items. + * + * @remarks + * [Api set: WordApi 1.9] + */ + index?: boolean; + /** + * For EACH ITEM in the collection: Specifies the programmatic value of a list item for a dropdown list or combo box content control. + * + * @remarks + * [Api set: WordApi 1.9] + */ + value?: boolean; + } /** * Represents a custom property. * diff --git a/generate-docs/script-inputs/office_preview.d.ts b/generate-docs/script-inputs/office_preview.d.ts index 3a4add9fbd..1448521bd1 100644 --- a/generate-docs/script-inputs/office_preview.d.ts +++ b/generate-docs/script-inputs/office_preview.d.ts @@ -94367,7 +94367,7 @@ declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. - * `DropDownList` and `ComboBox` support are currently in preview. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * * @param contentControlType Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ @@ -95300,18 +95300,17 @@ declare namespace Word { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ context: RequestContext; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ readonly checkboxContentControl: Word.CheckboxContentControl; /** - * Specifies the combo box-related data if the content control's type is 'ComboBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ readonly comboBoxContentControl: Word.ComboBoxContentControl; /** @@ -95322,11 +95321,10 @@ declare namespace Word { */ readonly contentControls: Word.ContentControlCollection; /** - * Specifies the dropdown list-related data if the content control's type is 'DropDownList'. It's `null` otherwise. + * Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ readonly dropDownListContentControl: Word.DropDownListContentControl; /** @@ -96040,8 +96038,7 @@ declare namespace Word { * Represents a list item in a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ class ContentControlListItem extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ @@ -96050,24 +96047,21 @@ declare namespace Word { * Specifies the display text of a list item for a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ displayText: string; /** * Specifies the index location of a content control list item in the collection of list items. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ index: number; /** * Specifies the programmatic value of a list item for a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ value: string; /** @@ -96082,16 +96076,14 @@ declare namespace Word { * Deletes the list item. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ delete(): void; /** * Selects the list item and sets the text of the content control to the value of the list item. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ select(): void; /** @@ -96133,8 +96125,7 @@ declare namespace Word { * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ class ContentControlListItemCollection extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ @@ -96145,8 +96136,7 @@ declare namespace Word { * Gets the first list item in this collection. Throws an `ItemNotFound` error if this collection is empty. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ getFirst(): Word.ContentControlListItem; /** @@ -96155,8 +96145,7 @@ declare namespace Word { see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ getFirstOrNullObject(): Word.ContentControlListItem; /** @@ -96205,7 +96194,7 @@ declare namespace Word { * [Api set: WordApi 1.5] * * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. - * 'DropDownList' and 'ComboBox' support are currently in preview. + * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9. */ types: Word.ContentControlType[]; } @@ -97049,9 +97038,24 @@ declare namespace Word { * @remarks * [Api set: WordApi 1.6] * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * * @param stylesJson Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehavior Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. */ - importStylesFromJson(stylesJson: string): OfficeExtension.ClientResult; + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult; + /** + * Import styles from a JSON-formatted string. + * + * @remarks + * [Api set: WordApi 1.6] + * + * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. + * + * @param stylesJson Required. A JSON-formatted string representing the styles. + * @param importedStylesConflictBehavior Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. + */ + importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: "Ignore" | "Overwrite" | "CreateNew"): OfficeExtension.ClientResult; /** * Inserts a document into the target document at a specific location with additional properties. Headers, footers, watermarks, and other section properties are copied by default. @@ -97616,8 +97620,7 @@ declare namespace Word { * The data specific to content controls of type DropDownList. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ class DropDownListContentControl extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ @@ -97626,16 +97629,14 @@ declare namespace Word { * Gets the collection of list items in the dropdown list content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ readonly listItems: Word.ContentControlListItemCollection; /** * Adds a new list item to this dropdown list content control and returns a {@link Word.ContentControlListItem} object. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] * * @param displayText Required. Display text of the list item. * @param value Optional. Value of the list item. @@ -97646,8 +97647,7 @@ declare namespace Word { * Deletes all list items in this dropdown list content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ deleteAllListItems(): void; /** @@ -97683,8 +97683,7 @@ declare namespace Word { * The data specific to content controls of type 'ComboBox'. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ class ComboBoxContentControl extends OfficeExtension.ClientObject { /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ @@ -97693,16 +97692,14 @@ declare namespace Word { * Gets the collection of list items in the combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ readonly listItems: Word.ContentControlListItemCollection; /** * Adds a new list item to this combo box content control and returns a {@link Word.ContentControlListItem} object. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] * * @param displayText Required. Display text of the list item. * @param value Optional. Value of the list item. @@ -97713,8 +97710,7 @@ declare namespace Word { * Deletes all list items in this combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ deleteAllListItems(): void; /** @@ -99751,7 +99747,7 @@ declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. - * `DropDownList` and `ComboBox` support are currently in preview. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * * @param contentControlType Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ @@ -100559,7 +100555,7 @@ declare namespace Word { * [Api set: WordApi 1.1] * * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7. - * `DropDownList` and `ComboBox` support are currently in preview. + * `DropDownList` and `ComboBox` support was added in WordApi 1.9. * * @param contentControlType Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. */ @@ -107327,6 +107323,32 @@ declare namespace Word { */ compareTargetNew = "CompareTargetNew", } + /** + * Specifies how to handle any conflicts, that is, when imported styles have the same name as existing styles in the current document. + * + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + enum ImportedStylesConflictBehavior { + /** + * Ignore conflicting imported styles and keep the existing version of those styles in the current document. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + ignore = "Ignore", + /** + * Overwrite the existing styles in the current document. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + overwrite = "Overwrite", + /** + * Rename conflicting imported styles so that both versions are kept in the current document. For example, if MyStyle already exists in the document, then the imported version could be added as MyStyle1. + * @remarks + * [Api set: WordApiDesktop 1.1] + */ + createNew = "CreateNew", + } enum ErrorCodes { accessDenied = "AccessDenied", generalException = "GeneralException", @@ -107563,7 +107585,7 @@ declare namespace Word { /** An interface for updating data on the `ContentControl` object, for use in `contentControl.set({ ... })`. */ interface ContentControlUpdateData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -107657,24 +107679,21 @@ declare namespace Word { * Specifies the display text of a list item for a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ displayText?: string; /** * Specifies the index location of a content control list item in the collection of list items. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ index?: number; /** * Specifies the programmatic value of a list item for a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ value?: string; } @@ -109197,18 +109216,17 @@ declare namespace Word { /** An interface describing the data returned by calling `contentControl.toJSON()`. */ interface ContentControlData { /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] */ checkboxContentControl?: Word.Interfaces.CheckboxContentControlData; /** - * Specifies the combo box-related data if the content control's type is 'ComboBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ comboBoxContentControl?: Word.Interfaces.ComboBoxContentControlData; /** @@ -109219,11 +109237,10 @@ declare namespace Word { */ contentControls?: Word.Interfaces.ContentControlData[]; /** - * Specifies the dropdown list-related data if the content control's type is 'DropDownList'. It's `null` otherwise. + * Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ dropDownListContentControl?: Word.Interfaces.DropDownListContentControlData; /** @@ -109379,24 +109396,21 @@ declare namespace Word { * Specifies the display text of a list item for a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ displayText?: string; /** * Specifies the index location of a content control list item in the collection of list items. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ index?: number; /** * Specifies the programmatic value of a list item for a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ value?: string; } @@ -111695,7 +111709,7 @@ declare namespace Word { */ $all?: boolean; /** - * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -111868,7 +111882,7 @@ declare namespace Word { */ $all?: boolean; /** - * For EACH ITEM in the collection: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise. + * For EACH ITEM in the collection: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise. * * @remarks * [Api set: WordApi 1.7] @@ -112033,8 +112047,7 @@ declare namespace Word { * Represents a list item in a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ interface ContentControlListItemLoadOptions { /** @@ -112045,24 +112058,21 @@ declare namespace Word { * Specifies the display text of a list item for a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ displayText?: boolean; /** * Specifies the index location of a content control list item in the collection of list items. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ index?: boolean; /** * Specifies the programmatic value of a list item for a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ value?: boolean; } @@ -112070,8 +112080,7 @@ declare namespace Word { * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ interface ContentControlListItemCollectionLoadOptions { /** @@ -112082,24 +112091,21 @@ declare namespace Word { * For EACH ITEM in the collection: Specifies the display text of a list item for a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ displayText?: boolean; /** * For EACH ITEM in the collection: Specifies the index location of a content control list item in the collection of list items. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ index?: boolean; /** * For EACH ITEM in the collection: Specifies the programmatic value of a list item for a dropdown list or combo box content control. * * @remarks - * [Api set: WordApi BETA (PREVIEW ONLY)] - * @beta + * [Api set: WordApi 1.9] */ value?: boolean; } diff --git a/generate-docs/script-inputs/script-lab-snippets.yaml b/generate-docs/script-inputs/script-lab-snippets.yaml index 35fa286ca1..cb46ec1d9e 100644 --- a/generate-docs/script-inputs/script-lab-snippets.yaml +++ b/generate-docs/script-inputs/script-lab-snippets.yaml @@ -17204,7 +17204,7 @@ 'Word.ComboBoxContentControl:class': - >- // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-combo-box-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml // Places a combo box content control at the end of the selection. @@ -17219,7 +17219,7 @@ 'Word.ComboBoxContentControl#addListItem:member(1)': - >- // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-combo-box-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml // Adds the provided list item to the first combo box content control in the @@ -17260,7 +17260,7 @@ 'Word.ComboBoxContentControl#deleteAllListItems:member(1)': - >- // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-combo-box-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml // Deletes the list items from first combo box content control found in the @@ -17298,7 +17298,7 @@ 'Word.ComboBoxContentControl#listItems:member': - >- // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-combo-box-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml // Deletes the provided list item from the first combo box content control @@ -17962,7 +17962,7 @@ 'Word.ContentControl#comboBoxContentControl:member': - >- // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-combo-box-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml // Adds the provided list item to the first combo box content control in the @@ -18003,7 +18003,7 @@ 'Word.ContentControl#dropDownListContentControl:member': - >- // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Adds the provided list item to the first dropdown list content control in @@ -18540,7 +18540,7 @@ 'Word.ContentControlListItem:class': - >- // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Deletes the provided list item from the first dropdown list content @@ -18592,7 +18592,7 @@ 'Word.ContentControlListItem#delete:member(1)': - >- // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-combo-box-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml // Deletes the provided list item from the first combo box content control @@ -18644,7 +18644,7 @@ 'Word.ContentControlListItem#displayText:member': - >- // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Deletes the provided list item from the first dropdown list content @@ -18696,7 +18696,7 @@ 'Word.ContentControlListItemCollection:class': - >- // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-combo-box-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-combo-box-content-control.yaml // Gets the list items from the first combo box content control found in the @@ -20470,7 +20470,7 @@ 'Word.DropDownListContentControl:class': - >- // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Places a dropdown list content control at the end of the selection. @@ -20485,7 +20485,7 @@ 'Word.DropDownListContentControl#addListItem:member(1)': - >- // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Adds the provided list item to the first dropdown list content control in @@ -20526,7 +20526,7 @@ 'Word.DropDownListContentControl#deleteAllListItems:member(1)': - >- // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Deletes the list items from first dropdown list content control found in @@ -20566,7 +20566,7 @@ 'Word.DropDownListContentControl#listItems:member': - >- // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Deletes the provided list item from the first dropdown list content @@ -22817,7 +22817,7 @@ 'Word.Range#getRange:member(1)': - >- // Link to full sample: - https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-change-dropdown-list-content-control.yaml + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/insert-and-change-dropdown-list-content-control.yaml // Places a dropdown list content control at the end of the selection. diff --git a/generate-docs/scripts/midprocessor.ts b/generate-docs/scripts/midprocessor.ts index 02ef5f04a6..0daf19d5c9 100644 --- a/generate-docs/scripts/midprocessor.ts +++ b/generate-docs/scripts/midprocessor.ts @@ -7,7 +7,7 @@ import * as colors from 'colors'; const CURRENT_EXCEL_RELEASE = 17; const OLDEST_EXCEL_RELEASE_WITH_CUSTOM_FUNCTIONS = 9; const CURRENT_OUTLOOK_RELEASE = 14; -const CURRENT_WORD_RELEASE = 8; +const CURRENT_WORD_RELEASE = 9; const CURRENT_POWERPOINT_RELEASE = 6; tryCatch(async () => { diff --git a/generate-docs/scripts/postprocessor.ts b/generate-docs/scripts/postprocessor.ts index bba3c760ff..2eb4c9c2ea 100644 --- a/generate-docs/scripts/postprocessor.ts +++ b/generate-docs/scripts/postprocessor.ts @@ -98,7 +98,7 @@ tryCatch(async () => { {host: "outlook", versions: 15}, {host: "powerpoint", versions: 7}, {host: "visio", versions: 1}, - {host: "word", versions: 9}]; /* not including online or desktop*/ + {host: "word", versions: 10}]; /* not including online or desktop*/ hostVersionMap.forEach(category => { if (category.versions > 1) {