網路城邦
回本城市首頁 唐老鴨之家
市長:  副市長:
加入本城市推薦本城市加入我的最愛訂閱最新文章
udn城市資訊科技網路分享【唐老鴨之家】城市/討論區/
討論區Excel VBA 字體:
上一個討論主題 回文章列表 下一個討論主題
新版用powerpoint畫中華民國國旗的VBA程式
 瀏覽898|回應0推薦0


等級:6
留言加入好友
Sub MACRO1()

Rem draw the red block

ActiveWindow.Selection.SlideRange.Shapes.AddShape(msoShapeRectangle, 0, 0, 720, 540).Select

With ActiveWindow.Selection.ShapeRange

.Fill.ForeColor.RGB = RGB(255, 0, 0)

.Line.ForeColor.RGB = RGB(255, 0, 0)

End With


Rem draw the blue block

ActiveWindow.Selection.SlideRange.Shapes.AddShape(msoShapeRectangle, 0, 0, 360, 270).Select

With ActiveWindow.Selection.ShapeRange

.Fill.ForeColor.RGB = RGB(0, 0, 255)

.Line.ForeColor.RGB = RGB(0, 0, 255)

End With


Rem draw the 12 rays

ActiveWindow.Selection.SlideRange.Shapes.AddShape(msoShape12pointStar, 55, 10, 250, 250).Select

With ActiveWindow.Selection.ShapeRange

.Fill.ForeColor.RGB = RGB(255, 255, 255)

.Line.ForeColor.RGB = RGB(0, 0, 255)

.Adjustments.Item(1) = 0.25

End With


Rem draw the circle

ActiveWindow.Selection.SlideRange.Shapes.AddShape(msoShapeOval, 118.8, 75.6, 120, 120).Select

With ActiveWindow.Selection.ShapeRange

.Fill.ForeColor.RGB = RGB(255, 255, 255)

.Line.ForeColor.RGB = RGB(0, 0, 255)

.Line.Weight = 5

.Line.DashStyle = msoLineSolid

End With


End Sub
回應 回應給此人 推薦文章 列印 加入我的文摘

引用
引用網址:https://city.udn.com/forum/trackback.jsp?no=58536&aid=5231210