DocumentVariables Property |
Returns the collection of variables added to a document or template.
Namespace:
Aspose.Words
Assembly:
Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntaxpublic VariableCollection Variables { get; }
Public ReadOnly Property Variables As VariableCollection
Get
public:
property VariableCollection^ Variables {
VariableCollection^ get ();
}
member Variables : VariableCollection with get
Property Value
Type:
VariableCollection
ExamplesShows how to enumerate over document variables.
Document doc = new Document(MyDir + "Document.docx");
foreach (KeyValuePair<string, string> entry in doc.Variables)
{
string name = entry.Key;
string value = entry.Value;
Console.WriteLine("Name: {0}, Value: {1}", name, value);
}
See Also