Here's how to do it.
In Notes, it is easy, you deselect the hide formula: "Hide paragraph when document is printed" .
On the web it is a bit trickier, here is how I do it:
I create a style sheet class that hides from mediatype print. This must then be used as the class for <br> <p> etc tags.
In the Lotus Notes Domino Lotus Script agent use:
Call rt.AddNewline(1)
Call rt.appendtext("<style type='text/css'>]")
Call rt.AddNewline(1)
Call rt.AppendText("[<!-- ")
Call rt.AddNewline(1)
Call rt.AppendText("@media print{")
Call rt.AddNewline(1)
Call rt.AppendText(" .printHidden{ ")
Call rt.AddNewline(1)
Call rt.AppendText(" display:none; ")
Call rt.AddNewline(1)
Call rt.AppendText(" } ")
Call rt.AddNewline(1)
Call rt.AppendText(" }")
Call rt.AddNewline(1)
Call rt.AppendText("-->]")
Call rt.AddNewline(1)
Call rt.AppendText("[</style>]")
Call rt.AddNewline(1)
This outputs the code:
<style type='text/css'>
<!--
@media print{
.printHidden{
display:none;
}
}
-->
</style>
Then the actual lotusscript code that is not to be printed can be displayed using the agent:
Call rt.AddNewline(1)
Call rt.AppendText("[<h2 class='printHidden'>Instructions:</h2>" )
Call rt.AddNewline(1)
Call rt.AppendText("<p class='printHidden'>" )
Call rt.AddNewline(1)
Call rt.AppendText("You can " & _
"<a class='printHidden' href='#' onClick=' window.print();' >print</a>" & _
" these pages, there are page breaks in between each document. NB: The ----- Titles ----- will not be printed." )
Call rt.AddNewline(1)
Call rt.AppendText("</p><br class='printHidden'>]")
which creates html:
<br>
<h2 class='printHidden'>Instructions:</h2>
<p class='printHidden'>
You can <a class='printHidden' href='#' onClick=' window.print();' >print</a> these pages, there are page breaks in between each document. NB: The ----- Titles ----- will not be printed.
</p><br class='printHidden'><p class='printHidden'>---------01. Product Decisions in MSG---------</p>
NB This code also includes a link to actually print the page.
Finding HTML or javascript code that would do a print preview was trickier.
I found some but it was not reliable: HTML version: http://forums.aspfree.com/html-help-7/help-with-print-preview-30747.html
If you have some let me know.