VBA에서는 Set Shp = 슬라이드(또는 시트).Shapes.AddShape (도형모양, 가로, 세로, 넓이, 높이) 와 같은 명령으로
슬라이드에 도형을 삽입할 수 있습니다.
파워포인트에는 미리 정의된 여러가지 도형모양이 있습니다.
위의 도형 모양에 대한 예약어(MsoAutoShapeType)는 아래 링크에서 알 수 있습니다.
https://learn.microsoft.com/en-us/office/vba/api/office.msoautoshapetype
그러나 AutoShapeType 이름으로는 화면상의 실질적인 도형모양 생김새를 미리 알기가 어렵습니다.
어떤 도형이름을 사용해야 하는지 그림으로 보여주지 않습니다.
그래서 미리 정의된 도형이름 및 내부도형숫자(값)와 실질적인 도형모양을 직접 보여줄 수 있게 VBA로 정리해보았습니다.
(예전에 4:3 비율로 만들었던 것을 16:9로 변형 수정하였습니다.)
17열 * 11행으로 Mixed 타입을 제외하고 총 183개의 도형 유형의 Value 와 AutoShapeType 입니다.
첨부파일을 열어서 슬라이드쇼를 하고 1슬라이드에서 각 도형에 마우스를 가져가면 예약된 도형 이름이 뜹니다.
원하는 도형을 클릭하면 도형 이름이 클립보드에 복사되어 VBA코드창에 바로 붙여넣을 수 있습니다.
2슬라이드부터는 좀 더 크게 각 도형을 보여줍니다.
9열 * 5행 45개씩 보여줍니다.
여기서도 도형을 클릭하면 도형 이름을 클립보드에 복사해줍니다.
위와 같은 슬라이드를 자동으로 만들어 주는 VBA입니다.
먼저 각 AutoShape의 예약된 도형유형이름과 도형값(Value)를 정의하는 부분입니다.
총 183개입니다. 138번은 오류가 납니다. 183번은 잘 보이지 않습니다. 일부 도형은 Adjustments 를 4개까지 조절할 수 있습니다.
Option Base 1
Const Cnt As Integer = 183
Public ShpName(1 To Cnt) As String
Public shp(1 To Cnt) As Integer
Sub InitShapes()
' built-in shape constants
' https://learn.microsoft.com/en-us/office/vba/api/office.msoautoshapetype
ShpName(1) = "Rectangle": shp(1) = msoShapeRectangle
ShpName(2) = "Parallelogram": shp(2) = msoShapeParallelogram
ShpName(3) = "Trapezoid": shp(3) = msoShapeTrapezoid
ShpName(4) = "Diamond": shp(4) = msoShapeDiamond
ShpName(5) = "RoundedRectangle": shp(5) = msoShapeRoundedRectangle
ShpName(6) = "Octagon": shp(6) = msoShapeOctagon
ShpName(7) = "IsoscelesTriangle": shp(7) = msoShapeIsoscelesTriangle
ShpName(8) = "RightTriangle": shp(8) = msoShapeRightTriangle
ShpName(9) = "Oval": shp(9) = msoShapeOval
ShpName(10) = "Hexagon": shp(10) = msoShapeHexagon
ShpName(11) = "Cross": shp(11) = msoShapeCross
ShpName(12) = "RegularPentagon": shp(12) = msoShapeRegularPentagon
ShpName(13) = "Can": shp(13) = msoShapeCan
ShpName(14) = "Cube": shp(14) = msoShapeCube
ShpName(15) = "Bevel": shp(15) = msoShapeBevel
ShpName(16) = "FoldedCorner": shp(16) = msoShapeFoldedCorner
ShpName(17) = "SmileyFace": shp(17) = msoShapeSmileyFace
ShpName(18) = "Donut": shp(18) = msoShapeDonut
ShpName(19) = "NoSymbol": shp(19) = msoShapeNoSymbol
ShpName(20) = "BlockArc": shp(20) = msoShapeBlockArc
ShpName(21) = "Heart": shp(21) = msoShapeHeart
ShpName(22) = "LightningBolt": shp(22) = msoShapeLightningBolt
ShpName(23) = "Sun": shp(23) = msoShapeSun
ShpName(24) = "Moon": shp(24) = msoShapeMoon
ShpName(25) = "Arc": shp(25) = msoShapeArc
ShpName(26) = "DoubleBracket": shp(26) = msoShapeDoubleBracket
ShpName(27) = "DoubleBrace": shp(27) = msoShapeDoubleBrace
ShpName(28) = "Plaque": shp(28) = msoShapePlaque
ShpName(29) = "LeftBracket": shp(29) = msoShapeLeftBracket
ShpName(30) = "RightBracket": shp(30) = msoShapeRightBracket
ShpName(31) = "LeftBrace": shp(31) = msoShapeLeftBrace
ShpName(32) = "RightBrace": shp(32) = msoShapeRightBrace
ShpName(33) = "RightArrow": shp(33) = msoShapeRightArrow
ShpName(34) = "LeftArrow": shp(34) = msoShapeLeftArrow
ShpName(35) = "UpArrow": shp(35) = msoShapeUpArrow
ShpName(36) = "DownArrow": shp(36) = msoShapeDownArrow
ShpName(37) = "LeftRightArrow": shp(37) = msoShapeLeftRightArrow
ShpName(38) = "UpDownArrow": shp(38) = msoShapeUpDownArrow
ShpName(39) = "QuadArrow": shp(39) = msoShapeQuadArrow
ShpName(40) = "LeftRightUpArrow": shp(40) = msoShapeLeftRightUpArrow
ShpName(41) = "BentArrow": shp(41) = msoShapeBentArrow
ShpName(42) = "UTurnArrow": shp(42) = msoShapeUTurnArrow
ShpName(43) = "LeftUpArrow": shp(43) = msoShapeLeftUpArrow
ShpName(44) = "BentUpArrow": shp(44) = msoShapeBentUpArrow
ShpName(45) = "CurvedRightArrow": shp(45) = msoShapeCurvedRightArrow
ShpName(46) = "CurvedLeftArrow": shp(46) = msoShapeCurvedLeftArrow
ShpName(47) = "CurvedUpArrow": shp(47) = msoShapeCurvedUpArrow
ShpName(48) = "CurvedDownArrow": shp(48) = msoShapeCurvedDownArrow
ShpName(49) = "StripedRightArrow": shp(49) = msoShapeStripedRightArrow
ShpName(50) = "NotchedRightArrow": shp(50) = msoShapeNotchedRightArrow
ShpName(51) = "Pentagon": shp(51) = msoShapePentagon
ShpName(52) = "Chevron": shp(52) = msoShapeChevron
ShpName(53) = "RightArrowCallout": shp(53) = msoShapeRightArrowCallout
ShpName(54) = "LeftArrowCallout": shp(54) = msoShapeLeftArrowCallout
ShpName(55) = "UpArrowCallout": shp(55) = msoShapeUpArrowCallout
ShpName(56) = "DownArrowCallout": shp(56) = msoShapeDownArrowCallout
ShpName(57) = "LeftRightArrowCallout": shp(57) = msoShapeLeftRightArrowCallout
ShpName(58) = "UpDownArrowCallout": shp(58) = msoShapeUpDownArrowCallout
ShpName(59) = "QuadArrowCallout": shp(59) = msoShapeQuadArrowCallout
ShpName(60) = "CircularArrow": shp(60) = msoShapeCircularArrow
ShpName(61) = "FlowchartProcess": shp(61) = msoShapeFlowchartProcess
ShpName(62) = "FlowchartAlternateProcess": shp(62) = msoShapeFlowchartAlternateProcess
ShpName(63) = "FlowchartDecision": shp(63) = msoShapeFlowchartDecision
ShpName(64) = "FlowchartData": shp(64) = msoShapeFlowchartData
ShpName(65) = "FlowchartPredefinedProcess": shp(65) = msoShapeFlowchartPredefinedProcess
ShpName(66) = "FlowchartInternalStorage": shp(66) = msoShapeFlowchartInternalStorage
ShpName(67) = "FlowchartDocument": shp(67) = msoShapeFlowchartDocument
ShpName(68) = "FlowchartMultidocument": shp(68) = msoShapeFlowchartMultidocument
ShpName(69) = "FlowchartTerminator": shp(69) = msoShapeFlowchartTerminator
ShpName(70) = "FlowchartPreparation": shp(70) = msoShapeFlowchartPreparation
ShpName(71) = "FlowchartManualInput": shp(71) = msoShapeFlowchartManualInput
ShpName(72) = "FlowchartManualOperation": shp(72) = msoShapeFlowchartManualOperation
ShpName(73) = "FlowchartConnector": shp(73) = msoShapeFlowchartConnector
ShpName(74) = "FlowchartOffpageConnector": shp(74) = msoShapeFlowchartOffpageConnector
ShpName(75) = "FlowchartCard": shp(75) = msoShapeFlowchartCard
ShpName(76) = "FlowchartPunchedTape": shp(76) = msoShapeFlowchartPunchedTape
ShpName(77) = "FlowchartSummingJunction": shp(77) = msoShapeFlowchartSummingJunction
ShpName(78) = "FlowchartOr": shp(78) = msoShapeFlowchartOr
ShpName(79) = "FlowchartCollate": shp(79) = msoShapeFlowchartCollate
ShpName(80) = "FlowchartSort": shp(80) = msoShapeFlowchartSort
ShpName(81) = "FlowchartExtract": shp(81) = msoShapeFlowchartExtract
ShpName(82) = "FlowchartMerge": shp(82) = msoShapeFlowchartMerge
ShpName(83) = "FlowchartStoredData": shp(83) = msoShapeFlowchartStoredData
ShpName(84) = "FlowchartDelay": shp(84) = msoShapeFlowchartDelay
ShpName(85) = "FlowchartSequentialAccessStorage": shp(85) = msoShapeFlowchartSequentialAccessStorage
ShpName(86) = "FlowchartMagneticDisk": shp(86) = msoShapeFlowchartMagneticDisk
ShpName(87) = "FlowchartDirectAccessStorage": shp(87) = msoShapeFlowchartDirectAccessStorage
ShpName(88) = "FlowchartDisplay": shp(88) = msoShapeFlowchartDisplay
ShpName(89) = "Explosion1": shp(89) = msoShapeExplosion1
ShpName(90) = "Explosion2": shp(90) = msoShapeExplosion2
ShpName(91) = "4pointStar": shp(91) = msoShape4pointStar
ShpName(92) = "5pointStar": shp(92) = msoShape5pointStar
ShpName(93) = "8pointStar": shp(93) = msoShape8pointStar
ShpName(94) = "16pointStar": shp(94) = msoShape16pointStar
ShpName(95) = "24pointStar": shp(95) = msoShape24pointStar
ShpName(96) = "32pointStar": shp(96) = msoShape32pointStar
ShpName(97) = "UpRibbon": shp(97) = msoShapeUpRibbon
ShpName(98) = "DownRibbon": shp(98) = msoShapeDownRibbon
ShpName(99) = "CurvedUpRibbon": shp(99) = msoShapeCurvedUpRibbon
ShpName(100) = "CurvedDownRibbon": shp(100) = msoShapeCurvedDownRibbon
ShpName(101) = "VerticalScroll": shp(101) = msoShapeVerticalScroll
ShpName(102) = "HorizontalScroll": shp(102) = msoShapeHorizontalScroll
ShpName(103) = "Wave": shp(103) = msoShapeWave
ShpName(104) = "DoubleWave": shp(104) = msoShapeDoubleWave
ShpName(105) = "RectangularCallout": shp(105) = msoShapeRectangularCallout
ShpName(106) = "RoundedRectangularCallout": shp(106) = msoShapeRoundedRectangularCallout
ShpName(107) = "OvalCallout": shp(107) = msoShapeOvalCallout
ShpName(108) = "CloudCallout": shp(108) = msoShapeCloudCallout
ShpName(109) = "LineCallout1": shp(109) = msoShapeLineCallout1
ShpName(110) = "LineCallout2": shp(110) = msoShapeLineCallout2
ShpName(111) = "LineCallout3": shp(111) = msoShapeLineCallout3
ShpName(112) = "LineCallout4": shp(112) = msoShapeLineCallout4
ShpName(113) = "LineCallout1AccentBar": shp(113) = msoShapeLineCallout1AccentBar
ShpName(114) = "LineCallout2AccentBar": shp(114) = msoShapeLineCallout2AccentBar
ShpName(115) = "LineCallout3AccentBar": shp(115) = msoShapeLineCallout3AccentBar
ShpName(116) = "LineCallout4AccentBar": shp(116) = msoShapeLineCallout4AccentBar
ShpName(117) = "LineCallout1NoBorder": shp(117) = msoShapeLineCallout1NoBorder
ShpName(118) = "LineCallout2NoBorder": shp(118) = msoShapeLineCallout2NoBorder
ShpName(119) = "LineCallout3NoBorder": shp(119) = msoShapeLineCallout3NoBorder
ShpName(120) = "LineCallout4NoBorder": shp(120) = msoShapeLineCallout4NoBorder
ShpName(121) = "LineCallout1BorderandAccentBar": shp(121) = msoShapeLineCallout1BorderandAccentBar
ShpName(122) = "LineCallout2BorderandAccentBar": shp(122) = msoShapeLineCallout2BorderandAccentBar
ShpName(123) = "LineCallout3BorderandAccentBar": shp(123) = msoShapeLineCallout3BorderandAccentBar
ShpName(124) = "LineCallout4BorderandAccentBar": shp(124) = msoShapeLineCallout4BorderandAccentBar
ShpName(125) = "ActionButtonCustom": shp(125) = msoShapeActionButtonCustom
ShpName(126) = "ActionButtonHome": shp(126) = msoShapeActionButtonHome
ShpName(127) = "ActionButtonHelp": shp(127) = msoShapeActionButtonHelp
ShpName(128) = "ActionButtonInformation": shp(128) = msoShapeActionButtonInformation
ShpName(129) = "ActionButtonBackorPrevious": shp(129) = msoShapeActionButtonBackorPrevious
ShpName(130) = "ActionButtonForwardorNext": shp(130) = msoShapeActionButtonForwardorNext
ShpName(131) = "ActionButtonBeginning": shp(131) = msoShapeActionButtonBeginning
ShpName(132) = "ActionButtonEnd": shp(132) = msoShapeActionButtonEnd
ShpName(133) = "ActionButtonReturn": shp(133) = msoShapeActionButtonReturn
ShpName(134) = "ActionButtonDocument": shp(134) = msoShapeActionButtonDocument
ShpName(135) = "ActionButtonSound": shp(135) = msoShapeActionButtonSound
ShpName(136) = "ActionButtonMovie": shp(136) = msoShapeActionButtonMovie
ShpName(137) = "Balloon": shp(137) = msoShapeBalloon
ShpName(138) = "NotPrimitive": shp(138) = msoShapeNotPrimitive 'not supported
ShpName(139) = "FlowchartOfflineStorage": shp(139) = msoShapeFlowchartOfflineStorage
ShpName(140) = "LeftRightRibbon": shp(140) = msoShapeLeftRightRibbon
ShpName(141) = "DiagonalStripe": shp(141) = msoShapeDiagonalStripe
ShpName(142) = "Pie": shp(142) = msoShapePie
ShpName(143) = "NonIsoscelesTrapezoid": shp(143) = msoShapeNonIsoscelesTrapezoid
ShpName(144) = "Decagon": shp(144) = msoShapeDecagon
ShpName(145) = "Heptagon": shp(145) = msoShapeHeptagon
ShpName(146) = "Dodecagon": shp(146) = msoShapeDodecagon
ShpName(147) = "6pointStar": shp(147) = msoShape6pointStar
ShpName(148) = "7pointStar": shp(148) = msoShape7pointStar
ShpName(149) = "10pointStar": shp(149) = msoShape10pointStar
ShpName(150) = "12pointStar": shp(150) = msoShape12pointStar
ShpName(151) = "Round1Rectangle": shp(151) = msoShapeRound1Rectangle
ShpName(152) = "Round2SameRectangle": shp(152) = msoShapeRound2SameRectangle
ShpName(153) = "SnipRoundRectangle": shp(153) = msoShapeSnipRoundRectangle
ShpName(154) = "Snip1Rectangle": shp(154) = msoShapeSnip1Rectangle
ShpName(155) = "Snip2SameRectangle": shp(155) = msoShapeSnip2SameRectangle
ShpName(156) = "Round2DiagRectangle": shp(156) = msoShapeRound2DiagRectangle
ShpName(157) = "Snip2DiagRectangle": shp(157) = msoShapeSnip2DiagRectangle
ShpName(158) = "Frame": shp(158) = msoShapeFrame
ShpName(159) = "HalfFrame": shp(159) = msoShapeHalfFrame
ShpName(160) = "Tear": shp(160) = msoShapeTear
ShpName(161) = "Chord": shp(161) = msoShapeChord
ShpName(162) = "Corner": shp(162) = msoShapeCorner
ShpName(163) = "MathPlus": shp(163) = msoShapeMathPlus
ShpName(164) = "MathMinus": shp(164) = msoShapeMathMinus
ShpName(165) = "MathMultiply": shp(165) = msoShapeMathMultiply
ShpName(166) = "MathDivide": shp(166) = msoShapeMathDivide
ShpName(167) = "MathEqual": shp(167) = msoShapeMathEqual
ShpName(168) = "MathNotEqual": shp(168) = msoShapeMathNotEqual
ShpName(169) = "CornerTabs": shp(169) = msoShapeCornerTabs
ShpName(170) = "SquareTabs": shp(170) = msoShapeSquareTabs
ShpName(171) = "PlaqueTabs": shp(171) = msoShapePlaqueTabs
ShpName(172) = "Gear6": shp(172) = msoShapeGear6
ShpName(173) = "Gear9": shp(173) = msoShapeGear9
ShpName(174) = "Funnel": shp(174) = msoShapeFunnel
ShpName(175) = "PieWedge": shp(175) = msoShapePieWedge
ShpName(176) = "LeftCircularArrow": shp(176) = msoShapeLeftCircularArrow
ShpName(177) = "LeftRightCircularArrow": shp(177) = msoShapeLeftRightCircularArrow
ShpName(178) = "SwooshArrow": shp(178) = msoShapeSwooshArrow
ShpName(179) = "Cloud": shp(179) = msoShapeCloud
ShpName(180) = "ChartX": shp(180) = msoShapeChartX
ShpName(181) = "ChartStar": shp(181) = msoShapeChartStar
ShpName(182) = "ChartPlus": shp(182) = msoShapeChartPlus
ShpName(183) = "LineInverse": shp(183) = msoShapeLineInverse
End Sub
다음 부분은 기존 모든 슬라이드를 삭제하고 1슬라이드에는 작은 도형 목록을 모두 출력하고
나머지 슬라이드에는 좀 더 큰 크기로 45개씩 출력해주는 부분과
도형 이름을 보여주는 부분이 들어 있습니다.
- r 과 c 값을 바꿔주면 가로 * 세로 배치가 자동으로 달라지게 됩니다.
- 첫번째 r, c 값은 1슬라이드용이고 두번째 r, c 값은 2페이지 이후용입니다.
- m1은 슬라이드 테두리 여백크기이고 m2는 각 도형간의 여백입니다. (1슬라이드용과 2슬라이드 이후용 2가지)
- 슬라이드 크기만한 배경 도형에 MouseOver액션이 지정되어 있고 각 도형에 MouseOver 액션이 지정되어 있습니다. 그래서 도형위에 마우스를 가져가면 도형이름이 나오고 마우스가 도형 바깥으로 나가면 기본 메시지가 뜹니다.
- PrintShape 를 여러번 실행할 수 있습니다.
- 도형 색상은 랜덤으로 채워집니다.
Sub PrintShape()
On Error Resume Next
Dim i As Integer
Dim myShp As Shape
Dim sld As Slide
Dim count As Integer
Dim myLayout As CustomLayout
Dim x!, y!, w!, h!, m1!, m2!, SW!, SH!, r%, c%
'Selete slides and shapes
EraseSlidesExcept1st
EraseAllShapes 1
'Initialize Color Variables
InitShapes
Randomize
' All the colors in one page
With ActivePresentation.PageSetup
SW = .SlideWidth: SH = .SlideHeight
End With
Set sld = ActivePresentation.Slides(1)
'Trasparent Background Box
Set myShp = sld.Shapes.AddTextbox(msoTextOrientationHorizontal, 0, 0, SW, SH)
myShp.ActionSettings(ppMouseOver).Action = ppActionRunMacro
myShp.ActionSettings(ppMouseOver).Run = "ShowMessage"
myShp.Name = "Background"
'행 * 열
r = 11: c = 17
For i = 1 To UBound(shp)
m1 = 20: m2 = 8
w = (SW - m1 * 2) / c
h = (SH - m1 * 2) / r
x = m1 + ((i - 1) Mod c) * w + m2 / 2
y = m1 + (((i - 1) Mod r * c) \ c) * h + m2 / 2
Set myShp = Nothing
Set myShp = sld.Shapes.AddShape(shp(i), x, y, w - m2, h - m2)
If Not myShp Is Nothing Then
myShp.Fill.ForeColor.RGB = RGB(Rnd * 200, Rnd * 200, Rnd * 200)
myShp.Line.ForeColor.RGB = rgbWhite
myShp.Name = "shape" & i
'If i Mod 15 = 1 Then
myShp.TextFrame.TextRange = i
myShp.TextFrame.TextRange.Font.Size = 10
myShp.TextFrame.WordWrap = msoFalse
'End If
myShp.ActionSettings(ppMouseOver).Action = ppActionRunMacro
myShp.ActionSettings(ppMouseOver).Run = "ShowShapeName"
myShp.ActionSettings(ppMouseClick).Action = ppActionRunMacro
myShp.ActionSettings(ppMouseClick).Run = "CopyShapeText"
End If
Next i
' message
Set myShp = sld.Shapes.AddTextbox(msoTextOrientationHorizontal, x + w, y, SW - x - w, h)
myShp.TextFrame.AutoSize = ppAutoSizeNone
myShp.TextFrame.VerticalAnchor = msoAnchorMiddle
myShp.TextFrame.HorizontalAnchor = msoAnchorCenter
myShp.TextFrame.TextRange.Text = "Mouse over to check the shape's name"
myShp.TextFrame2.TextRange.Font.Spacing = -1
myShp.Name = "ShowMessage"
count = 1
'3열 5행
r = 5: c = 9
For i = 1 To UBound(shp)
If (i - 1) Mod r * c = 0 Then
Set myLayout = ActivePresentation.Slides(count).CustomLayout
count = count + 1
Set sld = ActivePresentation.Slides.AddSlide(count, myLayout)
End If
m1 = 40: m2 = 30
w = (SW - m1 * 2) / c
h = (SH - m1 * 2) / r
x = m1 + ((i - 1) Mod c) * w + m2 / 2
y = m1 + (((i - 1) Mod r * c) \ c) * h + m2 / 2
Set myShp = sld.Shapes.AddShape(shp(i), x, y, w - m2, h - m2)
myShp.Fill.ForeColor.RGB = RGB(Rnd * 200, Rnd * 200, Rnd * 200)
myShp.TextFrame.TextRange.Text = ShpName(i) & " (" & shp(i) & ")"
myShp.TextFrame.WordWrap = msoTrue
myShp.TextFrame.TextRange.Font.Size = 13
myShp.TextFrame.TextRange.Font.Shadow = msoTrue
myShp.TextFrame2.TextRange.Font.Spacing = -1
myShp.Line.ForeColor.RGB = rgbWhite
myShp.Name = "shape" & i
myShp.ActionSettings(ppMouseClick).Action = ppActionRunMacro
myShp.ActionSettings(ppMouseClick).Run = "CopyShapeText"
Next i
End Sub
Sub ShowMessage(myShp As Shape)
Dim sld As Slide
Set sld = myShp.Parent
sld.Shapes("ShowMessage").TextFrame.TextRange = "Mouse over to check the shape's name"
End Sub
Sub ShowShapeName(myShp As Shape)
Dim i As Integer
If shp(1) = 0 Then InitShapes
i = Mid(myShp.Name, 6) '"shape135"
ActivePresentation.Slides(1).Shapes("ShowMessage").TextFrame.TextRange.Text = _
ShpName(i) & " (" & shp(i) & ")"
End Sub
마지막 부분은 도형이름을 클립보드에 복사하는 부분(도구 > 참조에서 MsForm 2.0 라이브러리를 추가 필요)과
슬라이드나 도형을 삭제하는 부분입니다.
Sub CopyShapeText(myShp As Shape)
'to use this, add the reference to 'MSForm 2.0 Library' by clicking [Tools-Reference] in VBE
Dim DataObj As New MSForms.DataObject
Dim i As Integer
If shp(1) = 0 Then InitShapes
i = Mid(myShp.Name, 6) '"shape135"
'Copy the shape name into Clipboard
DataObj.SetText ShpName(i)
DataObj.PutInClipboard
Set DataObj = Nothing
MsgBox ShpName(i) & " is copied into Clipboard"
End Sub
Sub EraseSlidesExcept1st()
Dim i As Integer
For i = ActivePresentation.Slides.count To 2 Step -1
ActivePresentation.Slides(i).Delete
Next i
End Sub
Sub EraseAllShapes(SlideNo As Integer)
Dim i As Integer
For i = ActivePresentation.Slides(SlideNo).Shapes.count To 1 Step -1
ActivePresentation.Slides(SlideNo).Shapes(i).Delete
Next i
End Sub
☑️16:9화면에 도형목록을 보여주는 파일(신버전):
☑️기존 4:3화면에 도형목록 보여주는 파일(구버전):
☑️오피스에서 지원하는 AutoShapeType 목록
주의) 2024 이하 영구버전과 달리 365버전에서는
다운로드 받은 매크로파일은 파일속성에서 '차단해제' > 확인을 누른 후에 열어야 매크로를 실행할 수 있습니다.
'PPT+VBA' 카테고리의 다른 글
텍스트를 여러 장의 자막 슬라이드로 일괄 생성 (0) | 2025.02.05 |
---|---|
목차슬라이드 페이지 정보 자동 업데이트 (0) | 2025.01.28 |
파워포인트 표의 기존 서식을 유지하면서 엑셀 표 붙여넣기 (0) | 2025.01.11 |
VBA없이 실시간 업데이트 되는 시계 삽입 (0) | 2024.12.25 |
새해 맞이 남은 시간 카운터(타이머)(+남은 시간 계산시 주의할 점) (0) | 2024.12.14 |
[BombGame]클릭했을 때 회전하면서 사라지는 퀴즈게임 자동으로 생성하기 (0) | 2024.11.25 |
빙고판 생성 (및 애니메이션 추가) (1) | 2024.11.20 |
파일 열 때 마지막 편집 슬라이드 위치로 이동하기 (1) | 2024.11.02 |
최근댓글