Domino Code Fragment

Code Name*
Determine if a document is a profile document
Date*
04/29/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.15.6.77
Description*
With the advent of profile documents in Notes 4.5, it will become neccessary to determine if a document is a profile document or not. A new NotesDocument property, IsProfile, will return True if a document is a profile document, and False if it is not. To use IsProfile, set the document in question to a NotesDocument object, and retrieve the value in the property. Syntax variablename = notesdocument.IsProfile The example below will determine if this document is a profile document or not, and display a message with the result.
Type*
LotusScript
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
Dim workspace As New NotesUIWorkspace 'Declare workspace as type NotesUIWorkspace
Dim uidoc As NotesUIDocument 'Declare uidoc as type NotesUIDocument
Dim doc As NotesDocument 'Declare doc as type NotesDocument
Set uidoc = workspace.CurrentDocument 'Set uidoc to the on screen document
Set doc = uidoc.Document 'Set doc to the uidocument
If doc.IsProfile Then 'If the document is a profile document, then
Msgbox "This document is a profile document." 'Tell the user it is a profile document
Else 'Otherwise
Msgbox "This document is not a profile document." 'Tell the user it is not a profile document
End If 'End the If statement