Notes Doclinks In Outlook Mails Or On The Web?
or on a WEB page.
Instead of a normal DocLink you can create a NDL (Notes Document Link) file and
attach this to the mail or WEB page. When the user launches the NDL file then
Notes is started and the requested Notes Document opened.
NDL file format exampel (standard text file with the extension .NDL):
<NDL>
<REPLICA 41256707:00423F6B>
<VIEW OF3674FC15:DEF495A2-ON41256700:0074C164>
<NOTE OF67038C0C:ADADFAA2-ON412567CA:0053D736>
<HINT>CN=ServerName/O=Org</HINT>
<REM>Database 'DatabaseTitle', View 'ViewName', Document 'DocTitle'</REM>
</NDL>
This is a two Sub code:
- Function CreateNDL( doc )
- Sub SaveNDL( filename, ndl )
The CreateNDL function creates an array with the NDL file lines in it -
refering to Doc.
The SaveNDL sub saves the NDL file on the disk - them you can attach the file
manualy or with script.
Exampel program:
call saveNDL( "c:\link.ndl", CreateNFL( doc ))
Function CreateNDL( doc As NotesDocument ) As Variant
Dim db As NotesDatabase
Dim NDL() As String
Set db = doc.ParentDatabase
Redim NDL( 10 )
NDL( 0 ) = "<NDL>"
NDL( 1 ) = "<REPLICA " & Left$( db.ReplicaID,8 ) & ":" & Right$(
db.ReplicaID, 8 ) & ">"
NDL( 2 ) = "<NOTE " & "OF" & Mid$( doc.UniversalID,1,8 ) & ":" & Mid$(
doc.UniversalID,9,8 ) & "-ON" & Mid$( doc.UniversalID,17,8 ) & ":" & Mid$(
doc.UniversalID,25,8 ) & ">"
NDL( 3 ) = "<HINT>" & db.Server & "</HINT>"
NDL( 4 ) = "</NDL>"
CreateNDL = NDL
End Function
Sub saveNDL( filename As String, NDL As Variant )
Dim NDLFile As Integer
NDLFile = Freefile
Open filename For Output As NDLFile
For i = 0 To Ubound( NDL )
Print #NDLFile, NDL( i )
Next
Close
End Sub