OpenNTF.org - How to get handle to the about
    Advanced
   OpenNTF Code Bin
Edit Document Code By Rating > Code Document
About This Code
Brief Description:
How to get handle to the about document 
Rating:
Rating: 5 , Number of votes: 1 
Contributor:
T. Brian Nichols 
Category:
Lotusscript 
Type:
System info 
Last Modified:
21 Nov 2002 
OpenNTF Disclaimer

All of the program code and information presented in the OpenNTF.org Code Bin are provided "as-is", and should be used at your own risk. OpenNTF.org make no express or implied warranty about anything in the Code Bin, and OpenNTF.org will not be responsible or liable for any damage caused by the use or misuse of anything from this site. OpenNTF.org makes no guarantees about anything. Please thoroughly test all of the knowledge and code you find here before you attempt to use them in your production environment.

Code / Description
doc = uidoc.document returns nothing, so you cannot reference the policy note this way.


However, you can get the NOTEID of it via a C-API call, then look it up by noteid to access it.

You can detach files from the policy note with this noteid.

Usage / Example
Declare Private Sub W32_OSPathNetConstruct Lib "nnotes.dll" Alias "OSPathNetConstruct" (Byval portName As String, Byval ServerName As String, Byval FileName As String, Byval retPathName As String)
Declare Private Function W32_NSFDbOpen Lib "nnotes.dll" Alias "NSFDbOpen" (Byval PathName As String, dbHandle As Long) As Integer
Declare Private Function W32_NSFDbClose Lib "nnotes.dll" Alias "NSFDbClose" (Byval dbHandle) As Integer
Declare Private Function W32_NSFDbGetSpecialNoteID Lib "nnotes.dll" Alias "NSFDbGetSpecialNoteID" (Byval dbHandle As Long, Byval DClass As Integer, retNoteID As Long) As Integer

Private Const NOTE_CLASS_INFO = &H0002
Private Const SPECIAL_ID_NOTE = &H8000

Dim ses As New notesSession
Dim currentDb As notesDatabase
Set currentDb = ses.currentDatabase

Dim dbHandle As Long
Dim Path As String * 256
Dim NoteID As Long

Call W32_OSPathNetConstruct("", currentDb.Server, currentDb.FilePath, Path)
Call W32_NSFDbOpen( Path, dbHandle)
Call W32_NSFDbGetSpecialNoteID(dbHandle, SPECIAL_ID_NOTE Or NOTE_CLASS_INFO, NoteID)
Call W32_NSFDbClose(dbHandle)
 Comments
Posted by Joe Litton on 12/09/2003 03:52:37 PMNice and clean...good stuff
I was try to code something for this, then did a search and found this code. Much nicer than what I was whacking together. Nice work!
 Add your comment!