Solved

Link not working when mailed from sub

Posted on 2004-08-03
3
260 Views
Last Modified: 2013-12-18
Hi Guys


I would like to know how to pass a uidococument to a sub
Both are within a button


I have the document doing everthing ,except the LINK is not working
Call SendMail(ApproverName,EmpName, THIS IS PROBABLY WRONG>>> HRDOC)

Sub SendMail(ApproverName As String,EmpName As String, THIS IS PROBABLY WRONG>>> HRdoc As NotesUIDocument)
      Dim ws As New NotesUIWorkspace
      Set HRDoc =ws.CurrentDocument
      Dim emailDoc As NotesDocument
      Dim rtitem As NotesRichTextItem
      Dim db As NotesDatabase
      Dim s As New NotesSession
      Set DB = S.CurrentDatabase
        'Start to build email
      Set emailDoc = New NotesDocument(db)
      Set rtitem = New NotesRichTextItem (emaildoc, "Body")      
      
              'Create the body field and put in a doclink
      Call rtitem.AppendText("A Change Request requires your approval.  It is for "+Empname+".")
      Call rtitem.AddNewLine(2)  
      Call rtitem.AppendDocLink(HRDoc, "Link to document")<<<HERE IS THE PROBLEM
      
      'E-mail those who need to know
      emailDoc.Form = "Memo"
      emailDoc.SendTo = ApproverName
      emailDoc.BlindCopyTo = ""
      emailDoc.Subject =  "HR Action Form - Your Signature is Required!"
      'Compute the computed fields to send mail
      Call emailDoc.ComputeWithForm(False, False)
      
      'Send the e-mail
      Call emailDoc.Send (False)
      
      Messagebox ("This Change Request has been sent to the Next Approver for Approval.")
      
0
Comment
Question by:imjamesw
  • 2
3 Comments
 
LVL 31

Accepted Solution

by:
qwaletee earned 500 total points
ID: 11708915
Hi imjamesw,

Call AppendDocLink ( HRDoc.document ...

AppendDocLink expects a backend NotesDocument, not a front end UIDOcument.  It also needs to be a document that was already saved, and the DB has to have a default view.

And if you are passing it in the parameters, you don't need to assign it from NotesUiWorkspace.  or vice versa.

Cheers!
0
 

Author Comment

by:imjamesw
ID: 11709108
ARE the parameters correct

Call SendMail(ApproverName,EmpName, THIS IS PROBABLY WRONG>>> HRDOC)


Sub SendMail(ApproverName As String,EmpName As String, THIS IS PROBABLY WRONG>>> HRdoc As NotesUIDocument)
0
 

Author Comment

by:imjamesw
ID: 11709434
I got it

Thanx
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

911 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now