-
Notifications
You must be signed in to change notification settings - Fork 63
/
word.noteitemtype.yml
51 lines (39 loc) · 1.51 KB
/
word.noteitemtype.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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"'