Quantcast
Channel: Word for Developers forum
Viewing all articles
Browse latest Browse all 4350

How to catch the word exception?

$
0
0

下图中的弹窗就是我通过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:


Viewing all articles
Browse latest Browse all 4350

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>