com.aspose.words
Class VariableCollection

java.util.TreeMap
    extended by com.aspose.words.VariableCollection

public class VariableCollection 
extends java.util.TreeMap

A collection of document variables.

Variable names and values are strings.

Variable names are case insensitive.

Example:

Shows how to enumerate over document variables.
Document doc = new Document(getMyDir() + "Document.doc");

for (Map.Entry entry : doc.getVariables().entrySet())
{
    String name = entry.getKey().toString();
    String value = entry.getValue().toString();

    // Do something useful.
    System.out.println(MessageFormat.format("Name: {0}, Value: {1}", name, value));
}

Property Getters/Setters Summary
java.lang.Stringget(java.lang.String name)
voidset(java.lang.String name, java.lang.String value)
           Gets or a sets a document variable by case-insensitive name.
 

Property Getters/Setters Detail

get/set

public java.lang.String get(java.lang.String name) / public void set(java.lang.String name, java.lang.String value)
Gets or a sets a document variable by case-insensitive name.

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.