create PDF and include hyperlink in PDF document

Access Beginner

Active Member
Joined
Nov 8, 2010
Messages
311
Office Version
  1. 2016
Platform
  1. Windows
Good Morning,
I have the following code that creates a PDF document for me based off a named range on the "Menu" sheet, cell A55. This all work perfectly.
The issue I have is, I have a hyperlink on the "Overview" sheet cell B7, however when the PDF document is created, the hyperlink does not work.
The hyperlink does work in the spreadsheet. =HYPERLINK("https://www.google.com.au/?safe=active&ssui=on","Google") is what I have in Bmacro7

Code:
Sub PDFPrinttest()

    Dim ReportPath As Variant
    Dim ReportName As Variant
    Dim ToPrint As Variant
  
   
    Set ReportPath = Sheets("Menu").Range("A32")
    Set ReportName = Sheets("Menu").Range("A52")
    Set ToPrint = Sheets("Menu").Range("A55")
    
    Worksheets("Overview").Activate
    
    With ActiveSheet
    .PageSetup.PrintArea = ToPrint
    .ExportAsFixedFormat Type:=xlTypePDF, _
    Filename:=ReportPath & ReportName & ".PDF", _
    Quality:=xlQualityStandard, _
    IncludeDocProperties:=True, _
    IgnorePrintAreas:=False, _
    OpenAfterPublish:=True
    End With

End Sub
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,215,360
Messages
6,124,493
Members
449,166
Latest member
hokjock

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