-
Hi Abraham, this should address the print area issue and saving to PDF
[VBA]Sub pdf_doc()
Dim lr As Long
Dim lc As Long
Dim Printrng As Range
lr = Cells(Rows.Count, 8).End(xlUp).Row
lc = Cells(11, Columns.Count).End(xlToLeft).Column
Set Printrng = Range(Cells(1, 1), Cells(lr, lc))
With ActiveSheet.PageSetup
.PrintArea = Printrng.Address
.PrintTitleRows = "$1:$10"
.CenterFooter = "&P/&N"
.PrintQuality = 600
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = False
End With
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Users\Public\saabx.pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True
End Sub
[/VBA]
Last edited by sassora; 03-09-2013 at 11:59 AM.
Reason: Saving part sorted - the was a permissions issue when saving to my C drive
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules