Domino Code Fragment

Code Name*
How to Check via LotusScript Whether a Document is Open in Preview Pane
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.18.191.216.163
Description*
How to Check via LotusScript Whether a Document is Open in Preview Pane
Type*
LotusScript
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
Problem:
Using LotusScript in Notes R4, how can you determine whether a document is open within the
Preview Pane?


Solution:
You can use InPreviewPane, an undocumented Property of the NotesUIDocument Class.
InPreviewPane returns true if the document is open in the Preview Pane and returns

false if the document is not open in the Preview Pane.

It is important to note that InPreviewPane is an undocumented Property; thus, it may
have certain limitations and is subject to change in future releases of Notes.

Supporting Information:
The InPreviewPane Property can be helpful, in particular, when you wish to place the current
document in Edit mode. Since placing a document in Edit mode is prohibited if the document is
open in the Preview Pane, you may wish to have your code first check this status using
InPreviewPane.


Sample Code for InPreviewPane:

Flag=UIDoc.InPreviewPane
If Flag=True Then