[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Pivot Grid
  [Expand]Spreadsheet
  [Collapse]Rich Text Editor
   [Expand]Product Information
    Getting Started
   [Collapse]Concepts
     ASPxRichEdit Control
    [Expand]Document
     Supported Document Formats and Printing
     Import and Export
     Formatting Characters
     Formatting Paragraphs
     AutoCorrect
    [Collapse]Fields
     [Collapse]Field Codes
       DATE
       DOCVARIABLE
       HYPERLINK
       MERGEFIELD
       NUMPAGES
       PAGE
       TIME
       PAGEREF
       TOC
       SEQ
       TC
     Mail Merge
     Table of Contents
     Restrictions
     Spell Checking
    [Expand]Client API
    [Expand]Built-in Dialogs
     Adaptivity
     HTML Tag Interpretation
     Keyboard Shortcuts
   [Expand]Examples
  [Expand]Scheduler
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Gauges
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

DOCVARIABLE

DOCVARIABLE

Mixed field

{ DOCVARIABLE "variable name" "argument1" "argument 2"... }

Inserts the value of a document variable specified by a text in the field argument(s). Before a field is updated, the ASPxRichEdit.CalculateDocumentVariable event is fired allowing you to manually calculate the required value. The CalculateDocumentVariableEventArgs.Arguments provides access to a collection of arguments contained within the field.

A common task is to evaluate DOCVARIABLE fields in a document depending on the variable name and argument, and then substitute fields with their values.

Note

You can return the text or the entire IRichEditDocumentServer.Document as a document variable.

Expanded See Also

Is this topic helpful?​​​​​​​