Insert a link to a pdf file

K

kima

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 cel
from this workbook into another workbook file, with a macro. But can
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) * 10
-------------------


Send to the wbTarget file.


Code
 
A

Auric__

kima said:
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:

Try something like this:

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top