-
Notifications
You must be signed in to change notification settings - Fork 64
/
powerpoint.yml
233 lines (225 loc) · 12.1 KB
/
powerpoint.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
### YamlMime:TSPackage
uid: powerpoint!
name: powerpoint
type: package
summary: ''
interfaces:
- 'powerpoint!PowerPoint.AddSlideOptions:interface'
- 'powerpoint!PowerPoint.InsertSlideOptions:interface'
- 'powerpoint!PowerPoint.Interfaces.BulletFormatData:interface'
- 'powerpoint!PowerPoint.Interfaces.BulletFormatLoadOptions:interface'
- 'powerpoint!PowerPoint.Interfaces.BulletFormatUpdateData:interface'
- 'powerpoint!PowerPoint.Interfaces.CollectionLoadOptions:interface'
- 'powerpoint!PowerPoint.Interfaces.ParagraphFormatData:interface'
- 'powerpoint!PowerPoint.Interfaces.ParagraphFormatLoadOptions:interface'
- 'powerpoint!PowerPoint.Interfaces.ParagraphFormatUpdateData:interface'
- 'powerpoint!PowerPoint.Interfaces.PresentationData:interface'
- 'powerpoint!PowerPoint.Interfaces.PresentationLoadOptions:interface'
- 'powerpoint!PowerPoint.Interfaces.ShapeCollectionData:interface'
- 'powerpoint!PowerPoint.Interfaces.ShapeCollectionLoadOptions:interface'
- 'powerpoint!PowerPoint.Interfaces.ShapeCollectionUpdateData:interface'
- 'powerpoint!PowerPoint.Interfaces.ShapeData:interface'
- 'powerpoint!PowerPoint.Interfaces.ShapeFillData:interface'
- 'powerpoint!PowerPoint.Interfaces.ShapeFillLoadOptions:interface'
- 'powerpoint!PowerPoint.Interfaces.ShapeFillUpdateData:interface'
- 'powerpoint!PowerPoint.Interfaces.ShapeFontData:interface'
- 'powerpoint!PowerPoint.Interfaces.ShapeFontLoadOptions:interface'
- 'powerpoint!PowerPoint.Interfaces.ShapeFontUpdateData:interface'
- 'powerpoint!PowerPoint.Interfaces.ShapeLineFormatData:interface'
- 'powerpoint!PowerPoint.Interfaces.ShapeLineFormatLoadOptions:interface'
- 'powerpoint!PowerPoint.Interfaces.ShapeLineFormatUpdateData:interface'
- 'powerpoint!PowerPoint.Interfaces.ShapeLoadOptions:interface'
- 'powerpoint!PowerPoint.Interfaces.ShapeScopedCollectionData:interface'
- 'powerpoint!PowerPoint.Interfaces.ShapeScopedCollectionLoadOptions:interface'
- 'powerpoint!PowerPoint.Interfaces.ShapeScopedCollectionUpdateData:interface'
- 'powerpoint!PowerPoint.Interfaces.ShapeUpdateData:interface'
- 'powerpoint!PowerPoint.Interfaces.SlideCollectionData:interface'
- 'powerpoint!PowerPoint.Interfaces.SlideCollectionLoadOptions:interface'
- 'powerpoint!PowerPoint.Interfaces.SlideCollectionUpdateData:interface'
- 'powerpoint!PowerPoint.Interfaces.SlideData:interface'
- 'powerpoint!PowerPoint.Interfaces.SlideLayoutCollectionData:interface'
- 'powerpoint!PowerPoint.Interfaces.SlideLayoutCollectionLoadOptions:interface'
- 'powerpoint!PowerPoint.Interfaces.SlideLayoutCollectionUpdateData:interface'
- 'powerpoint!PowerPoint.Interfaces.SlideLayoutData:interface'
- 'powerpoint!PowerPoint.Interfaces.SlideLayoutLoadOptions:interface'
- 'powerpoint!PowerPoint.Interfaces.SlideLoadOptions:interface'
- 'powerpoint!PowerPoint.Interfaces.SlideMasterCollectionData:interface'
- 'powerpoint!PowerPoint.Interfaces.SlideMasterCollectionLoadOptions:interface'
- 'powerpoint!PowerPoint.Interfaces.SlideMasterCollectionUpdateData:interface'
- 'powerpoint!PowerPoint.Interfaces.SlideMasterData:interface'
- 'powerpoint!PowerPoint.Interfaces.SlideMasterLoadOptions:interface'
- 'powerpoint!PowerPoint.Interfaces.SlideScopedCollectionData:interface'
- 'powerpoint!PowerPoint.Interfaces.SlideScopedCollectionLoadOptions:interface'
- 'powerpoint!PowerPoint.Interfaces.SlideScopedCollectionUpdateData:interface'
- 'powerpoint!PowerPoint.Interfaces.TagCollectionData:interface'
- 'powerpoint!PowerPoint.Interfaces.TagCollectionLoadOptions:interface'
- 'powerpoint!PowerPoint.Interfaces.TagCollectionUpdateData:interface'
- 'powerpoint!PowerPoint.Interfaces.TagData:interface'
- 'powerpoint!PowerPoint.Interfaces.TagLoadOptions:interface'
- 'powerpoint!PowerPoint.Interfaces.TagUpdateData:interface'
- 'powerpoint!PowerPoint.Interfaces.TextFrameData:interface'
- 'powerpoint!PowerPoint.Interfaces.TextFrameLoadOptions:interface'
- 'powerpoint!PowerPoint.Interfaces.TextFrameUpdateData:interface'
- 'powerpoint!PowerPoint.Interfaces.TextRangeData:interface'
- 'powerpoint!PowerPoint.Interfaces.TextRangeLoadOptions:interface'
- 'powerpoint!PowerPoint.Interfaces.TextRangeUpdateData:interface'
- 'powerpoint!PowerPoint.ShapeAddOptions:interface'
classes:
- 'powerpoint!PowerPoint.Application:class'
- 'powerpoint!PowerPoint.BulletFormat:class'
- 'powerpoint!PowerPoint.ParagraphFormat:class'
- 'powerpoint!PowerPoint.Presentation:class'
- 'powerpoint!PowerPoint.RequestContext:class'
- 'powerpoint!PowerPoint.Shape:class'
- 'powerpoint!PowerPoint.ShapeCollection:class'
- 'powerpoint!PowerPoint.ShapeFill:class'
- 'powerpoint!PowerPoint.ShapeFont:class'
- 'powerpoint!PowerPoint.ShapeLineFormat:class'
- 'powerpoint!PowerPoint.ShapeScopedCollection:class'
- 'powerpoint!PowerPoint.Slide:class'
- 'powerpoint!PowerPoint.SlideCollection:class'
- 'powerpoint!PowerPoint.SlideLayout:class'
- 'powerpoint!PowerPoint.SlideLayoutCollection:class'
- 'powerpoint!PowerPoint.SlideMaster:class'
- 'powerpoint!PowerPoint.SlideMasterCollection:class'
- 'powerpoint!PowerPoint.SlideScopedCollection:class'
- 'powerpoint!PowerPoint.Tag:class'
- 'powerpoint!PowerPoint.TagCollection:class'
- 'powerpoint!PowerPoint.TextFrame:class'
- 'powerpoint!PowerPoint.TextRange:class'
enums:
- 'powerpoint!PowerPoint.ConnectorType:enum'
- 'powerpoint!PowerPoint.ErrorCodes:enum'
- 'powerpoint!PowerPoint.GeometricShapeType:enum'
- 'powerpoint!PowerPoint.InsertSlideFormatting:enum'
- 'powerpoint!PowerPoint.ParagraphHorizontalAlignment:enum'
- 'powerpoint!PowerPoint.ShapeAutoSize:enum'
- 'powerpoint!PowerPoint.ShapeFillType:enum'
- 'powerpoint!PowerPoint.ShapeFontUnderlineStyle:enum'
- 'powerpoint!PowerPoint.ShapeLineDashStyle:enum'
- 'powerpoint!PowerPoint.ShapeLineStyle:enum'
- 'powerpoint!PowerPoint.ShapeType:enum'
- 'powerpoint!PowerPoint.TextVerticalAlignment:enum'
functions:
- name: PowerPoint.createPresentation(base64File)
uid: 'powerpoint!PowerPoint.createPresentation:function(1)'
package: powerpoint!
summary: >-
Creates and opens a new presentation. Optionally, the presentation can be pre-populated with a base64-encoded
.pptx file.
\[ [API set: PowerPointApi 1.1](/javascript/api/requirement-sets/powerpoint/powerpoint-api-requirement-sets) \]
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'export function createPresentation(base64File?: string): Promise<void>;'
parameters:
- id: base64File
description: Optional. The base64-encoded .pptx file. The default value is null.
type: string
return:
type: Promise<void>
description: |-
#### Examples
```TypeScript
const myFile = <HTMLInputElement>document.getElementById("file");
const reader = new FileReader();
reader.onload = (event) => {
// Remove the metadata before the base64-encoded string.
const startIndex = reader.result.toString().indexOf("base64,");
const copyBase64 = reader.result.toString().substr(startIndex + 7);
PowerPoint.createPresentation(copyBase64);
};
// Read in the file as a data URL so we can parse the base64-encoded string.
reader.readAsDataURL(myFile.files[0]);
```
- name: PowerPoint.run(batch)
uid: 'powerpoint!PowerPoint.run:function(1)'
package: powerpoint!
summary: >-
Executes a batch script that performs actions on the PowerPoint 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<T>(batch: (context: PowerPoint.RequestContext) => OfficeExtension.IPromise<T>):
OfficeExtension.IPromise<T>;
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 PowerPoint application. Since the
Office add-in and the PowerPoint application run in two different processes, the RequestContext is required
to get access to the PowerPoint object model from the add-in.
type: >-
(context: <xref uid="powerpoint!PowerPoint.RequestContext:class" />) => <xref
uid="office!OfficeExtension.IPromise:type" /><T>
return:
type: '<xref uid="office!OfficeExtension.IPromise:type" /><T>'
description: ''
- name: 'PowerPoint.run(object, batch)'
uid: 'powerpoint!PowerPoint.run:function(2)'
package: powerpoint!
summary: >-
Executes a batch script that performs actions on the PowerPoint 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<T>(object: OfficeExtension.ClientObject, batch: (context: PowerPoint.RequestContext) =>
OfficeExtension.IPromise<T>): OfficeExtension.IPromise<T>;
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: '<xref uid="office!OfficeExtension.ClientObject:class" />'
- 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 PowerPoint application. Since the
Office add-in and the PowerPoint application run in two different processes, the RequestContext is required
to get access to the PowerPoint object model from the add-in.
type: >-
(context: <xref uid="powerpoint!PowerPoint.RequestContext:class" />) => <xref
uid="office!OfficeExtension.IPromise:type" /><T>
return:
type: '<xref uid="office!OfficeExtension.IPromise:type" /><T>'
description: ''
- name: 'PowerPoint.run(objects, batch)'
uid: 'powerpoint!PowerPoint.run:function(3)'
package: powerpoint!
summary: >-
Executes a batch script that performs actions on the PowerPoint object model, using the RequestContext of
previously-created API objects.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
export function run<T>(objects: OfficeExtension.ClientObject[], batch: (context: PowerPoint.RequestContext) =>
OfficeExtension.IPromise<T>): OfficeExtension.IPromise<T>;
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: '<xref uid="office!OfficeExtension.ClientObject:class" />[]'
- 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 PowerPoint application. Since the
Office add-in and the PowerPoint application run in two different processes, the RequestContext is required
to get access to the PowerPoint object model from the add-in.
type: >-
(context: <xref uid="powerpoint!PowerPoint.RequestContext:class" />) => <xref
uid="office!OfficeExtension.IPromise:type" /><T>
return:
type: '<xref uid="office!OfficeExtension.IPromise:type" /><T>'
description: ''