[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Collapse]Office File API
  Demo Application
  Redistribution and Deployment
 [Expand]Spreadsheet Document API
 [Expand]Word Processing Document API
 [Expand]PDF Document API
 [Expand]Excel Export Library
 [Expand]Snap Report API
 [Expand]Zip Compression and Archive API
 [Expand]Barcode Generation API
 [Expand]Unit Conversion API
 [Collapse]API Reference
  [Expand]DevExpress.BarCodes
  [Expand]DevExpress.Compression
  [Expand]DevExpress.Docs.Text
  [Expand]DevExpress.Office
  [Expand]DevExpress.Office.Drawing
  [Expand]DevExpress.Office.Export
  [Expand]DevExpress.Office.Export.Html
  [Expand]DevExpress.Office.Import
  [Expand]DevExpress.Office.Localization
  [Expand]DevExpress.Office.Options
  [Expand]DevExpress.Office.Services
  [Expand]DevExpress.Office.Utils
  [Expand]DevExpress.Pdf
  [Expand]DevExpress.Pdf.Localization
  [Expand]DevExpress.Snap
  [Expand]DevExpress.Spreadsheet
  [Expand]DevExpress.Spreadsheet.Charts
  [Expand]DevExpress.Spreadsheet.Drawings
  [Expand]DevExpress.Spreadsheet.Export
  [Expand]DevExpress.Spreadsheet.Formulas
  [Expand]DevExpress.Spreadsheet.Functions
  [Expand]DevExpress.UnitConversion
  [Expand]DevExpress.XtraPrinting
  [Expand]DevExpress.XtraPrintingLinks
  [Collapse]DevExpress.XtraRichEdit
   [Expand]Argument Class
   [Expand]ArgumentCollection Class
   [Expand]AuthenticationOptions Class
   [Expand]AutoCorrectEventArgs Class
    AutoCorrectEventHandler Delegate
   [Expand]AutoCorrectInfo Class
   [Expand]AutoCorrectOptions Class
   [Expand]AutoCorrectReplaceInfo Class
   [Expand]AutoCorrectReplaceInfoCollection Class
    AutoSizeMode Enumeration
   [Expand]BeforeExportEventArgs Class
    BeforeExportEventHandler Delegate
   [Expand]BeforeImportEventArgs Class
    BeforeImportEventHandler Delegate
   [Expand]BeforePagePaintEventArgs Class
    BeforePagePaintEventHandler Delegate
   [Expand]BookmarkFormShowingEventArgs Class
    BookmarkFormShowingEventHandler Delegate
   [Expand]BookmarkOptions Class
   [Collapse]CalculateDocumentVariableEventArgs Class
     CalculateDocumentVariableEventArgs Members
    [Collapse]CalculateDocumentVariableEventArgs Properties
      Arguments Property
      FieldLocked Property
      Handled Property
      KeepLastParagraph Property
      PreserveInsertedContentFormatting Property
      Value Property
      VariableName Property
    CalculateDocumentVariableEventHandler Delegate
    CalculationModeType Enumeration
   [Expand]ColumnsSetupFormShowingEventArgs Class
    ColumnsSetupFormShowingEventHandler Delegate
   [Expand]CommentEditingEventArgs Class
    CommentEditingEventHandler Delegate
   [Expand]CommentOptions Class
    ConflictNameAction Enumeration
   [Expand]CopyPasteOptions Class
   [Expand]CustomizeMergeFieldsEventArgs Class
    CustomizeMergeFieldsEventHandler Delegate
   [Expand]DataFormatOptions Class
   [Expand]DecryptionFailedEventArgs Class
    DecryptionFailedEventHandler Delegate
   [Expand]DeleteTableCellsFormShowingEventArgs Class
    DeleteTableCellsFormShowingEventHandler Delegate
   [Expand]DocumentCapabilitiesOptions Class
    DocumentCapability Enumeration
   [Expand]DocumentExportCapabilities Structure
   [Expand]DocumentFormat Structure
    DocumentLayoutUnit Enumeration
   [Expand]DocumentPropertiesFormShowingEventArgs Class
    DocumentPropertiesFormShowingEventHandler Delegate
   [Expand]DocumentProtectionQueryNewPasswordFormShowingEventArgs Class
    DocumentProtectionQueryNewPasswordFormShowingEventHandler Delegate
   [Expand]DocumentProtectionQueryPasswordFormShowingEventArgs Class
    DocumentProtectionQueryPasswordFormShowingEventHandler Delegate
   [Expand]DocumentSaveOptions Class
   [Expand]DocumentSearchOptions Class
   [Expand]DocumentVariableCollection Class
   [Expand]DocVariableValue Class
   [Expand]DraftView Class
   [Expand]DraftViewLayoutOptions Class
    DragDropMode Enumeration
   [Expand]EditStyleFormShowingEventArgs Class
    EditStyleFormShowingEventHandler Delegate
   [Expand]EncryptDocumentFormShowingEventArgs Class
    EncryptDocumentFormShowingEventHandler Delegate
   [Expand]EncryptedFileIntegrityCheckFailedEventArgs Class
    EncryptedFileIntegrityCheckFailedEventHandler Delegate
   [Expand]EncryptedFilePasswordCheckFailedEventArgs Class
    EncryptedFilePasswordCheckFailedEventHandler Delegate
   [Expand]EncryptedFilePasswordRequestedEventArgs Class
    EncryptedFilePasswordRequestedEventHandler Delegate
   [Expand]FieldOptions Class
    FieldsHighlightMode Enumeration
   [Expand]FloatingInlineObjectLayoutOptionsFormShowingEventArgs Class
    FloatingInlineObjectLayoutOptionsFormShowingEventHandler Delegate
   [Expand]FontFormShowingEventArgs Class
    FontFormShowingEventHandler Delegate
   [Expand]FormattingMarkVisibilityOptions Class
   [Expand]FormShowingEventArgs Class
   [Expand]HeaderFooterEditingEventArgs Class
    HeaderFooterEditingEventHandler Delegate
   [Expand]HitTestManager Class
    HitTestSearchOption Enumeration
   [Expand]HorizontalRulerOptions Class
    HtmlImageSourceType Enumeration
   [Expand]HyperlinkClickEventArgs Class
    HyperlinkClickEventHandler Delegate
   [Expand]HyperlinkFormShowingEventArgs Class
    HyperlinkFormShowingEventHandler Delegate
   [Expand]HyperlinkOptions Class
   [Expand]IDataSourceContainerOptions Interface
   [Expand]InsertMergeFieldFormShowingEventArgs Class
    InsertMergeFieldFormShowingEventHandler Delegate
   [Expand]InsertTableCellsFormShowingEventArgs Class
    InsertTableCellsFormShowingEventHandler Delegate
   [Expand]InsertTableFormShowingEventArgs Class
    InsertTableFormShowingEventHandler Delegate
   [Expand]IRichEditControl Interface
   [Expand]IRichEditDocumentServer Interface
   [Expand]IRichEditViewVisitor Interface
    LineBreakSubstitute Enumeration
   [Expand]LineNumberingFormShowingEventArgs Class
    LineNumberingFormShowingEventHandler Delegate
   [Expand]MailMergeCustomSeparators Class
   [Expand]MailMergeFinishedEventArgs Class
    MailMergeFinishedEventHandler Delegate
   [Expand]MailMergeRecordFinishedEventArgs Class
    MailMergeRecordFinishedEventHandler Delegate
   [Expand]MailMergeRecordStartedEventArgs Class
    MailMergeRecordStartedEventHandler Delegate
   [Expand]MailMergeStartedEventArgs Class
    MailMergeStartedEventHandler Delegate
   [Expand]NumberingListFormShowingEventArgs Class
    NumberingListFormShowingEventHandler Delegate
   [Expand]NumberingOptions Class
    PageBreakInsertMode Enumeration
   [Expand]PageLayoutInfo Structure
   [Expand]PageLayoutPosition Class
   [Expand]PageSetupFormShowingEventArgs Class
    PageSetupFormShowingEventHandler Delegate
   [Expand]ParagraphFormShowingEventArgs Class
    ParagraphFormShowingEventHandler Delegate
    PasteMode Enumeration
   [Expand]PasteSpecialFormShowingEventArgs Class
    PasteSpecialFormShowingEventHandler Delegate
    PdfBookmarkDisplayMode Enumeration
   [Expand]PrintingOptions Class
   [Expand]PrintLayoutView Class
   [Expand]PrintLayoutViewLayoutOptions Class
    PrintPreviewFormKind Enumeration
   [Expand]RangeEditingPermissionsFormShowingEventArgs Class
    RangeEditingPermissionsFormShowingEventHandler Delegate
   [Expand]RangePermissionOptions Class
    RichEditBaseValueSource Enumeration
   [Expand]RichEditBehaviorOptions Class
    RichEditBookmarkVisibility Enumeration
   [Expand]RichEditBrushBase Class
   [Expand]RichEditClipboardSetDataExceptionEventArgs Class
    RichEditClipboardSetDataExceptionEventHandler Delegate
    RichEditCommentVisibility Enumeration
   [Expand]RichEditControlCompatibility Class
   [Expand]RichEditControlOptionsBase Class
    RichEditDashStyle Enumeration
    RichEditDecryptionError Enumeration
   [Expand]RichEditDecryptionException Class
   [Expand]RichEditDocumentServer Class
    RichEditFormattingMarkVisibility Enumeration
   [Expand]RichEditHitTestResult Class
   [Expand]RichEditInvalidFormatExceptionEventArgs Class
    RichEditInvalidFormatExceptionEventHandler Delegate
   [Expand]RichEditLayoutOptions Class
   [Expand]RichEditMailMergeOptions Class
   [Expand]RichEditNotificationOptions Class
   [Expand]RichEditPenBase Class
    RichEditRangePermissionVisibility Enumeration
    RichEditRulerVisibility Enumeration
    RichEditTableGridLinesVisibility Enumeration
   [Expand]RichEditUnhandledExceptionEventArgs Class
    RichEditUnhandledExceptionEventHandler Delegate
   [Expand]RichEditView Class
   [Expand]RichEditViewRepository Class
    RichEditViewType Enumeration
   [Expand]RulerOptions Class
   [Expand]SearchFormShowingEventArgs Class
    SearchFormShowingEventHandler Delegate
   [Expand]ShowFormEventArgs Class
   [Expand]SimpleView Class
   [Expand]SimpleViewLayoutOptions Class
   [Expand]SpellCheckerOptions Class
   [Expand]SpellingErrorLimitExceededEventArgs Class
    SpellingErrorLimitExceededEventHandler Delegate
   [Expand]SplitTableCellsFormShowingEventArgs Class
    SplitTableCellsFormShowingEventHandler Delegate
   [Expand]SymbolFormShowingEventArgs Class
    SymbolFormShowingEventHandler Delegate
   [Expand]TableOptions Class
   [Expand]TableOptionsFormShowingEventArgs Class
    TableOptionsFormShowingEventHandler Delegate
   [Expand]TablePropertiesFormShowingEventArgs Class
    TablePropertiesFormShowingEventHandler Delegate
   [Expand]TableStyleFormShowingEventArgs Class
    TableStyleFormShowingEventHandler Delegate
   [Expand]TabsFormShowingEventArgs Class
    TabsFormShowingEventHandler Delegate
    UpdateDocVariablesBeforePrint Enumeration
    UpdateLockedFields Enumeration
   [Expand]VerticalRulerOptions Class
  [Expand]DevExpress.XtraRichEdit.API.Layout
  [Expand]DevExpress.XtraRichEdit.API.Native
  [Expand]DevExpress.XtraRichEdit.API.Native.Implementation
  [Expand]DevExpress.XtraRichEdit.Commands
  [Expand]DevExpress.XtraRichEdit.Export
  [Expand]DevExpress.XtraRichEdit.Export.Html
  [Expand]DevExpress.XtraRichEdit.Export.PlainText
  [Expand]DevExpress.XtraRichEdit.Export.Rtf
  [Expand]DevExpress.XtraRichEdit.Forms
  [Expand]DevExpress.XtraRichEdit.Import
  [Expand]DevExpress.XtraRichEdit.Localization
  [Expand]DevExpress.XtraRichEdit.Services
  [Expand]DevExpress.XtraRichEdit.Utils
  [Expand]DevExpress.XtraSpreadsheet
  [Expand]DevExpress.XtraSpreadsheet.Export
  [Expand]DevExpress.XtraSpreadsheet.Export.Html
  [Expand]DevExpress.XtraSpreadsheet.Import
  [Expand]DevExpress.XtraSpreadsheet.Localization
  [Expand]DevExpress.XtraSpreadsheet.Services
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

CalculateDocumentVariableEventArgs.KeepLastParagraph Property

Gets or sets whether the last paragraph of the inserted document is kept in the resulting document.

Namespace:DevExpress.XtraRichEdit
Assembly:DevExpress.RichEdit.v19.1.Core.dll

Expanded Syntax

Property value

Type: Boolean
true to retain the last paragraph of the inserted document; otherwise, false.

Expanded Remarks

The Document.CalculateDocumentVariable event allows you to insert a document in place of the DOCVARIABLE field. To accomplish this, you can pass a RichEditDocumentServer instance containing the document as the event argument's Value parameter. Note that this is not the only way to insert a document. You can also pass a Document object or a DocumentRange.

In both cases you can specify the KeepLastParagraph option so that the last paragraph of the inserted document is retained in the resulting document. If set to true, this option preserves the formatting of the last inserted paragraph and adds an extra paragraph in the resulting document.

Expanded See Also

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