?
Solved

Sending a doc link using LotusScript

Posted on 2000-04-17
1
Medium Priority
?
1,065 Views
Last Modified: 2013-12-18
Hi,

How can I send an e-mail message that includes a doc link using Lotus Script?

Thanks,

Zaphod.
0
Comment
Question by:Z_Beeblebrox
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
sideshowbob earned 120 total points
ID: 2723275
These are the examples from Notes Help (search for 'AppendDocLink').

1. This script creates a new mail memo. In the Body item of the memo, the script places a link to the current database.
Dim session As New NotesSession
Dim db As NotesDatabase
Dim newDoc As NotesDocument
Dim rtitem As NotesRichTextItem
Set db = session.CurrentDatabase
Set newDoc = New NotesDocument( db )
Set rtitem = New NotesRichTextItem( newDoc, "Body" )
Call rtitem.AppendDocLink( db, db.Title )
newDoc.Subject = "Here is a link to the database"
newDoc.SendTo = "Lauri Nodwell"
newDoc.Send( False )

2. This script creates a new mail memo. In the Body item of the memo, the script places a link to the Boots folder in the current database.
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim newDoc As NotesDocument
Dim rtitem As NotesRichTextItem
Set db = session.CurrentDatabase
Set view = db.GetView( "Boots" )
Set newDoc = New NotesDocument( db )
Set rtitem = New NotesRichTextItem( newDoc, "Body" )
Call rtitem.AppendDocLink _
( view, view.Name & " in " & db.Title )
newDoc.Subject = "Here is a link to the Boots folder"
newDoc.SendTo = "Lauri Nodwell"
Call newDoc.Send( False )

3.This script creates a new mail memo. In the Body item of the memo, the script places a link to the first document in the Boots folder in the current database.
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim newDoc As NotesDocument
Dim rtitem As NotesRichTextItem
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set view = db.GetView( "Boots" )
Set newDoc = New NotesDocument( db )
Set rtitem = New NotesRichTextItem( newDoc, "Body" )
Set doc = view.GetFirstDocument
Call rtitem.AppendDocLink _
( doc, doc.Subject( 0 ) & " in " & view.Name )
newDoc.Subject = _
"Here is a link to first document in the Boots folder"
newDoc.SendTo = "Lauri Nodwell"
Call newDoc.Send( False )

4. This script creates a new mail memo. In the Body item of the memo, the script places a link to each document in the Boots folder in the current database. Each link is followed by a tab, the Subject item of the document being linked to, and a carriage return.
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim newDoc As NotesDocument
Dim rtitem As NotesRichTextItem
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set view = db.GetView( "Boots" )
Set newDoc = New NotesDocument( db )
Set rtitem = New NotesRichTextItem( newDoc, "Body" )
Set doc = view.GetFirstDocument
While Not ( doc Is Nothing )
  Call rtitem.AppendDocLink( doc, db.Title )
  Call rtitem.AddTab( 1 )
  Call rtitem.AppendText( doc.Subject( 0 ) )
  Call rtitem.AddNewLine( 1 )
  Set doc = view.GetNextDocument( doc )
Wend
newDoc.Subject = _
"Here are links to all docs in the Boots folder"
newDoc.SendTo = "Lauri Nodwell"
Call newDoc.Send( False )

I also have this sample script that, when executed (in this case, via a button's click event), generates a mail memo to a particular recipient with an attached doclink that points back to the original document.
*Note: In order for this script to run properly, the original document must be saved before the script is executed.

Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Set uidoc = workspace.CurrentDocument
Set doc = uidoc.Document

Dim session As New NotesSession
Dim db As NotesDatabase
Dim newDoc As NotesDocument
Dim rtitem As NotesRichTextItem
Set db = session.CurrentDatabase
Set newDoc = New NotesDocument( db )
Set rtitem = New NotesRichTextItem(newDoc, "Body" )
Call rtitem.AppendDocLink(doc, "TEST" )
newDoc.Subject = "Here is a link to the document"
newDoc.SendTo = "A Recipient"
newDoc.Send( True )

End Sub
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question