Skip to content

Instantly share code, notes, and snippets.

@davecra
Created September 13, 2023 13:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davecra/6bdf13223c7725c90f9d58e17d40c934 to your computer and use it in GitHub Desktop.
Save davecra/6bdf13223c7725c90f9d58e17d40c934 to your computer and use it in GitHub Desktop.
Office OnReady in JSRuntime
/**
* Ensures the Office.js library is loaded.
*/
Office.onReady((info) => {
/**
* Maps the event handler name specified in the manifest's LaunchEvent element to its JavaScript counterpart.
* This ensures support in Outlook on Windows.
*/
if (Office.context.platform === Office.PlatformType.PC || Office.context.platform == null) {
Office.actions.associate("onMessageSendHandler", onMessageSendHandler);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment