Doclink ** again **

Hi, I am having this issue:

When I receive in a email a link to a document that is in another db and that db is not bookmarket I receive a message telling that Link doesn’t exist or…, but if I first bookmark the db to my workspace (ctrl+O) and then click in the link I can see the document. The code that I am using is this one

Sub Click(Source As Button)

Dim session As New notessession

Dim db As notesdatabase

Dim workspace As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Dim L_Doc As NotesDocument

Dim doc As notesdocument

Dim rtitem As NotesRichTextItem

Set db = session.currentdatabase

Set uidoc = workspace.CurrentDocument

Set L_Doc = uidoc.Document

Call L_Doc.Save(True,False)

For i=0 To Ubound(L_Doc.GetItemValue(“SendTo”))

Set doc = New notesdocument(db)

Set rtitem = New NotesRichTextItem( doc, “Body” )

Call rtitem.AppendText(L_Doc.GetItemValue(“remarks”)(0))

Call rtitem.AddNewLine( 1 )

Call rtitem.AddNewLine( 1 )

Call rtitem.AppendText(“Please follow this link”)

Call rtitem.AddNewLine( 1 )

Call rtitem.AddNewLine( 1 )

Call rtitem.AppendDocLink( L_Doc, db.Title )

doc.form= “memo”

doc.sendto = L_Doc.GetItemValue(“SendTo”)(i)

doc.subject = "Issue - no. " + uidoc.FieldGetText(“no”) + " - " + uidoc.FieldGetText(“o_headline”)

doc.Body= “Please follow this link”

Call doc.send(False)

Next

End Sub

Thanks in advance

Subject: DOCLINK ** AGAIN **

HiFirst: Please don’t shout.

Second: What exactly is your problem?

Your code sends a doclink. That has nothing to do with the bookmarks on your client. I suppose, you want to know why you need to bookmark the database, before you can open the link. Why don’t you just bookmark the database. What is the problem when a database is bookmarked?

cti

Subject: RE: DOCLINK ** AGAIN **

Sorry if it sounds like a shout but it wasn’t my intention, the problem is this

If I need to see the document, why should I have to bookmark the database first ???

Can’t I send a link to someone that doesn’t have the database bookmarket ? If not, how can I ensure that if the user doesn’t have the database bookmarket, the link will first open the database and only then the document ?

Thanks

Subject: RE: DOCLINK ** AGAIN **

Check the doclink properties in the received email. Does the “Hint” property have a value? If not, you may need to modify your sending code to make sure this hint value is supplied. Otherwise, if the recipient doesn’t have the database bookmarked, Notes client doesn’t know which server it should look at. See NotesRichTextDocLink class.

Subject: RE: DOCLINK ** AGAIN **

Sorry, but based on the code I have how can I include the HINT value ?

Sub Click(Source As Button)

Dim session As New notessession

Dim db As notesdatabase

Dim workspace As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Dim L_Doc As NotesDocument

Dim doc As notesdocument

Dim rtitem As NotesRichTextItem



Set db = session.currentdatabase

Set uidoc = workspace.CurrentDocument

Set L_Doc = uidoc.Document



Call L_Doc.Save(True,False)



For i=0 To Ubound(L_Doc.GetItemValue("SendTo"))

	Set doc = New notesdocument(db)

	Set rtitem = New NotesRichTextItem( doc, "Body" )

	Call rtitem.AppendText(L_Doc.GetItemValue("remarks")(0))

	Call rtitem.AddNewLine( 1 )

	Call rtitem.AddNewLine( 1 )

	Call rtitem.AppendText("Please follow this link")

	Call rtitem.AddNewLine( 1 )

	Call rtitem.AddNewLine( 1 )

	Call rtitem.AppendDocLink( L_Doc, db.Title )

	

	doc.form= "memo"

	doc.sendto = L_Doc.GetItemValue("SendTo")(i)

	doc.subject = "Issue - no. " + uidoc.FieldGetText("no") + " - " + uidoc.FieldGetText("o_headline")

	doc.Body= "Please follow this link"

	Call doc.send(False)

Next

End Sub

Thanks in advance

Subject: RE: DOCLINK ** AGAIN **

By any chance is the user using a local copy or are they on the server? We have had the issue when the user couldn’t read the document because until replication took place, the document wasn’t available.

Just a thought,

Jean

Subject: RE: DOCLINK ** AGAIN **

Jean is correct but this is for all intent and purpose is just a different version of Andre’s description. This error is due to not being able to locate the server that the database containing the linked document is in. In Jean’s case, the server = Local

Subject: RE: DOCLINK ** AGAIN **

Hi Jean,

The database is placed in the server and there is no replication to any other server or locally.

Any help to solve this issue ?

Thanks