|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
Dim found As Boolean, n As Byte, i As Byte, adre$, tpadr$
On Error Resume Next
adre = InputBox("请输入图片存放的路径", "图片地址")
tpadr = Dir(adre & "\*.jpg")
Do
' For n = 1 To 3
ActiveWindow.View.GotoSlide Index:=ActivePresentation.Slides.Add(Index:=1, Layout:=ppLayoutTitle).SlideIndex
Set tpadrs = ActiveWindow.View.Slide.Open(tpadr)
' Do
' found = False
' For Each Sld In ActivePresentation.Slides
' For Each shp In Sld.Shapes
' If shp.HasTextFrame Then
' If shp.Type <> 1 Then
' If Not shp.TextFrame.HasText Then
' ActiveWindow.View.GotoSlide Index:=shp.Parent.SlideIndex
' shp.Select
' shp.Delete
' found = True
' End If
' End If
' End If
' Next shp
' Next Sld
' Loop While found = True
ActiveWindow.Selection.SlideRange.Shapes.AddPicture(tpadr, LinkToFile:=msoFalse, SaveWithDocument:=msoTrue, Left:=20, Top:=20, Width:=500, Height:=500).Select
' Next
tpadr = Dir
Loop Until Len(tpadr) = 0
End Sub
|
|