I need the solution, how to enter the text into the slide(PPT) without opening the ppt file.
I have used the below code but getting the error in set can any one suggest what we ca you instead of set?
Dim oPPt, oPPs
Set oPPt = CreateObject(“PowerPoint.application”)
‘oPPt.Visible = True’
’ Assuming your adding it to an existing powerpoint : ’
Dim sPPtFile: sPPtFile = “C:\Users\GUChandr\Documents\temp.pptx”
Set oPPs = oPPt.Presentations.Open(sPPtFile)
Dim oSlide
Set oSlide = oPPs.Slides.Add(1, 2)
oSlide.Shapes(1).TextFrame.TextRange.Text = "Change in My first slide 2 "
If Not IsEmpty(oPPt) Then
For Each doc In oPPt.Presentations
doc.Save
Next
End If
oPPt.quit
set oPPt = nothing