How to catch the word exception? RRS feed

  • Question

  • 下图中的弹窗就是我通过VSTO使用C#开发word add-in时遇到的情况,具体过程是,我把Bookmark的range的text转移到contentcontrol的tag里面,但是某些bookmark在转移的过程中,会弹出下图的异常“不能在此处应用RTF控件”,所以我想捕获到这个异常,不让它弹出这个窗口,跳过当前这个bookmark,继续进行接下来的bookmark。

    Below the popup window is me by using c # development word add - in VSTO encountered situation, the specific process was, I put a Bookmark in the range of the text is transferred to the contentcontrol tag on the inside, but some a Bookmark in the process of transfer, will pop up below the exception "using RTF controls" not here, so I want to catch this exception, don't let it pop up the window, skip the current Bookmark, continue to the next Bookmark,


    In my program, I use code to implement the above process:

    • Edited by Anghost Tuesday, July 23, 2019 7:41 AM Additional description
    Tuesday, July 23, 2019 7:38 AM