Hi,
I have been tasked to develop a custom form which registers contracts. The recipient of this email form needs to have links to various workbooks (.xls, .doc & .pdf files). I have added some functionality to the template, where the sender clicks on a button, browses to the file (that they want to send the link of), using the commondialog box. When the sender clicks open, the full filepath is inserted into a textbox.
The code i have used is:
sub cmdBrowse1_Click
sSaveMessageClass = Item.MessageClass
Set objDialog = CreateObject("UserAccounts.CommonDialog")
objDialog.Filter = "Excel Spreadsheets|*.xls"
objDialog.FilterIndex = 1
'objDialog.InitialDir = "W:\"
intResult = objDialog.ShowOpen
If intResult = 0 Then
exit sub
Else
Item.UserProperties.Find("txtBrowse1").Value = "<file://" & objDialog.FileName & ">"
End If
Item.MessageClass = sSaveMessageClass
end sub
Ideally, i would like this task to insert a hyperlink to the file, so that when the recipient recieves the email, all they have to do is click on the textbox to open the document, but i cannot figure it out. I have also tried adding a click event for the corresponding box on the read page, but i cannot get it work.
Any ideas?
Thanks in advance
Neil