-
I'm trying to paste information from the clipboard to a Rich Text File box.
When I try to paste using the code 'clipboard.gettext' I get the text but I lose the formatting.
I've tried several things and nothing works. If I use the keyboard and do a control V, it works so I know that what I want has made it to the clipboard OK.
Other attempts have delivered the code as well as the text, but I can't keep the formatting.
None of my references have anything useful for me
Thanks in advance.
-
try this:
Code:
'to set text:
clipboard.settext rtf1.textrtf
rtf1.text = ""
'---------------------------------------
to get text:
rtf1.text = ""
rtf1.textrtf = clipboard.gettext
and hey presto, it keeps your formatting (i think???) test it tell me if it works :)
-
David
I tried that but it gives the formatting information as text and it ends up unreadable.
I also tried a variety of combinations of hDC. This is required in a print statement for RTF text to maintain the formatting. It didn't work.
Thanks
Jim
-
make sure it says
rtf1.textrtf = clipboard.gettext
ok :)
any more problems, just post again ok