Appending a Doclink to a reminder

I’ve created a database that involves users creating actions on other users. Ive created an action button that saves the doc, refreshing all fields, this then runs an agent that add’s the entry to your calendar when pressed. This works fine to a point… I cant append a doclink of the action document to the reminder body.

Please help !

My current code (probably in a mess)

Dim session As New NotesSession

Dim workspace As New NotesUIWorkspace

Dim Doc As NotesDocument

Dim db As NotesDatabase

Dim UIDoc As NotesUIDocument

Dim CurDoc As NotesDocument

Dim currdoc As NotesDocument

Dim servername As String

Dim user As String

Dim reg As New NotesRegistration

Dim regserver As String

Dim mailserver As String

Dim mailfile As String

Dim maildomain As String

Dim mailsystem As Integer

Dim profile As String

Set CurDoc = workspace.CurrentDocument.Document

Set db = session.CurrentDatabase

servername = db.Server

user = session.UserName

reg.RegistrationServer = servername

Call reg.getUserInfo(user, mailserver, mailfile, maildomain, mailsystem, profile)

Set db = session.GetDatabase(servername,mailfile)

Set doc = db.CreateDocument

doc.form = “Appointment”

doc.AppointmentType =CurDoc.AppType(0)

doc.Categories = “NC Action”

doc.Subject = CurDoc.ContactPerson(0) & " has an action due on " &CurDoc.TextDate(0)

doc.StartDate = CurDoc.StartDate1(0)

Set newDoc = New NotesDocument( db )

doc.Duration = CurDoc.CalDays(0)

doc.ExcludeFromView = “D”

Set UIDoc = Workspace.EditDocument(True,doc)

Set doc = UIDoc.Document

doc.StartDate = CurDoc.EffectiveDate(0)

doc.EndDate = CurDoc.EffectiveDate(0)

doc.StartTime = CurDoc.StartTime(0)

doc.EndTime = CurDoc.EndTime(0)

Call uidoc.Reload

Any advice is greatly appricated !

Subject: RE: Appending a Doclink to a reminder

Read the Designer help and example of the AppendDocLink method.