This is an old revision of the document!
Collection Objects
Collection objects used in different HE API calls and simplify access to object sets.
In general case collection object has following method/properties:
| Property | Description |
|---|---|
| Count | Returns number of items in collection |
| Method | Description |
|---|---|
| Item | Returns item object by index |
Syntax
JavaScript
var oOutput = Application.Output("Test Output"); var oBookmarks = ActiveDocument.Bookmarks; for (var i = 1; i <= oBookmarks.Count; ++i) { var oBookmark = oBookmarks.Item(i) } output.writeln( i + " : " + Syntaxes.Item(i).Name + " (" + Syntaxes[i].Description + ")");
Visual Basic Script
pBookmarks = DocumentData.Bookmarks
C++
CComPtr<IBookmarks> pBookmarks; HRESULT hr = DocumentData.get_Bookmarks(&pBookmarks);