The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

Comment.BeginUpdate() Method

Provides access to a comment's content to start editing.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v19.2.Core.dll

Declaration

SubDocument BeginUpdate()
Function BeginUpdate As SubDocument
SubDocument BeginUpdate()
Function BeginUpdate As SubDocument
SubDocument BeginUpdate()
Function BeginUpdate As SubDocument

Returns

Type Description
SubDocument

A SubDocument object which is the content of the comment.

Returns

Type Description
SubDocument

A SubDocument object which is the content of the comment.

Returns

Type Description
SubDocument

A SubDocument object which is the content of the comment.

Remarks

The BeginUpdate method allows you to change the content of a current comment. Use the Comment.EndUpdate method to finalize editing.

Examples

Document document = server.Document;
document.LoadDocument("Documents\\Grimm.docx", DocumentFormat.OpenXml);
int commentCount = document.Comments.Count;
if (commentCount > 0)
{
    Comment comment = document.Comments[document.Comments.Count - 1];
    if (comment != null)
    {
        SubDocument commentDocument = comment.BeginUpdate();
        commentDocument.InsertText(commentDocument.CreatePosition(0), "some text");
        commentDocument.Tables.Create(commentDocument.CreatePosition(9), 5, 4);
        comment.EndUpdate(commentDocument);
    }
}
See Also