officefileapi-devexpress-dot-xtrarichedit-dot-calculatedocumentvariableeventargs-d2d6a149.md
Gets the name of the document variable to which the DOCVARIABLE field refers.
Namespace : DevExpress.XtraRichEdit
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
public string VariableName { get; }
Public ReadOnly Property VariableName As String
| Type | Description |
|---|---|
| String |
A string that is the name of the document variable in the DOCVARIABLE field.
|
The VariableName property enables you to identify a document variable for which the Document.CalculateDocumentVariable event is fired.
The following code snippets (auto-collected from DevExpress Examples) contain references to the VariableName property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-richedit-create-a-master-detail-report/CS/RichEditMasterDetailMailMerge/Form1.cs#L76
//Check whether the event is raised to the required field:
if (e.VariableName == "Categories")
{
wpf-richedit-use-docvariable-fields/CS/MainWindow.xaml.cs#L73
Console.WriteLine(e.VariableName + " " + location);
word-document-api-create-master-detail-report/CS/Program.cs#L68
{
if (e.VariableName == "IMAGE")
{
how-to-use-docvariable-fields/CS/DocumentVariablesExample/Form1.cs#L81
}
switch (e.VariableName) {
case "Weather":
word-document-api-use-docvariable-fields/CS/Program.cs#L57
}
switch (e.VariableName)
{
winforms-richedit-create-a-master-detail-report/VB/RichEditMasterDetailMailMerge/Form1.vb#L71
'Check whether the event is raised to the required field:
If e.VariableName = "Categories" Then
'Provide the data source for the next document part:
wpf-richedit-use-docvariable-fields/VB/MainWindow.xaml.vb#L71
Dim location As String = e.Arguments(0).Value.ToString()
Console.WriteLine(e.VariableName & " " & location)
If(Equals(location.Trim(), String.Empty)) OrElse location.Contains("<") Then
word-document-api-create-master-detail-report/VB/Program.vb#L69
Private Sub WordProcessor_OnCalculateDocumentVariable(sender As Object, e As CalculateDocumentVariableEventArgs)
If e.VariableName = "IMAGE" Then
Dim pictureProcessor As New RichEditDocumentServer()
how-to-use-docvariable-fields/VB/DocumentVariablesExample/Form1.vb#L81
Select Case e.VariableName
Case "Weather"
word-document-api-use-docvariable-fields/VB/Program.vb#L46
Select Case e.VariableName
Case "Weather"
See Also
CalculateDocumentVariableEventArgs Class