|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
- Private Sub del3()
- Dim SunSetArr
- SunSetArr = Array("兰州日出日落", "兰州高温低温", "珠海日出日落", "珠海高温低温", "武汉日出日落", "武汉高温低温", "北京日出日落", "北京高温低温", "抚远日出日落", "抚远高温低温", "漠河日出日落", "漠河高温低温", "三沙日出日落", "三沙高温低温", "喀什日出日落", "喀什高温低温")
-
-
- Dim Pres As Presentation
- Dim Sld As Slide
- Dim ShpRng As ShapeRange
- Set Pres = Application.ActivePresentation
- For ii = Pres.Slides.Count To 2 Step -1
- Set Sld = Pres.Slides(ii)
- Sld.Delete
- Next ii
- Stop
- Set Sld = Pres.Slides(1)
- Sld.Name = SunSetArr(0)
- Set ShpRng = Sld.Shapes.Range(Array("C1", "C2", "N"))
- ShpRng.Select msoCTrue
- ShpRng.Copy
- For ii = 2 To UBound(SunSetArr) + 1
- Set Sld = Pres.Slides.Add(ii, ppLayoutBlank)
- Sld.Name = SunSetArr(ii - 1)
- ActiveWindow.View.GotoSlide ii
- ActiveWindow.View.Paste
- Debug.Print Sld.Name
- Next ii
- End Sub
复制代码 |
|