Currently, there is no built-in method to mimic the "Copy selected as table" functionality. However, you can mimic it by creating a view action that triggers an agent that gets a collection of selected documents, navigates to wherever you need to paste the data, and then uses the new NotesRichText classes in R6 to construct a table with the view data.
I have a view called "WhoWillBe" that I want to send by e-mail. This e-mail actually will be sent by an automatic agent. The Copy Selected as Table button is great and it's just what I need, however, I don't want to do the Create new memo and then paste this by myself, I want an agent to do it. Could you bring me some code examples on how can I accomplish that?
I believe that what Beatriz is trying to do is beyond the scope of that simple function. It may be possible with a few @Formulas in the front-end, but it's not likely. In this case, she may need to use LotusScript to read the contents of a view and build a table with LotusScript's rich text classes. This is certainly doable, but beyond the scope of a simple tip. I would refer Beatriz to the documentation to use the NotesView class to loop through the contents of a view and the NotesRichText classes to dynamically build a table in a new mail memo document.
Do you have comments on this Ask the Expert question and response? Let us know.
Dig Deeper on LotusScript
Related Q&A from Brad Balassaitis
Upon moving to Lotus Notes 8, some Lotus Notes users received an error message stating: 'Database has not been opened yet.' Find out why here. Continue Reading
Discover what security settings you need to fix if you encounter the Lotus Notes database error: 'database is not opened yet.' Continue Reading
Learn the Formula language code that you can use if you'd like your Lotus Notes form with embedded views to stop displaying all response documents. Continue Reading