すべてのプロダクト
Search
ドキュメントセンター

Intelligent Media Management:コメント

最終更新日:Dec 27, 2024

このトピックでは、プレゼンテーションドキュメントのコメントオブジェクトに関連するAPI操作について説明します。

コメント

ActivePresentation.Slides.Comments

プレゼンテーション内のすべてのコメントを取得します。

重要
  • JS-SDK V1.1.14以降のみがこの機能をサポートしています。

  • PCのみがこの機能をサポートしています。

  • 構文

    expression.ActivePresentation.Slides.Comments

    expression: ドキュメントタイプのアプリケーションオブジェクト。

  • 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.Count

    expression: ドキュメントタイプのアプリケーションオブジェクト。

  • 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).Author

    expression: ドキュメントタイプのアプリケーションオブジェクト。

  • 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).AuthorId

    expression: ドキュメントタイプのアプリケーションオブジェクト。

  • 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).CommentId

    expression: ドキュメントタイプのアプリケーションオブジェクト。

  • 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).DateTime

    expression: ドキュメントタイプのアプリケーションオブジェクト。

  • 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).Replies

    expression: ドキュメントタイプのアプリケーションオブジェクト。

  • 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).SlideId

    expression: ドキュメントタイプのアプリケーションオブジェクト。

  • 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).Text

    expression: ドキュメントタイプのアプリケーションオブジェクト。

  • 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);
    }