Skip to content
开发文档
能力中心
应用市场
WebOffice
开发者后台

RecordComment.Count(属性)

说明

只读 返回的记录里包含评论的数量

返回值

Number

浏览器环境示例

javascript
async function example() {
   await instance.ready();
   const app = instance.Application;
   const recordComment = await app.ActiveView.RecordComments.Item(1)
   const count = await recordComment.Count
   for (let i = 1; i <= count; i++) { 
    const comment = await recordComment.Item(i)
    console.log(await comment.Text)
   }
}

脚本编辑器 示例

javascript
function main() {
   const recordComment = ActiveView.RecordComments.Item(1)
   const count = recordComment.Count
   for (let i = 1; i <= count; i++) { 
    const comment = recordComment.Item(i)
    console.log(comment.Text)
   }
}
main()
回到旧版