suresh ullanki
Board Regular
- Joined
- Apr 29, 2013
- Messages
- 67
Hi,
I want to open power point using prompt option. however it is throwing run time error 429. It is working fine if i remove prompt. any help is appreciated.
Sub DeleteAllPictures2()
Dim ppApp As PowerPoint.Application
Dim sldTemp As slide
Dim lngTemp As Long
Dim lngCount As Long
Set ppApp = GetObject(, "Powerpoint.Application")
file_name = Application.GetOpenFilename("Microsoft PowerPoint-Files (*.pptx*), *.pptx*")
If file_name = "False" Then
MsgBox "Stopping because you did not select a file"
Exit Sub
Else
PPT.Presentations.Open Filename:=file_name
End If
For Each sldTemp In ppApp.ActivePresentation.Slides
For lngCount = sldTemp.shapes.Count To 1 Step -1
With sldTemp.shapes(lngCount)
If .Type = msoPicture Then
.delete
End If
End With
Next
Next
End Sub
I want to open power point using prompt option. however it is throwing run time error 429. It is working fine if i remove prompt. any help is appreciated.
Sub DeleteAllPictures2()
Dim ppApp As PowerPoint.Application
Dim sldTemp As slide
Dim lngTemp As Long
Dim lngCount As Long
Set ppApp = GetObject(, "Powerpoint.Application")
file_name = Application.GetOpenFilename("Microsoft PowerPoint-Files (*.pptx*), *.pptx*")
If file_name = "False" Then
MsgBox "Stopping because you did not select a file"
Exit Sub
Else
PPT.Presentations.Open Filename:=file_name
End If
For Each sldTemp In ppApp.ActivePresentation.Slides
For lngCount = sldTemp.shapes.Count To 1 Step -1
With sldTemp.shapes(lngCount)
If .Type = msoPicture Then
.delete
End If
End With
Next
Next
End Sub