Word 2013 Addin有时会丢失键盘输入 [英] Word 2013 Addin loses keyboard input at times

查看:65
本文介绍了Word 2013 Addin有时会丢失键盘输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个自Word 2007以来一直在使用的现有VSTO插件。在Word 2013上运行时,在少数计算机上运行后,在某些(自定义)任务窗格'事件'中插入了 内容控件进入文档后,用户无法再使用
键盘来处理文档。 键盘上没有任何内容,键入文本,箭头键。 鼠标功能完好无损 - 我可以用鼠标右键单击,打开菜单并在文档中进行更改。 我可以使用鼠标在自定义任务窗格以及自定义和标准功能区上调用
操作。 这些操作可能会在文档中插入更多内容,这种情况会正确发生。 之后我仍然无法输入文档。 我没有找到任何允许
我再次输入的内容,直到我关闭并重新打开Word。关闭并重新打开文档没有帮助。


任务窗格事件似乎导致此事件是从任务窗格上的菜单触发的,通常涉及打开表单以从用户收集一些信息。


正如我所提到的,在Word 2010上运行相同的插件时,我没有看到此问题。 并非所有在Word 2013上运行此功能的用户都会遇到此问题。


在某些时候我添加了代码

 mcWordApp.Selection .Document.ActiveWindow.SetFocus(); //在完成似乎导致问题的处理之后,将焦点设置回单词2013 

的文档,但是没有帮助。


关于可能导致这种情况的任何想法?


解决方案

你好scw-tzg,


>>我没有找到任何允许我再次输入的内容,直到我关闭并重新打开Word。关闭并重新打开文档没有帮助。


禁用加载项是否有帮助?根据描述,这并没有在每台机器上复制。 Word和VSTO的版本是否相同?


为了缩小此问题的范围,我建议您更改出现此问题的计算机的环境。例如,VSTO运行时,Word版本。


如果此问题不是由环境引起的,我还建议禁用其他加载项以排除其他加载项的影响。


希望它有用。


问候&费 


I have an existing VSTO addin that has been in use since Word 2007. When running on Word 2013, on few machines, after responding to some (custom)  task pane 'events' that inserts content controls into the document, the user can no longer use the keyboard to work on the document.  Nothing on the keyboard works, not typing text, arrow keys.  Mouse functionality is intact - I can right click with the mouse, opening a menu and make changes in the document.  I can use the mouse to invoke actions on the custom task pane and on the custom and standard ribbon.  These actions may insert further content into the document and this happens correctly.  After that I still can't type into the document.  I haven't found anything that permits me to type again until I close and reopen Word. Closing and reopening the document does not help.

The task pane events that seem to cause this are triggered from a menu on the task pane and usually involve opening a form to gather some info from user.

As I mentioned, I do not see this problem when running the same addin on Word 2010.  And not all users who run this on Word 2013 experience the problem.

At some point I added code

mcWordApp.Selection.Document.ActiveWindow.SetFocus();//set focus back on the doc for word 2013

after completing the processing that seems to cause problem, but that did not help.

Any ideas about what might cause this?

解决方案

Hi scw-tzg,

>>I haven't found anything that permits me to type again until I close and reopen Word. Closing and reopening the document does not help.

Is it helpful to disable the add-in? Based on the description, this was not reproduced on every machine. Is the version of Word and VSTO is same?

To narrow down this issue, I suggest that you change the environment for the computer which had this issue. For example, VSTO runtime, Word version.

If this issue was not caused by the environment, I also suggest that disable other add-ins to exclude the effect of other add-ins.

Hope it is helpful.

Regards & Fei 


这篇关于Word 2013 Addin有时会丢失键盘输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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