1

I am looking for a way to create a button to paste plain text. i.e. Edit -> Paste Special -> Text.

I found the function @Command([EditPasteSpecial]) but it only pops up the Paste Special dialog box.

Is there a way to automatically select Text from this list? Some way to automate the keystrokes for "T" and "Enter" maybe?

I tried adding a line for @Char(84) and @Char(13) to simulate these keystrokes, but that didn't work. Any other options?

Thanks.

lost_cause
  • 23
  • 5
  • 1
    Here is a possible way to do it in LS, although it is making Windows calls. So your code will fail on other operating systems. http://searchdomino.techtarget.com/tip/Programmatically-Access-The-Clipboard-In-Lotusscript – Simon O'Doherty Dec 11 '12 at 08:05
  • May be `SendKeys` statement could help. Just try to emulate opening menu. But it is in LS only and has some restrictions... – pstr Dec 11 '12 at 10:41
  • @Simon: The beta is officially not available until Friday (December 14)... And I believe CD5 is still under NDA. ;-) – Karl-Henry Martinsson Dec 11 '12 at 16:10
  • How do I use Lotusscript? I have only used @Commands until now, not sure how I would integrate the two. Any beginner tutorials to suggest? I'm only doing this to make my life easier (not because it's part of my job) so frankly am not keen on spending TOO much time learning a new language as it would be of limited use :) – lost_cause Dec 12 '12 at 08:00
  • @Karl-HenryMartinsson Ack! :( I'll delete my comment just in case, although it's been publicly demonstrated. I've been using it for so long now I forget it is still beta. – Simon O'Doherty Dec 12 '12 at 11:26
  • You need to give more details. Are you looking just to paste text from the OS clipboard? That will just depend on the OS commands of Ctrl-C for copy Ctrl-V for paste under windows. The same thing would follow on Mac and other OSes. The previous answer of using LotusScript is valid. You could select the contents of a field in a document and append the text in a RichText or push the value into a Text field then saving the target document. – user2715935 Sep 06 '13 at 16:15

1 Answers1

0

You have to use Lotusscript. Look at the GetUnformattedText method of the NotesRichTextItem class.

Karl-Henry Martinsson
  • 2,770
  • 15
  • 25