更新和Word.Range [英] Updates and Word.Range

查看:163
本文介绍了更新和Word.Range的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用C#中的Word插件。它抓取特定单词的一些Word.Range对象。在稍后的某个时刻,它会回顾范围对象。我注意到如果用户在范围对象之前添加文本一切正常并且范围开始
并且结束更新。

I am working on a Word addin in C#. It grabs some Word.Range objects for particular words. At some later point it looks back at the range objects. I've noticed that if the user adds text before the range objects everything works fine and the range starts and ends are updated.

但是,如果用户点击退格,即使只是在范围集中的最后一个单词上,并删除单个字符,所有range.start和range.end属性最终都会设置为第一个范围结束索引。这是非常意外的。
是否所有人都有关于Word内部范围内的内容的文档? 

If, however, the user hits backspace, even if just on the last word in the set of ranges, and deletes a single character, all of the range.start and range.end properties end up getting set to the first range end index. This is very unexpected. Does anyone have documentation on just what it is Word does with ranges internally? 

我可以看到它消除了实际上有一个字符退格的最后一个范围。如果我看一下当我删除整个范围时它会做什么,这就是我观察到的事情。但是为什么当我只更改
到最后一个范围对象时,它会删除所有的开始和结束索引?

I could see it elminiating the last range that actually had a character backspaced away. If I look at what it does when I delete an entire range this is what I observe happen. But why would it delete all of the start and end indexes when I only made a change to the last range object?

我会很感激任何好的想法或链接到一些详细的文档。 

I would appreciate any good ideas or links to some detailed documentation. 

推荐答案

您能否更详细地向我们描述您是如何"存储"的?这些范围,然后需要使用起点和终点?

Could you describe to us in a bit more detail how you're "storing" these ranges, and then needing to use the start and end point?

Word绝对可以是"古怪"的关于范围......

Word can definitely be "quirky" about ranges...

还涉及哪个版本的Word?

also, which version of Word is involved?


这篇关于更新和Word.Range的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆