Print referenced file
Put your hyperlink in some cell; I chose C3, then try something like this:
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.Range.Address = "$C$3" Then ActiveSheet.PrintOut
End Sub
Remember, this is event-ode, so you have to right-click on the tab of the
sheet where you want to run the code. Paste it into the window that opens.
Regards,
Ryan---
--
RyGuy
"Fred" wrote:
Can someone please tell me how I can print a file reference by a hyperlink.
Most of the referenced files are either PDFs or Word documents.
I can get the full file name from the hyperlink but how do I print that file
as if clicking on "Print" on the popup menu in windows explorer. I need to
do this from a macro in Excel.
Thanks for any help,
Fred
|