ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Link excel field to Acrobat files (https://www.excelbanter.com/excel-programming/319718-link-excel-field-acrobat-files.html)

sympatico

Link excel field to Acrobat files
 
I have a spreadsheet contains about 22,000 items (pictures information) .
One field (picture name field) of each item (row) has an AcrobatReader
Pictur in an other file. Can I link the values of this field to the PDF
files.

I want the user click on the picture name in the spreadsheet to open the
Acrobat file the have the same name in PDFs file.

Thanks



Nick Hodge

Link excel field to Acrobat files
 
You can highlight the data and 'Insert Hyperlink' to the file. This will
open when you click on it in Adobe Acrobat Reader.

If you have that many and they do not currently have the full path to the
folder but just the file name then this could be automated with some code
similar to below. (Select the data first and be prepared for a wait! Run in
test file first) It takes each cell and sets it as a hyperlink, in my case
to the path of C:\Images and the file name as shown in the selection. It
adds .pdf to the file name although this can be removed.

Sub SetHyperLinks()
Dim myCell As Range
Dim sFName As String
Const sPath = "C:\Images\"
For Each myCell In Selection
' Exclude & ".pdf" if extension in name
sFName = myCell.Value & ".pdf"
myCell.Hyperlinks.Add Anchor:=myCell, _
Address:=sPath & sFName, _
ScreenTip:="Open: " & sFName, _
TextToDisplay:=sFName
Next myCell
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"sympatico" wrote in message
. ..
I have a spreadsheet contains about 22,000 items (pictures information) .
One field (picture name field) of each item (row) has an AcrobatReader
Pictur in an other file. Can I link the values of this field to the PDF
files.

I want the user click on the picture name in the spreadsheet to open the
Acrobat file the have the same name in PDFs file.

Thanks






All times are GMT +1. The time now is 11:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com