FeatureInstall Property Example
This example activates a new instance of Microsoft Word and checks the value of the FeatureInstall property. If the property is set to msoFeatureInstallNone, the code displays a message box that asks the user whether they want to change the property setting. If the user responds Yes, the property is set to msoFeatureInstallOnDemand.
Dim WordApp As New Word.Application, Reply As Integer
With WordApp
.ActivateMicrosoftApp
If .FeatureInstall = msoFeatureInstallNone Then
Reply = MsgBox("Uninstalled features for this " _
& "application " & vbCrLf _
& "may cause a run-time error when called." & vbCrLf _
& vbCrLf _
& "Would you like to change this setting" & vbCrLf _
& "to automatically install missing features?" _
, 52, "Feature Install Setting")
If Reply = 6 Then
.FeatureInstall = msoFeatureInstallOnDemand
End If
End If
End With