Hi EkknathJujare,
Sorry to hear that you're experiencing this issue!
I am Bhavik, a Microsoft user like you. Please note, I am not a Microsoft employee and don’t have direct access to your account, but I will do everything I can to help you with your queries. :)
Make sure you don't have that PDF opened while running this Macro because if the PDF file is opened somewhere, Macro would not be able to save it.
I was able to reproduce the same error on my end while PDF was open.
If that's not the case then make sure that the PDF file is not locked for writing by OS.
Try restarting the machine and see if that helps.
Also, try to rename the file in Macro code and see if gets saved.
One last thing, make sure that you have "Userprofile" environment variable properly defined, check it by going to the below path:
Settings > System > About > Advanced System Settings > Environment Variables
Write below code in Macro to see if you're getting the value correctly:
Msgbox(Environ("Userprofile")
Let me know in case of any further assistance is required, I will be glad to assist.
Thanks
Bhavik