Share via


Document.Final Property (2007 System)

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

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

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public Property Final As Boolean
'Usage
Dim instance As Document 
Dim value As Boolean 

value = instance.Final

instance.Final = value
[BrowsableAttribute(false)]
public bool Final { get; set; }
[BrowsableAttribute(false)]
public:
property bool Final {
    bool get ();
    void set (bool value);
}
public function get Final () : boolean 
public function set Final (value : boolean)

Property Value

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

Remarks

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.

Examples

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.

This example is for a document-level customization.

Private Sub SetDocumentToFinal()
    If Me.Final = False Then
        MessageBox.Show("The current document is not final. " + _
                        "Setting it to be final.")
        Me.Final = True 
    Else
        MessageBox.Show("The current document is final.")
    End If 
End Sub
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.");
    }
}

.NET Framework Security

See Also

Reference

Document Class

Document Members

Microsoft.Office.Tools.Word Namespace