Ms office PowerPoint中的十六进制幻灯片编号

Ms office PowerPoint中的十六进制幻灯片编号,ms-office,powerpoint,slide,presentation,Ms Office,Powerpoint,Slide,Presentation,我的power point幻灯片可以用十六进制编号吗? 我知道这听起来很疯狂,但我想给它一种子文件的书呆子的感觉。你不能让PPT自动为你做这件事,但你可以运行一个小代码,在每张幻灯片中添加一个文本框,在文本框中输入幻灯片的编号,转换成十六进制 大概是这样的: Dim oSl as Slide Dim oSh as Shape For each oSl in ActivePresentation.Slide Call DeleteHexNumber(oSl) ' change coord

我的power point幻灯片可以用十六进制编号吗?
我知道这听起来很疯狂,但我想给它一种子文件的书呆子的感觉。

你不能让PPT自动为你做这件事,但你可以运行一个小代码,在每张幻灯片中添加一个文本框,在文本框中输入幻灯片的编号,转换成十六进制

大概是这样的:

Dim oSl as Slide
Dim oSh as Shape

For each oSl in ActivePresentation.Slide
  Call DeleteHexNumber(oSl)
  ' change coordinates to suit:
  Set oSh = oSl.Shapes.AddTextbox(msoTextOrientationHorizontal,10,10,200,50)
  Osh.Tags.Add "HexNumber", "Whatever"
  With oSh.TextFrame.TextRange
    .Text = Cstr(Hex(oSl.SlideNumber))
  End With
Next

Sub DeleteHexNumber(oSl as Slide)
  Dim oSh as Shape
  Dim x as Long 
  For x = oSl.Shapes.Count to 1 Step -1
    if Len(oSl.Shapes(x).Tags("HexNumber")) > 0 Then
        oSl.Shapes(x).Delete
    End If
  Next
End Sub
经编辑:
现在,它在创建页码形状时对其进行标记,但在创建之前,它会查找任何现有的页码形状(通过检查匹配的标记),并首先删除它们。

如果再次运行脚本,将创建另一组文本框。是否有方法查找和删除所有现有文本框或更新现有文本框?