Wardy
asked on
Lotus notes Hotspots
Does anyone know how to place a hyperlink to a file on the fileserver with lotus notes? I can do this manully by going Create\hotspot\URL link and pasting in the path. I need to be able to do this in code.
When i send this to someone with notes 5.0 it works, This doesn't work with 4.6
Here is the code I am using:
Dim session As Object
Dim db As Object
Dim doc As Object
Dim msg, MyAttachment As String
Dim rtitem As Object
Dim Subj As String
Dim Col As Object
Dim x As Long
Dim i As Variant
Const EMBED_ATTACHMENT = 1454
Set session = CreateObject("Notes.NotesS ession")
Set db = session.GETDATABASE("", "")
Call db.OPENMAIL
Set doc = db.CREATEDOCUMENT
msg = "'file:\\c|/test.dat'"
Subj = "hyperlink Try"
Call doc.REPLACEITEMVALUE("Send To", "Paul Ward")
Call doc.REPLACEITEMVALUE("Subj ect", Subj)
Call doc.REPLACEITEMVALUE("Retu rnReceipt" , "1")
Set rtitem = doc.CREATERICHTEXTITEM("Bo dy")
Call rtitem.APPENDTEXT(msg)
'MyAttachment = "N:\ward\Projects\lotusnot es\Lotusno t.doc"
'Call rtitem.EMBEDOBJECT(EMBED_A TTACHMENT, "", MyAttachment)
doc.SAVEMESSAGEONSEND = True
'This not working
Call doc.PUTINFOLDER("Misc\hero ")
Call doc.SEND(False)
Set session = Nothing
MsgBox "Email sent.", vbOKOnly + vbInformation
Also the PutInFolder method is not working?????????????
Thanks
Wardy
When i send this to someone with notes 5.0 it works, This doesn't work with 4.6
Here is the code I am using:
Dim session As Object
Dim db As Object
Dim doc As Object
Dim msg, MyAttachment As String
Dim rtitem As Object
Dim Subj As String
Dim Col As Object
Dim x As Long
Dim i As Variant
Const EMBED_ATTACHMENT = 1454
Set session = CreateObject("Notes.NotesS
Set db = session.GETDATABASE("", "")
Call db.OPENMAIL
Set doc = db.CREATEDOCUMENT
msg = "'file:\\c|/test.dat'"
Subj = "hyperlink Try"
Call doc.REPLACEITEMVALUE("Send
Call doc.REPLACEITEMVALUE("Subj
Call doc.REPLACEITEMVALUE("Retu
Set rtitem = doc.CREATERICHTEXTITEM("Bo
Call rtitem.APPENDTEXT(msg)
'MyAttachment = "N:\ward\Projects\lotusnot
'Call rtitem.EMBEDOBJECT(EMBED_A
doc.SAVEMESSAGEONSEND = True
'This not working
Call doc.PUTINFOLDER("Misc\hero
Call doc.SEND(False)
Set session = Nothing
MsgBox "Email sent.", vbOKOnly + vbInformation
Also the PutInFolder method is not working?????????????
Thanks
Wardy
Post a link with 0 points regarding this in Notes TA.
ASKER
I am not sure what Notes TA is?
By the way, Notes 4.6 still uses OLE, Notes 5 uses "almost" true COM. SO, when you work with notes 4.x, all objectsdeclarations must be "as object".
If you declare as object, 4.x and 5.x code would works.
If you declare as object, 4.x and 5.x code would works.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.