My scenario: following a migration i have done for a client,I need to rewrite some of the macros and one specifically is not working. What i need is to be able to save the excel as a PDF in some other folder using VBA.

I am using this code which do the work but when i open the PDF FILE it tells me the file is corrupted.

ActiveWorkbook.SaveAs Filename:="https://tenant.sharepoint.com/sites/webhook/investment/test.pdf", FileFormat:=wdformatPDF, CreateBackup:=False

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.