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

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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