admin管理员组文章数量:1356325
I am making an addin using visual studio powerpoint web app addin template. Below code Im attempting to set the first 3 words to bold. A breakpoint before this shows that the "words" member is not in the textRange object. I have tried to access .Words in various ways with and without the (). The error message either says "TypeError: shape.textFrame.textRange.Words is not a function" or "Words is undefined". I have tried upper and lowercase as well. visual studio is 2022
if (shape.textFrame.textRange.text && shape.textFrame.textRange.text.length > 0) {
shape.textFrame.textRange.load("Words");
await context.sync();
let words = shape.textFrame.textRange.Words;
console.log(words);
shape.textFrame.textRange.Words(3).Font.Bold = true;
本文标签: javascripttextRangeWords not found Visual Studio js addinStack Overflow
版权声明:本文标题:javascript - textRange.Words not found? Visual Studio js addin - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743998637a2573450.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论