Hi,I have an agent who’s sending a docLink via Email.
But I received the Email without the DocLink,
and I setup a default view.What’s wrong with my code?
Sub Initialize
Dim s As New notessession
Dim db As notesdatabase
Dim memo As notesdocument
Dim webdoc As notesdocument
Set db = s.currentdatabase
Set webdoc = s.documentcontext
Set memo = New notesdocument(db)
Dim item As NotesRichTextItem
Set rtitem = New NotesRichTextItem( memo, “Body” )
Call rtitem.appendtext(“You have recieved a new PFRC Request”)
Call rtitem.appendtext(“Please follow the document link below to view this document.”)
Call rtitem.AppendDocLink( webdoc, “Document Link” )
memo.form = “Memo”
memo.SendTo = “aaaa@aaa.com”
memo.Importance = “1”
memo.CopyTo = “bbbb@bbb.com”
memo.Subject = “New PFRC Request”
Call memo.Send(False)
End Sub
Is there a place I can get a different code?
Thank you
Subject: DocLink doesn’t work!!!
Has the document that you are trying to link to been saved yet ?
Until a document is saved in the database, you cannot create a link to it.
Subject: DocLink doesn’t work!!!
If you search the forum there are a lot of posts on this topic. If you open the email on the web - then the link won’t work - you have to send a URL.
If that isn’t the issue, if you search this forum there are a lot of posts about appenddoclink and the web. (I always search the Notes 4 and 5 forum, as well, for issues involving non-new methods, properties, etc.).
Leonardo
Subject: DocLink doesn’t work!!!
Is it something wrong with the code???
Sub Initialize
Dim s As New notessession
Dim db As notesdatabase
Dim memo As notesdocument
Dim webdoc As notesdocument
Set db = s.currentdatabase
Set webdoc = s.documentcontext
Set memo = New notesdocument(db)
Dim item As NotesItem
Set rtitem = New NotesRichTextItem( memo, "Body" )
Call rtitem.appendtext("You have recieved a new PFRC Request. ")
Call rtitem.appendtext(" Please follow the document link below to view this document.")
Call rtitem.AppendDocLink( webdoc, "Document Link" )
memo.form = "Memo"
memo.SendTo = "ecohen@is.jgh.mcgill.ca"
memo.Importance = "1"
memo.CopyTo = "ecohen@is.jgh.mcgill.ca"
memo.Subject = "New PFRC Request"
Call memo.Send(False)
End Sub
Subject: RE: DocLink doesn’t work!!!
You have:Dim item As NotesItem
It should be:
Dim rtitem As NotesRichTextItem
Though I don’t think this would make a difference in your problem (I could be wrong).
What I was saying about the link is that if you send a url it will work. E.g. change:
Call rtitem.AppendDocLink( webdoc, “Document Link” )
to:
Call rtitem.appendtext(webdoc.HTTP_Referer(0))
Of course you have to have an HTTP_Referer field on your form.
Leonardo
Subject: RE: DocLink doesn’t work!!!
It’s giving me errors when i’m changing rtitem !1I don’t know what to do
Subject: RE: DocLink doesn’t work!!!
I posted the wrong code and then corrected my post - it should be:Dim rtitem As NotesRichTextItem
Subject: RE: DocLink doesn’t work!!!
Nothing the same thing, I don’t get any docLink !!! I got the email but without the DocLink
Subject: DocLink doesn’t work!!!
Need a complete script for that.Can’t find something working