Search code examples
c#htmlrtfsendkeys

C# Sendkeys with formatted text


So, I'm trying to send formatted text(RTF or HTML format) using SendKeys.Send, is this possible?

The only way that I found in order to do this: Set the text to clipboard and then paste it, but after doing some research I've found that this isn't a good practice and also I can't find a way to restore the clipboard after I paste the formatted text.


Solution

  • So I've solved this, when I was restoring the clipboard I didn't had any delays and because of that it wasn't working properly, now after I've added a small delay everything is working fine, in case someone have the same problem.