Access Beginner
Active Member
- Joined
- Nov 8, 2010
- Messages
- 311
- Office Version
- 2016
- Platform
- 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
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