Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Sending a doc link using LotusScript

Posted on 2000-04-17
1
Medium Priority
?
1,122 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

610 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