Outlookアプリケーションで使用される場合、プロパティOffice.context.officeThemeは定義されていません:Official documentation。 Word、Excel、PowerPointでは、プロパティが定義され、子プロパティ(bodyBackgroundColor、controlForegroundColorなど)にアクセスできます。最新版(1.1.0.13)と以前のバージョン(1.1.0.12)のOffice.JSを試しましたが、うまくいきません。私の見通し版は:1711(Build 8730.2127)であり、私も最新のインサイダービルドで試しました。サンプルコード:製品チームから受信した情報毎のOffice.context.officeThemeプロパティが定義されていません
Office.initialize = function (reason) {
$(document).ready(function() {
// The "Office" object and its "context" property are valid but the "officeTheme" property is undefined.
// This works in Word, Excel and PowerPoint but not in Outlook.
if (!Office.context.officeTheme) {
console.log("Office theme not loaded");
}
});
}
サンプルコードを追加できますか? –
最初の投稿を私が使ったコードで編集しました。 – Eric