|
![](https://clubstatic.excelhome.net/image/common/ico_lz.png)
楼主 |
发表于 2025-1-7 09:47
|
显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
本帖最后由 ning84 于 2025-1-8 09:40 编辑
学习学习,再学习。
- Sub ll()
- Dim Sld As Slide
- Set Sld = Application.ActivePresentation.Slides(1)
- Dim Shp As Shape
- For Each Shp In Sld.Shapes
- With Shp
- Debug.Print .Name, .Type, .Left, .Top, .Width, .Height
- Select Case .Type
- Case 14
- Debug.Print , .TextEffect.FontName, , .TextFrame.TextRange.Font.Size, .TextFrame.TextRange.Text
- End Select
- End With
- Next Shp
- End Sub
- Sub ll1()
- Dim Sld As Slide
- Set Sld = Application.ActivePresentation.Slides(1)
- Dim Shp As Shape
- For ii = 1 To Sld.Shapes.Count
- Set Shp = Sld.Shapes(ii)
- With Shp
- Debug.Print ii, .Name, .Type, .Left, .Top, .Width, .Height
- Select Case .Type
- Case 14
- Debug.Print , .TextFrame.TextRange.Text, .TextEffect.FontName, , .TextFrame.TextRange.Font.Size,
- Debug.Print .Fill.ForeColor.RGB, .Fill.Transparency
- End Select
- End With
- Next
- End Sub
复制代码
- Sub ll()
- Dim Sld As Slide, Slds As Slides
- Dim Shp As Shape
- Set Slds = Application.ActivePresentation.Slides
- For ii = Slds.Count To 1 Step -1
- Set Sld = Slds(ii)
- Set Shp = Sld.Shapes("Txt2")
- With Shp
- Debug.Print ii, .TextFrame.TextRange.Text
- If .TextFrame.TextRange.Text = "Txt2" Then
- Sld.Select
- Sld.Delete
- End If
- End With
-
- Next ii
-
- End Sub
复制代码
|
|