How do you get a collection of documents being pasted in the Querypaste event of a view? I have tried NotesUIWorkspace.CurrentDatabase.Documents and NotesDatbase.UnprocessedDocuments. Source.Documents gives the documents actuallly selected in the view and not the documents to be pasted.
How do I get a collection of the documents to be pasted?
P.S. I’m not sure a When Documents have been pasted in this instance.
Subject: Getting collection of documents in QueryPaste event?
There would not be a collection of documents since this event fires once for every document that is being pasted.
Subject: RE: Getting collection of documents in QueryPaste event?
I see, so the question still holds then, just different. How do you get a handle to the doument being pasted?
Subject: RE: Getting collection of documents in QueryPaste event?
Unfortunately, there is no simple way to do this. I personally do not know how to do it. Search this forum on “Querypaste” and see if anyone else has figured it out. Sorry I cannot help you more.
Subject: RE: Getting collection of documents in QueryPaste event?
Hi Bruce,
it’s the PostPaste event, but might do the trick to identify the documents
View PostPaste and the active/inactive toggle
JYR
Subject: RE: Getting collection of documents in QueryPaste event?
Thanks for the link but if you read all of the blogs, this does not work.
Subject: RE: Getting collection of documents in QueryPaste event?
Thanks but I always do extensive searching before posting a question.
It is unbelieviable that there is no way to get a hande to the document being pasted. Didn’t Lotus think that you might want to determine if a document is to be pasted to a view based on the values in the document.
Subject: RE: Getting collection of documents in QueryPaste event?
This may be an obvious point, but when QueryPaste is being executed, there is no document - just structured data on the clipboard. You won’t have a document object until after it’s pasted into the database.
Subject: RE: Getting collection of documents in QueryPaste event?
Thanks Graham, I guess that explains it. But there is still not reason the data could not be pasted into a “queue” or temp document and if you return false for continue, the queue would be deleted, otherwise the document would actually be created.