代码: const app = instance.Application;
const contentControls = await app.ActiveDocument.ContentControls;
// 获取第 1 个内容控件
const contentControl = await contentControls.Item(2).Range;
const htmlInfo = await contentControl.GetHtmlData()
使用上述代码获取控件内容的html会报错?这是为什么?上述Item(2)属于被嵌套的控件报错信息如下: !<img src="https://solution-community.wps.cn/uploads/post/5husBBH7QBS.png" alt="截屏2024-10-14 下午1.46.28.png"/> 控件格式: <img src="https://solution-community.wps.cn/uploads/post/5husHi3Yi4N.png" alt="截屏2024-10-14 下午1.51.45.png"/>