Context

This represents the runtime environment of the add-in and provides access to key objects of the API.
The current context exists as a property of Office.

Office.context 

authPProvides information and access to the signed-in user.
commerceAllowedPTrue, if the current platform allows the add-in to display a UI for selling or upgrading; otherwise returns False.
contentLanguagePGets the locale (language) specified by the user for editing the document or item.
diagnosticsPGets information about the environment in which the add-in is running.
displayLanguagePGets the locale (language) specified by the user for the UI of the Office host application.
documentPGets an object that represents the document the content or task pane add-in is interacting with.
hostPContains the Office application host in which the add-in is running. Important: In Outlook, this property is available from requirement set 1.5. For all Mailbox requirement sets, you can use the Office.context.diagnostics property to get the host.
licensePGets the license information for the user's Office installation.
mailboxPProvides access to the Microsoft Outlook add-in object model.
officeThemePProvides access to the properties for Office theme colors.
platformPProvides the platform on which the add-in is running. Important: In Outlook, this property is available from requirement set 1.5. For all Mailbox requirement sets, you can use the Office.context.diagnostics property to get the platform.
requirementsPProvides a method for determining what requirement sets are supported on the current host and platform.
roamingSettingsPGets an object that represents the custom settings or state of a mail add-in saved to a user's mailbox. The RoamingSettings object lets you store and access data for a mail add-in that is stored in a user's mailbox, so it's available to that add-in when it is running from any host client application used to access that mailbox.
touchEnabledPSpecifies whether the platform and device allows touch interaction. True if the add-in is running on a touch device, such as an iPad; false otherwise.
uiPProvides objects and methods that you can use to create and manipulate UI components, such as dialog boxes.

Office.context.diagnostics.host 
Office.context.diagnostics.platform
Office.context.diagnostics.version


© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrevNext