I try to save an excel sheet using the following code:
Sub save_as_PDF()
Dim strPath As String, strName As String, strSaveName As String
strPath = "C:\Users\xxx\Documents" strName = "Test.pdf" strSaveName =
strPath & strName
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF,
Filename:=strSaveName, Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=True
End Sub
On my old pc - having Excel 2010 and the free Adobe Acrobat Reader, the pdf is created.
However, on my new pc having Excel 2016 and also the free Adobe Acrobat Reader, the pdf is not created. The following error is thrown: Error 430 - Runtime Error Class Does Not Support Automation Or Does Not Support Expected Interface.
I tried to install the test version of Adobe 11 Pro, which did not help. Also, I'm able to create a PDF via the manual print command.