Hi
I have pieced this macro together using bits from forums. The macro is to export a Rota, it sets the update date first, saves the workbook, then creates a folder for the year exports the sheet as a pdf, then its supposed to e-mail it to a list of recipients in a group in outlook... Excel on the second time of running the macro and overwriting the file opens Outlook and asks for permission to access, once granted the e-mail appears ready to send. Can anyone see why it has to be run twice? Also is there a way of sending the e-mail in the 'background'?
Also from the macro that I copied to export to a pdf had the ActiveSheet.ExportAsFixedFormat... again after the End If, can I get rid of this bit?
If anyone can see bits that I can 'clean up' that would be amazing' as i've very new to this level of Macros and don't yet fully understand what it is all doing...
Cell AN78 contains the path to the newly created pdf as there are things on the sheet that make up the file name and this was the only way that I seemed able to get Attachements.Add to work when the filename is formed by the macro.
Many thanks
Chris
Bookmarks