Can someone have a quick look at my code, because I’m not sure what I’m doing wrong.
I don’t want to open a document when it’s clicked on, but I do want to read data from it
(this is for a portal app, where it would read the URL/EXE/DOC etc from the document and launch it, rather than opening the Config Document).
Sub Queryopendocument(Source As Notesuiview, Continue As Variant)
Dim uidoc As NotesUIDocument
Set ws = New NotesUIWorkspace
Set uidoc = ws.CurrentDocument
Dim DocInfo As String
DocInfo = uidoc.FieldGetText ("TXTTitle")
Msgbox DocInfo
Subject: How to read document data from Notesuiview without opening a doc? (Solved)
Typical… I managed to solve the problem immediately after posting - my apologies for wasting everyones time.
The trick was to use the NotesDocumentCollection even though I only wanted info about one document.
My resolved example is below - in case anyone else has this problem…
Sub Queryopendocument(Source As Notesuiview, Continue As Variant)
Dim docs As NotesDocumentCollection
Dim doc As NotesDocument
Set docs = Source.Documents
Set doc = docs.GetFirstDocument()
Dim DocInfo As String
DocInfo = doc.TXTTitle(0)
Msgbox DocInfo
Continue = False