Private Sub Application_OpenUrl (Url As String, Data As Object) As Boolean
If Url.StartsWith("file://") Then
Dim f As String = Url.SubString(7) 'remove the file:// scheme.
Dim su As StringUtils
Dim newfile As String = su.DecodeUrl(f, "utf8")
Dim filename As String = newfile.SubString2(newfile.LastIndexOf("/")+1,newfile.Length)
If File.Exists("",newfile) Then
File.Copy("",newfile,File.DirDocuments, "importfiles/" & filename)
openimport(False)
End If
End If
Return True
End Sub