Preview Notes Document in IE (Domino 4.X)

Preview Notes Document in IE (Domino 4.X)

In R5, you can preview a document you are creating in IE, Netscape, or the Notes client -- all with the click of a button. This code will give you the same functionality in 4.x to preview the current page in IE. Just make sure you've created a view that contains all documents and the first column is sorted by @Text(@DocumentUniqueID). For this script, I've called the view "$allpagelkup".


On the form, you need two hidden fields:
ServerName{serv:=@Subset(@DbName; 1);
@Name([CN]; serv)} and DocUNID{@Text(@DocumentUniqueID)}

Paste this code into an action button on the form:

Sub Click(Source As Button)
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim ieApp As Variant
Dim s As New NotesSession
Dim db As NotesDatabase

Set uidoc = ws.CurrentDocument
Set db = s.CurrentDatabase
servname = uidoc.FieldGetText ( "ServerName" )
dirpath = db.FilePath
pagename = uidoc.FieldGetText ( "DocUNID" )
If pagename = "" Then
Msgbox "You must associate this page with a form!"
Exit Sub
End If
URL$ = "http://" & servname & "/" & dirpath & "/$allpagelkup/" & pagename & "?OpenDocument&login"
Call uidoc.Save ( )

Set ieApp = CreateObject("InternetExplorer.Application")
ieApp.Visible = True
ieApp.navigate(URL$)
End Sub

    Requires Free Membership to View

    Register today to access targeted resources from our editorial writers and independent industry experts focused on Lotus Domino, Notes, Workplace and other related technologies.

    By submitting your registration information to SearchDomino.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchDomino.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

This was first published in November 2000

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.