0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

パワポ通し番号

Posted at
Dim numberCounter As Integer

Sub InsertNumber()
    ' 番号の開始値を初期化(必要に応じて)
    If numberCounter = 0 Then
        numberCounter = 1
    End If
    
    Dim slide As slide
    Set slide = ActivePresentation.Slides(ActiveWindow.View.Slide.SlideIndex)
    
    Dim shp As Shape
    Set shp = slide.Shapes.AddTextbox( _
        Orientation:=msoTextOrientationHorizontal, _
        Left:=100, Top:=100 + (numberCounter - 1) * 30, _
        Width:=100, Height:=30)
        
    shp.TextFrame.TextRange.Text = "(" & ChrW(9311 + numberCounter) & ")" ' ①: U+2460 = 9312
    shp.TextFrame.TextRange.Font.Size = 24
    
    numberCounter = numberCounter + 1
End Sub

Sub ResetNumberCounter()
    numberCounter = 1
End Sub
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?