Excel to PDF with Bookmarks/Hyperlinks

mickeystanford_alumni

Board Regular
Joined
May 11, 2022
Messages
129
Office Version
  1. 2021
Platform
  1. Windows
  2. MacOS
Hi all,
I hope you are good.
I am trying to export an excel sheet with already the print area format set up to a PDF. However, in my excel sheet I have hyperlinks or bookmarks to specific cells within the printed area (through name manager). When I export to PDF, those links don't work tho.

Is there any way to once printing to PDF, the PDF keeps the links?

Its a report which I am sending weekly, so I would like to automate it.

Thanks a lot.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
When I tested this it worked for me. If it doesn't work for you, it may be a setting in adobe, or try redoing the Links with Https://
VBA Code:
Sub xls_2_pdf()
savloc = "C:\"
flnam = "Test.pdf"
    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
        "savloc & flnam", _
        Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
        :=False, OpenAfterPublish:=True
End Sub
 
Upvote 0
Txs Dermie. It didn't work. How could I re-do links with http? Cause the hyperlinks I have are referencing a cell in the same pdf. So I assume that when I convert to PDF that indeed doesn't work.
 
Upvote 0
Sorry...when I tested this, I used a HTTP link, which worked because it's an outside source. When using links for bookmarks to cells, when you convert the document to a PDF, the cell disappear, so there is no way to recognize where you want to go.
 
Upvote 0

Forum statistics

Threads
1,215,692
Messages
6,126,227
Members
449,303
Latest member
grantrob

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top