
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=MyPathExtended & "" & strPdfName, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False |
Range("F6:H40").Select
Selection.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:Documents and SettingsaxseDesktopCONTATTI
CONTI est.pdf", _
Quality:=xlQualityStandard,
IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=True
End Sub |
'per stampare un pdf per ogni foglio con il nome del foglio stesso
Sub pdf_ogni_foglio()
Dim foglio As Worksheet
percorso = "C:UsersDesktopstampe"
For Each foglio In Worksheets
nomefoglio = foglio.Name
foglio.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=percorso & nomefoglio & ".pdf", _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
Next
End Sub
'per stampare tutti i fogli su un unico pdf
Sub pdf_unico()
Dim foglio As Variant
foglio = Array()
For i = 1 To Sheets.Count
ReDim Preserve foglio(i - 1)
foglio(i - 1) = Sheets(i).Name
Next i
nomecartella = ActiveWorkbook.Name
percorso = "C:UsersDesktopstampe"
Sheets(foglio).Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=percorso & nomecartella & ".pdf", _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=True
End Sub
|
Sub pdf_unico()
percorso = "C:UsersDesktopstampe"
nomecartella = ActiveWorkbook.Name
ThisWorkbook.Sheets.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=percorso & nomecartella & ".pdf", _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=True
End Sub
|
ThisWorkbook.Sheets.Select Selection.ExportAsFixedFormat ...(ecc. con gli altri parametri) |
Sub pdf_unico()
nomecartella = ActiveWorkbook.Name
percorso = "C:UsersDesktopstampe"
ThisWorkbook.Sheets.Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=percorso & nomecartella & ".pdf", _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=True
End Sub |
