Sub PDF() Dim asy As Worksheet Dim spath As String spath = Excel.ThisWorkbook.Path For Each asy In Excel.ThisWorkbook.Worksheets sName = spath & "\" & asy.Name & ".pdf" asy.ExportAsFixedFormat Type:=xlTypePDF, Filename:=sName Next End Sub
Sub PDF() spatch = Excel.ThisWorkbook.Path sName = spatch & "\" & ActiveSheet.Name & Format(Date, "yyyymmdd") ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=sName End Sub
标签:ThisWorkbook,vba,sName,Sub,Excel,asy,excel,格式文件,spath From: https://www.cnblogs.com/Insist-Y/p/16964714.html