I’m fairly new to both R6 & web stuff, & I’m trying desperately to get hold of attached files during the WebQuerySave Agent of a web document.
I have the following, which works:
Dim Session As NotesSession, docFile As NotesDocument, fileAtt As NotesEmbeddedObject
Sub Initialize
Set Session = New NotesSession
Set docFile = Session.DocumentContext
If Not(docFile.HasEmbedded) Then
docFile.SaveOptions = "0"
Print "<b>Error:</b> There was no file attached.<br>"
Print "<a href = ""javascript:history.go(-1)"">Try again</a>, or " & _
"<a href = ""/dev/FileExchange.nsf/restricted/home.html?OpenDocument"">Return to Main Page</a>"
Exit Sub
End If
Subject: Having problems referencing File Attachments during WebQuerySave Agent
I’ve now managed to get the Remote Debugger working (what a fantastic feature, by the way!), & have seen that although docFile.HasEmbedded is true, docFile.EmbeddedObjects appears to be an empty array, so UBound(docFile.EmbeddedObjects) raises a type mismatch!
How can I get hold of the attachment - do they need to be in a Rich Text field?
Subject: RE: Having problems referencing File Attachments during WebQuerySave Agent
Hi Notes Gurus, Even I am facing the same problem.
I am calling an agent on Web Querysave and trying to create HTML anchor links to the attachments in the $File. Then reloading the form so that the user can click on the link to open the elements.
The problem is same, its giving the hasEmbedded property to True and then giving type mismatch to doc.EmbeddedObjects.
I learnt from posting in this forum that EmbeddedObjects for notesdocument doesnot works for Attachment.
I am using R6.0.2 server.
I am aware of traversing through the $Files in R5 and then removing the item each time. But again this doesnot works for R6.
Can someone please please guide me how to loop through the $File references for a document.