Print |Content-Type: application/vnd.ms-excel| Print |<table border="1"> <tr><td width="80">Document titles </td><td>document authors</td> </tr> <tr><td>title number one</td> <td>author number one</td></tr> <tr><td>title number two</td> <td>author number two</td></tr> </table>|
If you access an agent containing this code (from a browser using http://server/database.nsf/searchagentname?openagent), it will open up Excel displaying three rows and two columns.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
So, what you need to do is have a Web-enabled form with a query field and a submit button. Put an agent name in the webquerysave event of the form. Let the agent access session.DocumentContext, and from there access the field containing the query. Do an ftsearch and then loop through the resulting documents, printing a new line containing something like this for each document:
Print |<tr><td>| & loopducment. subject(0) & |</td><td>| & loopdocument. authors(0) & |</td></tr>|
Do you have comments on this Ask the Expert question and response? Let us know.
Dig Deeper on LotusScript
Related Q&A from Jens Bruntt
Web Development expert Jens Bruntt offers suggestions on how to programmatically copy and hide attachments in Lotus Notes rich-text fields. Continue Reading
Learn about an add-on Domino developers can use to programmatically edit rich-text field tables from within the Lotus Notes client. Continue Reading
Web Development expert Jens Bruntt outlines three potential issues to consider when troubleshooting Lotus Notes Domino tabbed table problems. Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.