-
Notifications
You must be signed in to change notification settings - Fork 63
/
word.savebehavior.yml
52 lines (38 loc) · 1.48 KB
/
word.savebehavior.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
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"'