Re: Removing code line stops code working?!?!?
Alright, assuming everyone is on a version of Windows makes things a little easier.
You're using a template; I've not used templates very often, so I may be making some incorrect assumptions here.
Are they opening the template itself, or creating a new workbook based on the template? If it's a new workbook, it doesn't have a path yet, because it isn't actually in any location.
It looks like even the default 'send as PDF option' by default saves the PDF, albeit in the temporary location where it will get cleaned up later.
Your best bet is probably to use
application.DefaultFilePath
, which should give you a path which is valid and logical on whatever setup it's run on, and then kill the file after it's been emailed (though it might be worth checking if users will want a copy of the file for their records).