How to get Topic by GUID?

  • 2
  • Question
  • Updated 3 years ago
How can I get a Topic by its GUID in code? eg. if I have the guid of a topic in certain document,such as "ikrEkSkdIkSPuaLmBmH3LA==", then how can I get the relative topic in this document by code?
Do I have to compare all topics' GUID one by one or is there any API for me to get it?
Thanks!
Photo of zhou jimmy

zhou jimmy

  • 9 Posts
  • 0 Reply Likes

Posted 3 years ago

  • 2
Photo of Nick Duffill

Nick Duffill, Champion

  • 512 Posts
  • 170 Reply Likes
The Document.Range object contains a method for this.

Set myTopic = ActiveDocument.Range(mmRangeAllTopics).FindByGuid("ikrEkSkdIkSPuaLmBmH3LA==")
Photo of zhou jimmy

zhou jimmy

  • 9 Posts
  • 0 Reply Likes
Thanks a lot! It works!
:-)