[[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]]
==== Using DocLinks (ViP Specific) ====
=== At 16 JUL 1998 06:58:41PM Michael Weidlick wrote: ===
{{tag>"ViP Specific"}}
I would like to know if I can use a doclink in ViP to actually open a document in the Notes client. If I can, how?
----
=== At 17 JUL 1998 02:27PM John Averell Revelation wrote: ===
Doc Links are Rich Text objects. In ViP you can create a RichText window and transfer a Rich Text Field from a data object column into the window (e.g. draw a link from the column containing a Rich Text datatype to the window.)
Any doclink in this window can be selected, and with script, obtain the information from the doclink with the ViP method,
RichText1.DocLinkGet(Descriptor%) where Descriptor% provides a number of options of what to retrieve (like servername, dbname, fieldname)
=======================
From Help on DocLinkGet method
======================
Returns one of five doc link descriptors from the selected doc link in a rich text object, depending on the value you assign the input parameter. You can use these descriptors with the DocLinkInsert method to insert a doc link.
Script syntax
LinkDescriptor$=RichTextRef.DocLinkGet(DescriptorId%)
LinkDescriptor$ is one of the five doc link descriptors that define a Notes doc link.
DescriptorId% specifies which descriptor to return.
LinkDescriptor Value returned
DOCLINK_REPLICAID (1) 16-character hexadecimal representation of the database replica ID. 16 "0" characters indicates that information is missing.
DOCLINK_VIEWID (2) 32-character hexadecimal representation of the universal view ID. 32 "0" characters indicates no data, which is the case for doc links to databases and to documents.
DOCLINK_DOCID (3) 32-character hexadecimal representation of the universal document ID. 32 "0" characters indicates that the link is not to a document (i.e., is to a database or view).
DOCLINK_DISPLAY (4) Text for UI display when user clicks the link. An empty string ("") indicates no text is displayed.
DOCLINK_SERVER (5) Name of server on which database is alleged to reside. An empty string ("") indicates the local workstation or no data.
==================================
With this information, you can from script start using the Notes Classes from ViP. (See Notes Help for complete description of Classes and methods). You start off in ViP with:
Dim Session As Variant
Set Session=CreateObject("Notes.NotesSession")
With a NotesSession object from Notes, you can now use the automation methods in Notes Classes to get at the server, database, document, etc.
Now this is really pretty complex, perhaps more than you wanted to know. The quick answer is, it takes a lot of work, but if you really want, it is possible.
Hope this gets you started at least.
[[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=2FFC5045DC3518B685256643007E393F|View this thread on the forum...]]