在QueryPaste期间检索NotesDocumentCollection [英] Retrieving NotesDocumentCollection during QueryPaste

查看:66
本文介绍了在QueryPaste期间检索NotesDocumentCollection的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Notes中有可能吗?我当前正在使用版本11.我有一个带有嵌入式视图的表单.该视图在QueryPaste函数中具有代码.例如,其代码为:

Is this possible in Notes? I am currently using version 11. I have a form with an embedded view in it. This view has code in the QueryPaste function. For example it has the code:

Sub Querypaste(Source As Notesuiview, Continue As Variant)
    Dim ndcRegel As NotesDocumentCollection
    Dim docRegel As NotesDocument

    Set ndcRegel = source.Documents
    Msgbox "1"
    Msgbox source.Documents.Count
    etc...

在嵌入式视图中复制和粘贴文档时,它首先触发Msgbox 1,然后计数,我得到的结果为0.当嵌入式视图中有文档时.

When copy and pasting a document in the embedded view, it triggers Msgbox 1 first and then for the count I get the result 0. While there are documents in the embedded view.

当我在视图本身中复制粘贴时,它可以正常工作并找到ndc集合.

When I am copy pasting in the view itself then it correctly works and does find a ndc collection..

为什么会这样?可以解决这个问题吗?因为我想阻止我的用户在嵌入式视图中复制粘贴文档.

Why is this so? And can this be fixed? Because I want to block my users to copy paste documents in an embedded view.

推荐答案

在Notes客户端中复制的文档放置在本地数据库中,文件名为〜clipbrd.ncf".
我不记得在哪里找到这些信息,但是它在互联网上的某个地方.

Documents copied in the Notes client are placed in a local database with the file name "~clipbrd.ncf".
I can't remember where I found this information, but it was somewhere on the internet.

在视图的 QueryPaste 事件中,您可以获取该数据库,并且其 AllDocuments 属性包含要粘贴的文档.

In a view's QueryPaste event, you can get that database, and its AllDocuments property contains the documents to be pasted.

我仅在Notes 8.5.x和9.0.x客户端上使用此功能,并且对于未嵌入 的视图使用,因此请确保在进行测试之前先依赖它.

I've only used this with Notes 8.5.x and 9.0.x clients, and for views which are not embedded, so make sure to test before relying on it.

示例代码:

Sub Querypaste(Source As Notesuiview, Continue As Variant)
    Dim clipDb As New NotesDatabase("","~clipbrd.ncf")
    Dim dc As NotesDocumentCollection

    Set dc=clipDb.AllDocuments
    ' dc now contains copied documents.
End Sub

这篇关于在QueryPaste期间检索NotesDocumentCollection的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆