Excel ActiveX组件可以';不创建对象VBA

Excel ActiveX组件可以';不创建对象VBA,excel,powerpoint,vba,Excel,Powerpoint,Vba,将PPT转换为PDF时出错,原因是“ActiveX组件无法创建对象VBA” Dim PPT As PowerPoint.Application Dim newslide As PowerPoint.SlideRange Dim slideCtr As Integer Dim tb As PowerPoint.Shape Set PPT = CreateObject("PowerPoint.Application") PPT.Visible = Tr

将PPT转换为PDF时出错,原因是“ActiveX组件无法创建对象VBA”

    Dim PPT As PowerPoint.Application
    Dim newslide As PowerPoint.SlideRange
    Dim slideCtr As Integer
    Dim tb As PowerPoint.Shape
    Set PPT = CreateObject("PowerPoint.Application")
    PPT.Visible = True
    PPT.Presentations.Open"C:\Users\GShaikh\Desktop\ProcessCoach certificate template.pptx"
    Range("F8").Activate  'This cell had a date formatted as a date
    slideCtr = 1

    Set tb = PPT.ActivePresentation.Slides(slideCtr).Shapes("Text Box 4")
    tb.TextFrame.TextRange.Characters.Text = Format(ActiveCell.Value, "m/d/yyyy")

    'Error is here
    ActivePresentation.ExportAsFixedFormat ActivePresentation.Path & _
 "\" & ActivePresentation.Name & _
 ".pdf", ppFixedFormatTypePDF, ppFixedFormatIntentPrint