Copy Hyperlink
acCmdCopyHyperlink
Use this example to copy the hyperlink and the display text to the clipboard. This example assumes that you have a text field called txtHyperlink and that the code is behind a command button called cmdCopyHyper.
'***************** Code Start *******************
'Code by Terry Wickenden
Private Sub cmdCopyHyper_Click()
On Error GoTo ErrCopyHyper
Me.txtHyperlink.SetFocus
DoCmd.RunCommand acCmdCopyHyperlink
Exit Sub
ErrCopyHyper:
Select Case Err
Case 2046
'Menu option not available
'Normally because there is no link in text box
MsgBox "There is no hyperlink"
Case Else
MsgBox Err & vbCrLf & vbCrLf & Err.Description, vbCritical, "Error Message"
Resume
End Select
End Sub
'****************** Code End ********************