(JavaScript API 1.3 for Office) Custom Properties add method

后端 未结 2 679
走了就别回头了
走了就别回头了 2021-01-29 02:41

Here\'s a link tho what made me start digging into custom Props again.

I can see that my customProperties are 0 so i assume getCount is somewhat working, even though I\'

相关标签:
2条回答
  • 2021-01-29 03:28

    Thank you all, I was on my laptop and still needed an update. Newbie mistake. I've tested that code and it works.

    0 讨论(0)
  • 2021-01-29 03:34

    I verified this code does not crash Word and works. (assuming you are in latest builds, if your items.count works, this should too.

     Word.run(function (context) {
      context.document.properties.customProperties.add("PropertyName", 1234);
      return context.sync();
      }) 

    If this does not work, please reply with your build number. thx.

    0 讨论(0)
提交回复
热议问题