ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Insert a link to a pdf file (https://www.excelbanter.com/excel-programming/447961-insert-link-pdf-file.html)

kima

Insert a link to a pdf file
 
Want to insert a link to a pdf file on the server.

I have opened workbook and i know how to copy/paste the value of a cell from this workbook into another workbook file, with a macro. But cant get it to copy a link to the pdf-file generated in the opened workbook.

Generated value.

Would like it to insert a link to a file here.

Code:

Worksheets(1).Range("G1") = Format(a) * 100
Send to the wbTarget file.

Code:

wbTarget.Sheets(1).Range(bogstav & DatoID).PasteSpecial
Kim

Auric__

Insert a link to a pdf file
 
kima wrote:

Want to insert a link to a pdf file on the server.

I have opened workbook and i know how to copy/paste the value of a cell
from this workbook into another workbook file, with a macro. But cant
get it to copy a link to the pdf-file generated in the opened workbook.

Generated value.

Would like it to insert a link to a file here.


Code:
--------------------
Worksheets(1).Range("G1") = Format(a) * 100
--------------------


Send to the wbTarget file.


Code:
--------------------
wbTarget.Sheets(1).Range(bogstav & DatoID).PasteSpecial
--------------------


Try something like this:

wbTarget.Sheets(1).Hyperlinks.Add _
Anchor:=wbTarget.Sheets(1).Range(bogstav & DatoID), _
Address:="//server/path/file.pdf"

--
The price tags on the things I need are getting bigger by the day.


All times are GMT +1. The time now is 05:39 PM.

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