开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜