excelbeginner2021
New Member
- Joined
- Mar 23, 2021
- Messages
- 1
- Office Version
- 365
- Platform
- Windows
I have a workbook in Excel that has multiple tabs. I have a macro that will save all the tabs as a PDF. I would like to add, that the name of the pdf is taken from a particular cell (a1), plus email it via outlook to a specific address in cell (a2).
This is the code I am currently using;
Sub SaveWorksheetAsPDF()
Dim ws As Worksheet
For Each ws In Worksheets
ws.ExportAsFixedFormat xlTypePDF, "C:\Desktop\1010" & ws.Name & ".pdf"
Next ws
End Sub
Can you help me please?
This is the code I am currently using;
Sub SaveWorksheetAsPDF()
Dim ws As Worksheet
For Each ws In Worksheets
ws.ExportAsFixedFormat xlTypePDF, "C:\Desktop\1010" & ws.Name & ".pdf"
Next ws
End Sub
Can you help me please?