开发者

Will windows.forms.sendkeys() send formatted text to ms doc/ms outlook?

开发者 https://www.devze.com 2023-02-12 10:11 出处:网络
I would like to know whether it\'s possible to display formatted (like bold, font size) text using sendkeys.开发者_开发技巧sendwait() method.

I would like to know whether it's possible to display formatted (like bold, font size) text using sendkeys.开发者_开发技巧sendwait() method.

Note: The indented text string is already formatted. I need to way to print them on the application.

Is there anything I can do with clipboard?


As Robert Harvey stated, you would have to send the keys that trigger the formatting. If you are working with a word processor that allows bold, italics, underline, you could achieve the following like this:

SendKeys.SendWait("^BThis is bold Text!^B^IThis is italics!^I^UThis is underlined!");

... assuming that CTRL+B is bold, CTRL+I is italics, and CTRL+U is underline.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号