?
Solved

Link not working when mailed from sub

Posted on 2004-08-03
3
Medium Priority
?
271 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
[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
  • 2
3 Comments
 
LVL 31

Accepted Solution

by:
qwaletee earned 2000 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

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

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
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…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

743 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