views:

113

answers:

2

Hello There!

I'm creating an application to help with e-mail replying, so I got a few sample mensages I want to Paste into the e-mail text page, starting from the cursor position.

Imagine, I got this app with Button1,2,3,4 etc, and associated to each button is a pre-formated text, so when I hit Button1 it will Paste the text, starting the cursor location.

Is it possible? And what's the code to do it?

Thanks!

+1  A: 

You can use a Rich Textbox for the control. If the pre-formatted text is in your clipboard it should just be a matter of pasting in the rich textbox. Rich Textbox's will hold formatted for RTF. I'm assuming your using C# or VB.NET.

Phillip
A: 

Hello!

I'm using the Visual Studio 2008 Pro, mostly with VB language. After a long research in the MSDN I've checked a few routines with the Clipboard action but I don't know hot to properly use them.

First, imagine I want to "insert" in the Clipboard formated text with line breaks... I only managed to insert a single string, with no kind of line breaking format. I don't really need to use the RTF, Unicode serves me well but... with line breaks.

After that comes the most difficult job... how to write the Clipboard copy automatically into a Notepad/Word/whatever text cursor. I know it's asking too much but I will be happy if I can "insert" formated text automatically into the Clipboard and then make the Paste by myself.

Thanks a lot for the help!