Solved

Link not working when mailed from sub

Posted on 2004-08-03
3
257 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
Comment Utility
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
Comment Utility
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
Comment Utility
I got it

Thanx
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Creating a new theme in discussion8.ntf 6 157
Work Space in Lotus Notes cannot found 6 160
Lotus notes email code 6 104
Lotus Domino server 9 7 64
This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

9 Experts available now in Live!

Get 1:1 Help Now