You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An object that specifies paging information and the properties to load when context.sync() is called.
3
+
An object that specifies paging information and the properties to load when context.sync() is called.
4
4
5
5
_Applies to: Word 2016, Word for iPad, Word for Mac_
6
6
@@ -9,34 +9,34 @@ _Applies to: Word 2016, Word for iPad, Word for Mac_
9
9
|:---------------|:--------|:----------|
10
10
|select|object|Contains a comma delimited list or an array of parameter/relationship names. Optional.|
11
11
|expand|object|Contains a comma delimited list or an array of relationship names. Optional.|
12
-
|top|int| Specifies the maximum number of collection items that can be included in the result. Optional.|
13
-
|skip|int|Specify the number of items in the collection that are to be skipped and not included in the result. If `top` is specified, the result set will start after skipping the specified number of items. Optional.|
12
+
|top|int| Specifies the maximum number of collection items that can be included in the result. Optional. You can only use this option when you use the object notation option.|
13
+
|skip|int|Specify the number of items in the collection that are to be skipped and not included in the result. If `top` is specified, the result set will start after skipping the specified number of items. Optional. You can only use this option when you use the object notation option.|
14
14
15
15
## More information
16
16
17
17
The preferred method for specifying the properties and paging information is by using a string literal. The first two examples show the preferred way to request the text and font size properties for paragraphs in a paragraph collection:
Note that if we don't specify the specific properties on the font object in the select statement, the expand statement by itself would indicate that all of the font properties are loaded.
35
+
Note that if we don't specify the specific properties on the font object in the select statement, the expand statement by itself would indicate that all of the font properties are loaded.
36
36
37
37
## Examples
38
38
39
-
This example shows how to get the top 50 paragraphs in the Word document along with their text and font size properties.
39
+
This example shows how to get the paragraphs in the Word document along with their text and font size properties.
40
40
41
41
```js
42
42
// Run a batch operation against the Word object model.
@@ -45,15 +45,15 @@ This example shows how to get the top 50 paragraphs in the Word document along w
45
45
// Create a proxy object for the paragraphs collection.
46
46
var paragraphs =context.document.body.paragraphs;
47
47
48
-
// Queue a commmand to load the text and font properties for the top 50 paragraphs.
48
+
// Queue a commmand to load the text and font properties.
49
49
// It is best practice to always specify the property set. Otherwise, all properties are
// Synchronize the document state by executing the queued commands,
53
+
// Synchronize the document state by executing the queued commands,
54
54
// and return a promise to indicate task completion.
55
55
returncontext.sync().then(function () {
56
-
56
+
57
57
// Insert code that works with the paragraphs loaded by context.load().
58
58
59
59
})
@@ -68,4 +68,4 @@ This example shows how to get the top 50 paragraphs in the Word document along w
68
68
69
69
## Support details
70
70
71
-
Use the [requirement set](https://msdn.microsoft.com/EN-US/library/office/mt590206.aspx) in run time checks to make sure your application is supported by the host version of Word. For more information about Office host application and server requirements, see [Requirements for running Office Add-ins](https://msdn.microsoft.com/EN-US/library/office/dn833104.aspx).
71
+
Use the [requirement set](https://msdn.microsoft.com/EN-US/library/office/mt590206.aspx) in run time checks to make sure your application is supported by the host version of Word. For more information about Office host application and server requirements, see [Requirements for running Office Add-ins](https://msdn.microsoft.com/EN-US/library/office/dn833104.aspx).
0 commit comments