Export (0) Print
Expand All
Expand Minimize

DocumentBase.Final Property

Gets or sets a value that indicates whether the document is final.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

public bool Final { get; set; }

Property Value

Type: System.Boolean
true if the document is final; otherwise, false.

If you set this property to true, Microsoft Office Word marks the document as final, notifies recipients (if any) that the document is final, and sets the document to read-only.

The following code example retrieves the Final property of the current document. If the document is not already final, the code shows a message that informs the user that the document is not final, and then sets the Final property to true. Word also displays a message before the document is marked final. If the document is already final, the code shows a message that informs the user that the document is already final. To use this example, run it from the ThisDocument class in a document-level project.

private void SetDocumentToFinal()
{
    if (this.Final == false)
    {
        MessageBox.Show("The current document is not final. Setting " 
            + "it to be final.");
        this.Final = true;
    }
    else
    {
        MessageBox.Show("The current document is final.");
    }
}

Show:
© 2014 Microsoft