DocumentProperties methods

The DocumentProperties interface supports two methods, Add and item.

Add(strName,strValue) 
Returns   No return value 
Description  Creates a new property with name strName and value strValue and adds it to the collection represented by the DocumentProperties object. 
Usage 
JScript  DocumentProperties_object.Add("strName","strValue"); 
VBScript  DocumentProperties_object.Add "strName","strValue"  
Example 
// SoftQuad Script Language JSCRIPT:
var curDoc, curDocProps;
curDoc=Application.ActiveDocument;
curDocProps=curDoc.CustomDocumentProperties;
curDocProps.Add("Checked","1");
 

item(variantIndex) 
Returns   DocumentProperty 
Description  Returns the DocumentProperty object indexed by variantIndex. variantIndex can be an integer starting at 1, or a string. 
Usage 
JScript  DocumentProperty_object.item(variantIndex); 
VBScript  DocumentProperty_object.item(variantIndex) 
Example 
// SoftQuad Script Language JSCRIPT:
var curDoc, curDocProps, prop1;
curDoc=Application.ActiveDocument;
curDocProps=curDoc.CustomDocumentProperties;
if (curDocProps.count!=0) {
   prop1=curDocProps.item(1);
}
 


Right arrow
Next Topic
Left arrow
Previous Topic
Table of contents
Table of Contents

Copyright © SoftQuad Software Inc. 1999