I have an Excel 2007 workbook with several worksheets. I need to easily create a PDF for each worksheet to email to coworkers. I am new to Macros so if anyone has one already written to do this and would post it, I would really appreciate it.
I have an Excel 2007 workbook with several worksheets. I need to easily create a PDF for each worksheet to email to coworkers. I am new to Macros so if anyone has one already written to do this and would post it, I would really appreciate it.
Please Login or Register to view this content.
If solved remember to mark Thread as solved
Thank you for your quick response. It starts to run but then gets caught up. Can you help?
Sub export_To_Pdf()
Application.ScreenUpdating = False
strFilePath = "C:\test\" ' <<<<<<<<<<<< to be changed
On Error Resume Next
For j = 1 To 2
strPdfName = Sheets(j).Name
Sheets(j).Copy
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=strFilePath & strPdfName, _
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=False
ActiveWorkbook.Close (False)
Next
Application.ScreenUpdating = True
End Sub
I am an idiot! I figured it out. I really appreciate your help!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks