Hi i have a problem only with a client notes user in my code :
When he click to the link File 1 , he select a file , when he do Open he have this message in this sreen : Unable to open file !!
I don’t understans beca nothing else have thios problem
Di you found some trouble in my code ?
it is a code agent called by Hotsopot Link
@Command([ToolsRunMacro];“(CreateLinkHotspot1)”)
Option Public
'The following declaration will work only on Windows environments.
Declare Function NEMGetFile Lib “NNOTESWS” Alias “NEMGetFile” _
( Z As Integer, Byval N As String, Byval F As String, Byval T As String ) As Integer
Sub Initialize
'Created by John Buoro - (C) Copyright 2002
'13/07/2002 - Code created.
'16/07/2002 - Version 1.0 released.
'10/09/2002 - Removed Kill statement for Notes.Net.
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim filename As String
Dim TempFileName As String
'Select the file.
n$ = String$(1024, " ")
f$ = “All Files|.|Acrobat Files|.PDF|Excel Documents|.XLS|Word Documents|.DOC|PowerPoint Presentations|.PPT|PowerPoint Slides|*.PPS|”
ret% = NEMGetFile( 0, n$, f$, “Selection du fichier ( dans P:\Jobs)”)
If ret% = 0 Then Exit Sub
filename = Fulltrim(n$)
'Get the working document.
Set uidoc = workspace.CurrentDocument
'Clear the link field.
Call uidoc.FieldSetText( “Link1”, “” )
'Construct the html code.
Call uidoc.FieldSetText( “HTML”, “<a href=”“file:\” + filename + “”“>” + filename + “” )
s = uidoc.FieldGetText( “HTML” )
'Write the html code to a temp file.
fileNum% = Freefile()
TempFileName$ = “c:\LinkHotspotCreator.htm”
Open TempFileName$ For Output As fileNum%
Print #fileNum%, s
Close fileNum%
'Import the html file into a rich text field.
uidoc.GotoField( “Link1” )
Call uidoc.Import(“HTML File”,TempFileName$)
'Copy to clipboard.
Call uidoc.GoToField( “Link1” )
'Call uidoc.SelectAll
'Call uidoc.Copy
'Messagebox “You can now paste your Link1 into any richtext field.”, 0 + 64, “Create File Link1 Hotspot”
'Clean up.
'Kill TempFileName$
'Call uidoc.Close
End Sub
thank you