NotesURL problem to open document in Client from Web

How to open a document in Notes Client in web(mail with link to document) using NotesURL command.

I’d tried it, but it returns an error like this :

invalid directory name or device not ready

The code I used to send mail with link, like the one below :

Dim session As New NotesSession

Dim db As NotesDatabase

Set db = session.CurrentDatabase

Dim doc As NotesDocument

Set doc = New NotesDocument(db)

Dim recipient As String

recipient = “test@test.com”

'initialized Memo document for sending mail

Call doc.ReplaceItemValue(“Form”,“Memo”)

Call doc.ReplaceItemValue(“Principal”,“TESTING”)

Call doc.ReplaceItemValue(“SendTo”,recipient)

Call doc.ReplaceItemValue(“Subject”,“Testing”)

'make the body field

Dim rtitem As NotesRichTextItem

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

Call rtitem.AppendText(“Dear " + recipient +”,")

Call rtitem.AddNewline(3)

Dim richStyles As NotesRichTextStyle

Set richStyles = session.CreateRichTextStyle

richStyles.PassThruHTML = True

'THIS CODE IS THE ONE I USED TO MAKE LINK IN THE WEB

Call rtitem.AppendStyle(richStyles)

Call rtitem.AppendText(“<A HREF=”“” + olddoc.NotesURL + “”“>” + “testingdoank” + “”)

richStyles.PassThruHTML = False

Call rtitem.AppendStyle(richStyles)

Call rtitem.AddNewline(3)

Set richStyles = Nothing

Call doc.Send(True)

Any one has solutions??

Thanks before

Subject: NotesURL problem to open document in Client from Web

Hi,don’t know if this is still an issue for you, but since I just came a cross a similar problem and did some “research” you might be interested in what I found:

http://www-10.lotus.com/ldd/nd6forum.nsf/DateAllThreadedweb/509186be0e1e79298525730100466f7c?OpenDocument

Maybe you can try to modifiy the hostname portion of your NotesURL and see if it works.

regards,

-Lothar

Subject: NotesURL problem to open document in Client from Web

Hi,

Your are incorrectly building the link.

try something like this to build url :

“/__” + db.replicaid + “/View/” + doc.UniversalId + “?OpenDocument”

Hope this help.

AD

Subject: RE: NotesURL problem to open document in Client from Web

I’d tried it but it give the same error message…

any other help??