2017-05-05 9 views
0

OneNoteでインクストロークオブジェクトを取得するためのAPIがあります。例/ documentationでは、InkStrokeオブジェクトを取得するコードを実行できます。私の理解では、HighlighterストロークはOneNoteオブジェクトモデルのFloatingInkです。脳卒中そのものに関する情報を得ることは可能ですか?次のようなドキュメントが表示されますが、「id」プロパティを使用できるように見えるだけです。OneNote InkStroke/FloatingInk API

OneNote.run(function(context) { 

    // Gets the active page. 
    var page = context.application.getActivePage(); 
    var contents = page.contents; 

    // Load page contents and their types. 
    page.load('contents/type'); 
    return context.sync() 
     .then(function(){ 

      // Load every ink content. 
      $.each(contents.items, function(i, content) { 
       if (content.type == "Ink"){ 
        content.load('ink/id'); 
       }       
      }) 
      return context.sync(); 
     }) 
     .then(function(){ 

      // Log ID of every ink content. 
      $.each(contents.items, function(i, content) { 
       if (content.type == "Ink"){ 
        console.log(content.ink.id); 
       }       
      })    
     }); 
}) 
.catch(function(error) { 
    console.log("Error: " + error); 
    if (error instanceof OfficeExtension.Error) { 
     console.log("Debug info: " + JSON.stringify(error.debugInfo)); 
    } 
}); 

答えて

1

EDIT:理想的ではないが、あなたはRestApiIdを取得し、この情報が含まれますInkMLの文書を、取得するために、API呼び出しを作ることができます。

https://blogs.msdn.microsoft.com/onenotedev/2017/07/07/onenote-ink-beta-apis/


残念ながら、インクストロークは、アドインをOneNoteのからの座標情報を取得する方法はありません。ユーザーボイスアイテムを提出して、ここにリンクさせることをお勧めします。

https://onenote.uservoice.com/forums/245490-onenote-developer-apis/

+1

追加アドインからRestApiIdになるだろうどのようにユーザーボイス –

+0

に要求? –

+0

ここ:https://stackoverflow.com/questions/44753454/getrestapiid-function-in-objects-from-office-js-for-onenote –

関連する問題