简体   繁体   English

如何使用Sendkeys方法将“ <”字符发送到Word文档(.doc,docx)

[英]How to send “<” characters to Word documents (.doc, docx) using Sendkeys method

When i try to send "<" characters it decreasing characters punto only, and doesnt appear "<" char on document. 当我尝试发送“ <”字符时,它仅减少字符punto,并且在文档上不显示“ <” char。

Could you please help me to solve this problem? 您能帮我解决这个问题吗?

SendKeys.SendWait(Convert.ToChar(60).ToString());

or 要么

SendKeys.SendWait("<");

Try this: 尝试这个:

>SendKeys.SendWait("+,");

It works fine on US Keyboard layout. 在美国键盘布局上工作正常。 Please consider the other keyboard layout style as well. 请同时考虑其他键盘布局样式。

I see that the problem about keyboard layout. 我看到有关键盘布局的问题。 When i set my keyboard language to English(US) from Windows. 当我从Windows将键盘语言设置为English(US)时。 SendKeys.SendWait("<"); SendKeys.SendWait(“ <”); works fine on Word(doc,docx) documents. 在Word(doc,docx)文档上工作正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM