2017-06-26 9 views
0

私はOutlook 365用の単純なアドインで作業しますが、office.context変数は常に空のため、私はいくつかの単純な点を見逃しているようです例のベースコードサンプル:outlook 365アドイン:Office.contextは常に空です

// The initialize function is required for all apps. 
Office.initialize = function() { 
    // Checks for the DOM to load using the jQuery ready function. 
    $(document).ready(function() { 
    // After the DOM is loaded, app-specific code can run. 
    var item = Office.context.mailbox.item; 
    var subject = item.subject; 
    // Continue with processing the subject of the current item, 
    // which can be a message or appointment. 
    }); 
} 

私は何が恋しいですか?アドインのアクセス権が最も高い - ReadWriteMailbox

答えて

0

例:https://github.com/OfficeDev/Outlook-Add-in-Commands-Translator home.htmlとhome.jsの部分が必要です。

私はこのコードの一部は、あなたのケースで作業する必要があると思う:

(function() { 
    'use strict'; 

// The initialize function must be run each time a new page is loaded 
Office.initialize = function (reason) { 
$(document).ready(function() { 
    ** now try to get the item ** 


}); 
}; })(); 

私はそれを試してみて、それが私のために仕事.. 幸運です。

関連する問題