Ernst B. Zwick
New Member
Hi!
I'trying to export a scorecards to a PDF file via a makro.
The specs: Win10 Home 64, Excel 2016, Adobe DC pro
Here's the attempt, which gave me errors:
---
Sub PDFPrint()
'
' PDFPrint Makro
'
' Keys: Strg+p
'
Sheets("Scorecard").Select
strTarget = "c:\Temp\FAS\"
ChDir (strTarget)
ActiveSheet.PageSetup.PrintArea = "$A$1:$L$59"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:="FAS_" & Range("Scorecard!C4").Value & ".pdf", _
Quality:=xlQualityStandard, _
IncudeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
Sheets("Scorecard").Select
End Sub
---
The errors I'got were:
Runtime errror 1004
Application or object defines error
---
Any help would be greatly appreciated!
Thanky you,
Ernst
POST MOVED BY MODERATOR
.
I'trying to export a scorecards to a PDF file via a makro.
The specs: Win10 Home 64, Excel 2016, Adobe DC pro
Here's the attempt, which gave me errors:
---
Sub PDFPrint()
'
' PDFPrint Makro
'
' Keys: Strg+p
'
Sheets("Scorecard").Select
strTarget = "c:\Temp\FAS\"
ChDir (strTarget)
ActiveSheet.PageSetup.PrintArea = "$A$1:$L$59"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:="FAS_" & Range("Scorecard!C4").Value & ".pdf", _
Quality:=xlQualityStandard, _
IncudeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
Sheets("Scorecard").Select
End Sub
---
The errors I'got were:
Runtime errror 1004
Application or object defines error
---
Any help would be greatly appreciated!
Thanky you,
Ernst
POST MOVED BY MODERATOR
.
Last edited by a moderator: