|
楼主 |
发表于 2022-12-5 22:09
|
显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
已解决,谢谢!
代码供大家参考
- Sub 查询后导出为pdf()
- With Sheets("小组")
- aaa = .Range("a2:a" & .[a1].End(xlDown).Row)
- End With
- For i = 1 To UBound(aaa)
- Sheets("拼音打印单面A4").Select
- Range("D2").Select
- [d2] = aaa(i, 1)
- ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
- ThisWorkbook.Path & "" & Range("d2") & ".pdf", Quality:=xlQualityMinimum, _
- IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
- False
- Next
- End Sub
复制代码 |
|