LotusScript accesses clipboard to view copied Notes documents

Find out how to access copied Lotus Notes documents on your clipboard with this downloadable LotusScript code. This tip is helpful when using queryPaste events to determine what content is being pasted into a Lotus Notes database.

You can access and examine clipboard data for copied Lotus Notes documents/design pieces to determine the nature of the content. What's more, you can match the Notes documents on the clipboard against existing documents, since they still have universal IDs intact.

Related resources from SearchDomino.com:
Alternate version of @Command forwards subform via LotusScript

Dynamically update Lotus Notes rich-text fields using LotusScript

Top 10 LotusScript tips

The ability to check clipboard content can be useful when using queryPaste events to determine the nature of the content that's being pasted into the database. You can also use it as a temporary "dumping ground" for problem documents that you want to analyze using test agents -- without touching the original documents or modifying the test agent code.

Lotus Notes stores cut or copied documents and design pieces to a temporary database. To retrieve these documents, access a local temporary file called "~clipbrd.ncf" as a NotesDatabase object, and use this database's AllDocuments property. Here are two LotusScript code snippets, the first of which performs a copy/update to documents in the target database that have the same universal IDs.

LotusScript to access and examine clipboard data
(Click on code for enlarged view and script download.)

The second code snippet opens the clipboard in the Lotus Notes user interface.

LotusScript to access and examine clipboard data
(Click on code for enlarged view and script download.)

Note: You must add a form to the design -- or have documents with stored forms -- to fully open the documents. This exploits another undocumented feature, the UniversalID property of NotesView.

Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip library by member Rodney Rear. Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.

This was first published in November 2008

Dig deeper on LotusScript

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.UK

Close