このトピックでは、プレゼンテーションドキュメントのコメントオブジェクトに関連するAPI操作について説明します。
コメント
ActivePresentation.Slides.Comments
プレゼンテーション内のすべてのコメントを取得します。
JS-SDK V1.1.14以降のみがこの機能をサポートしています。
PCのみがこの機能をサポートしています。
構文
expression.ActivePresentation.Slides.Commentsexpression: ドキュメントタイプのアプリケーションオブジェクト。
例
async function example() { await instance.ready(); const app = instance.Application; // プレゼンテーション内のすべてのコメントを取得します。 await app.ActivePresentation.Slides.Comments; }
メソッド
ActivePresentation.Slides.Comments.Add()
Add()メソッドを使用してコメントを追加できます。
JS-SDK V1.1.14以降のみがこの機能をサポートしています。
PCのみがこの機能をサポートしています。
構文
expression.ActivePresentation.Slides.Comments.Add({ SlideId, Text, Replyer })expression: ドキュメントタイプのアプリケーションオブジェクト。
パラメーター
プロパティ
タイプ
必須
説明
SlideId
Number
はい
スライドのID。
Text
String
はい
コメントのテキスト。
Replyer
Object
はい
コメントに関する情報。
Replyerパラメーターの説明
プロパティ
タイプ
必須
説明
AuthorName
String
はい
作成者の名前。
AuthorId
String
はい
作成者のID。
CommentId
String
はい
コメントのID。
例
async function example() { await instance.ready(); const app = instance.Application; // 最初のコメントを取得します。 let item1 = await app.ActivePresentation.SlideShowWindow.View.Slide.Comments.Item(1); let SlideId = await item1.SlideId; let Text ='これは新しいコメントです'; let Author = await item1.Author; let AuthorId = await item1.AuthorId; let CommentId = await item1.CommentId; // コメントを追加します。 await app.ActivePresentation.SlideShowWindow.View.Slide.Comments.Add({ SlideId, Text, Replyer: { Author, AuthorId, CommentId, }, }); }
ActivePresentation.Slides.Comments.GoToCommentItem()
GoToCommentItem()メソッドを使用して、コメントの位置にジャンプできます。
JS-SDK V1.1.14以降のみがこの機能をサポートしています。
PCのみがこの機能をサポートしています。
構文
expression.ActivePresentation.Slides.Comments.GoToCommentItem({ SlideId, CommentId })expression: ドキュメントタイプのアプリケーションオブジェクト。
パラメーター
プロパティ
タイプ
必須
説明
SlideId
Number
はい
スライドのID。
CommentId
String
はい
コメントのID。
例
async function example() { await instance.ready(); const app = instance.Application; // 最初のコメントを取得します。 let item1 = await app.ActivePresentation.SlideShowWindow.View.Slide.Comments.Item(1); let SlideId = await item1.SlideId; let CommentId = await item1.CommentId; // 指定されたコメントの位置にジャンプします。 await app.ActivePresentation.SlideShowWindow.View.Slide.Comments.GoToCommentItem({ SlideId, CommentId }); }
プロパティ
ActivePresentation.Slides.Comments.Count
Countプロパティを使用して、コメントの総数を取得できます。
JS-SDK V1.1.14以降のみがこの機能をサポートしています。
PCのみがこの機能をサポートしています。
構文
expression.ActivePresentation.Slides.Comments.Countexpression: ドキュメントタイプのアプリケーションオブジェクト。
例
async function example() { await instance.ready(); const app = instance.Application; // コメントの総数を取得します。 const count = await app.ActivePresentation.SlideShowWindow.View.Slide.Comments.Count; console.log(count); }
コメント
ActivePresentation.Slides.Comments.Item()
単一のコメントオブジェクトを取得します。
JS-SDK V1.1.14以降のみがこの機能をサポートしています。
PCのみがこの機能をサポートしています。
構文
expression.ActivePresentation.Slides.Comments.Item(Index)expression: ドキュメントタイプのアプリケーションオブジェクト。
パラメーター
プロパティ
タイプ
必須
説明
Index
Number
はい
コメントのインデックス番号。
例
async function example() { await instance.ready(); const app = instance.Application; // 最初のコメントを取得します。 let item1 = await app.ActivePresentation.SlideShowWindow.View.Slide.Comments.Item(1); console.log(item1); }
プロパティ
ActivePresentation.Slides.Comments.Item(Index).Author
Authorプロパティを使用して、コメントの作成者を取得できます。
JS-SDK V1.1.14以降のみがこの機能をサポートしています。
PCのみがこの機能をサポートしています。
構文
expression.ActivePresentation.Slides.Comments.Item(Index).Authorexpression: ドキュメントタイプのアプリケーションオブジェクト。
例
async function example() { await instance.ready(); const app = instance.Application; // 最初のコメントの作成者を取得します。 let Author = await app.ActivePresentation.SlideShowWindow.View.Slide.Comments.Item(1).Author; console.log(Author); }
ActivePresentation.Slides.Comments.Item(Index).AuthorId
AuthorIdプロパティを使用して、コメントの作成者IDを取得できます。
JS-SDK V1.1.14以降のみがこの機能をサポートしています。
PCのみがこの機能をサポートしています。
構文
expression.ActivePresentation.Slides.Comments.Item(Index).AuthorIdexpression: ドキュメントタイプのアプリケーションオブジェクト。
例
async function example() { await instance.ready(); const app = instance.Application; // 最初のコメントの作成者IDを取得します。 let AuthorId = await app.ActivePresentation.SlideShowWindow.View.Slide.Comments.Item(1).AuthorId; console.log(AuthorId); }
ActivePresentation.Slides.Comments.Item(Index).CommentId
CommentIdプロパティを使用して、コメントのIDを取得できます。
JS-SDK V1.1.14以降のみがこの機能をサポートしています。
PCのみがこの機能をサポートしています。
構文
expression.ActivePresentation.Slides.Comments.Item(Index).CommentIdexpression: ドキュメントタイプのアプリケーションオブジェクト。
例
async function example() { await instance.ready(); const app = instance.Application; // 最初のコメントのIDを取得します。 let CommentId = await app.ActivePresentation.SlideShowWindow.View.Slide.Comments.Item(1).CommentId; console.log(CommentId); }
ActivePresentation.Slides.Comments.Item(Index).DateTime
DateTimeプロパティを使用して、コメントのタイムスタンプを取得できます。
JS-SDK V1.1.14以降のみがこの機能をサポートしています。
PCのみがこの機能をサポートしています。
構文
expression.ActivePresentation.Slides.Comments.Item(Index).DateTimeexpression: ドキュメントタイプのアプリケーションオブジェクト。
例
async function example() { await instance.ready(); const app = instance.Application; // 最初のコメントのタイムスタンプを取得します。 let DateTime = await app.ActivePresentation.SlideShowWindow.View.Slide.Comments.Item(1).DateTime; console.log(DateTime); }
ActivePresentation.Slides.Comments.Item(Index).Replies
Repliesプロパティを使用して、コメントへの返信のリストを取得できます。
JS-SDK V1.1.14以降のみがこの機能をサポートしています。
PCのみがこの機能をサポートしています。
構文
expression.ActivePresentation.Slides.Comments.Item(Index).Repliesexpression: ドキュメントタイプのアプリケーションオブジェクト。
例
async function example() { await instance.ready(); const app = instance.Application; // 最初のコメントへの返信のリストを取得します。 let Replies = await app.ActivePresentation.SlideShowWindow.View.Slide.Comments.Item(1).Replies; console.log(Replies); }
ActivePresentation.Slides.Comments.Item(Index).SlideId
SlideIdプロパティを使用して、コメントが属するスライドのIDを取得できます。
JS-SDK V1.1.14以降のみがこの機能をサポートしています。
PCのみがこの機能をサポートしています。
構文
expression.ActivePresentation.Slides.Comments.Item(Index).SlideIdexpression: ドキュメントタイプのアプリケーションオブジェクト。
例
async function example() { await instance.ready(); const app = instance.Application; // 最初のコメントが属するスライドのIDを取得します。 let SlideId = await app.ActivePresentation.SlideShowWindow.View.Slide.Comments.Item(1).SlideId; console.log(SlideId); }
ActivePresentation.Slides.Comments.Item(Index).Text
Textプロパティを使用して、コメントのテキストを取得できます。
JS-SDK V1.1.14以降のみがこの機能をサポートしています。
PCのみがこの機能をサポートしています。
構文
expression.ActivePresentation.Slides.Comments.Item(Index).Textexpression: ドキュメントタイプのアプリケーションオブジェクト。
例
async function example() { await instance.ready(); const app = instance.Application; // 最初のコメントのテキストを取得します。 let Text = await app.ActivePresentation.SlideShowWindow.View.Slide.Comments.Item(1).Text; console.log(Text); }