DocumentBase.DisableFeaturesIntroducedAfter Property

Definition

Gets or sets a value that determines whether all features introduced after a specified version of Microsoft Office Word are disabled in the document only.

public Microsoft.Office.Interop.Word.WdDisableFeaturesIntroducedAfter DisableFeaturesIntroducedAfter { get; set; }

Property Value

One of the WdDisableFeaturesIntroducedAfter values.

Examples

The following code example disables all features added after Word for Windows 95, versions 7.0 and 7.0a, for the document. To use this example, run it from the ThisDocument class in a document-level project.

private void DocumentDisableFeaturesIntroducedAfter()
{
    if (this.DisableFeatures == true)
    {
        this.DisableFeaturesIntroducedAfter = Word.
            WdDisableFeaturesIntroducedAfter.wd70;
    }
        else
    {
        this.DisableFeatures = true;
        this.DisableFeaturesIntroducedAfter = Word.
            WdDisableFeaturesIntroducedAfter.wd70;
    }
}

Remarks

The DisableFeatures property must be set to true prior to setting the DisableFeaturesIntroducedAfter property. Otherwise, the setting will not take effect and will remain at its default setting of Word 97 for Windows.

The DisableFeaturesIntroducedAfter property only affects the document for which the property is set. If you want to set a global option for the application to disable features for all documents, use the DisableFeaturesIntroducedAfterbyDefault property.

Applies to

Ürün Sürümler
Visual Studio Tools for Office 2017, 2019, 2022