Document Viewer - Feature Request: Use the button from inside of a document (not only from a view)Created on |
May 5, 2006 |
Last modified on |
May 5, 2006 |
Created by |
rulle rusk |
Last modified by |
Timo Emrich |
Status |
Added to app |
Form: CustomShowDocFields2
Add following:
Globals/Declaration: Dim uidoc As NotesUIDocument
Globals/Initialize: Set uidoc = ws.CurrentDocument
Change following:
Form/QueryOpen:
Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
Const DEBUG = False
If(Not ws.CurrentView Is Nothing) Then
'### categories starts with '8000'
If( Not Instr(ws.CurrentView.CaretNoteID,"8000") = 1) Then
notesID = ws.CurrentView.CaretNoteID
If(DEBUG) Then Msgbox("NoteID: "+notesID)
databasePath = ws.CurrentView.View.Parent.filepath
If(DEBUG) Then Msgbox("DatabasePath: "+databasePath)
server = ws.CurrentView.View.parent.server
If(DEBUG) Then Msgbox("Server: "+server)
Exit Sub
End If
Elseif (Not uidoc Is Nothing ) Then
notesID = uidoc.Document.NoteID
If(DEBUG) Then Msgbox("NoteID: "+notesID)
databasePath = uidoc.Document.ParentDatabase.FilePath
If(DEBUG) Then Msgbox("DatabasePath: "+databasePath)
server = uidoc.Document.ParentDatabase.Server
If(DEBUG) Then Msgbox("Server: "+server)
Exit Sub
End If
Taken Actions by OwnersDocuments