Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| scripting:collections [2014/09/25 14:52] – created alex | scripting:collections [2018/01/10 20:36] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| In general case collection object has following method/ | In general case collection object has following method/ | ||
| + | ^Property^ Description^ | ||
| + | |**Count**| Returns number of items in collection| | ||
| + | |||
| + | ^Method^ Description^ | ||
| + | |**Item**| Returns item object by index| | ||
| ===== Syntax ===== | ===== Syntax ===== | ||
| ==== JavaScript ==== | ==== JavaScript ==== | ||
| <code javascript> | <code javascript> | ||
| - | var pBookmarks | + | var oOutput |
| - | </ | + | var oBookmarks = ActiveDocument.Bookmarks; |
| + | |||
| + | for (var i = 1; i <= oBookmarks.Count; | ||
| + | var oBookmark = oBookmarks.Item(i) | ||
| + | } | ||
| + | |||
| + | output.writeln( i + " : " + Syntaxes.Item(i).Name + " (" + Syntaxes[i].Description + " | ||
| + | |||
| + | </ | ||
| + | ==== Visual Basic Script ==== | ||
| <code vb> | <code vb> | ||
| pBookmarks = DocumentData.Bookmarks | pBookmarks = DocumentData.Bookmarks | ||