View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
fred fred is offline
external usenet poster
 
Posts: 73
Default Print referenced file

Thanks Ryan but I want to print the file that the hyperlink references, not
the worksheet.

Fred

"ryguy7272" wrote in message
...
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