scripting:collections

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
scripting:collections [2014/09/25 14:52] – created alexscripting: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/properties: 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 ===== ===== Syntax =====
 ==== JavaScript ==== ==== JavaScript ====
 <code javascript> <code javascript>
-var pBookmarks DocumentData.Bookmarks; +var oOutput Application.Output("Test Output"); 
-</code>==== Visual Basic Script ====+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 + ")"); 
 + 
 +</code> 
 +==== Visual Basic Script ====
 <code vb> <code vb>
 pBookmarks = DocumentData.Bookmarks pBookmarks = DocumentData.Bookmarks