using Office.context.requirements.isSetSupported
, It is possible to programmatically check if requirement sets are supported by your add-in's Office host.
if the Office host doesn't support the requirement set, isSetSupported
returns false
The following code shows the usage of isSetSupported
method.
if (Office.context.requirements.isSetSupported(RequirementSetName, MinimumVersion)) {
}
Example
if (Office.context.requirements.isSetSupported('WordApi', '1.1'))
{
// Run code that provides additional functionality using the Word JavaScript API when the add-in runs in Word 2016 or later.
}
Top comments (0)