Hi all,
OK one way or another through a collaborative effort at work we've managed to create a macro that loops through a list of users, creates a PDF of specific pages in a workbook that they need, save a copy of the PDF whilst also creating an email ready to send to the user.
Last few steps are error checking. Does anyone know what to put (and where) in to the attached coding to
a) create an error message if the Tab Names and Headings in C1:P1 don't match exactly (as they are required to do in order to print off the correct pages)
b) stop the macro over-writing a file already saved at the:
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, FileName:=FullName _
, IncludeDocProperties:=False, IgnorePrintAreas:=False, OpenAfterPublish:=False
part of the code?
A lot of it has been blind luck and hatchet coding, so if you have a better way of doing this completely or any tips to make the code more dynamic please feel free to share, have to get better somehow?!
Many thanks in advance,
Mike
Bookmarks