XL 格式的 PPT 中的上标

发布于 2024-12-21 00:00:53 字数 141 浏览 2 评论 0原文

我正在尝试用 XL 创建一些幻灯片,但受到脚注的挑战。 我想要的是用多个脚注填充脚注部分,而每行都以上标数字开头。谁能告诉我如何才能做到这一点?

我尝试了一些在网上找到的解决方案,但我无法只上标一个字符。

感谢您的

帮助

I am trying to create some slides out of XL, but am being challenged by the footnotes.
What I want to is fill the footnotes section with multiple footnotes, whereas each row starts with a superscripted number. Can anyone tell me how I can get that done?

I have tried some solutions I found online, but I am not able to just superscript one character.

Thanks for your help

s

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苏别ゝ 2024-12-28 00:00:53

像这样的事情应该可以帮助你开始;该代码是为了在 PPT 中运行而编写的,并且需要一些 mods 才能在 Excel 中运行它:

Dim oSl As Slide
Dim oSh As Shape
Dim oPres As Presentation
Dim x As Long

' for example purposes, we'll do this IN PPT
' and use the current presentation
Set oPres = ActivePresentation

' and we'll work with slide 1
Set oSl = oPres.Slides(1)

' rather than using PPT's own footnotes, I'd simply
' add my own text box ...
Set oSh = oSl.Shapes.AddTextbox(msoTextOrientationHorizontal, 10, 500, 500, 50)

' and work with it ...
With oSh
    ' add your text:
    .TextFrame.TextRange = "1One line of text" & vbCrLf _
        & "2Two lines of text, the second a bit longer" & vbCrLf _
        & "3New we are three lines of text"

    ' subscript the first character of each line up to 9
    On Error Resume Next    ' in case there are fewer lines
    For x = 1 To 9
        .TextFrame.TextRange.Paragraphs(x).Characters(1, 1).Font.Superscript = True
    Next
    ' and the first two characters of each line past that
    For x = 10 To .TextFrame.TextRange.Paragraphs.Count
        .TextFrame.TextRange.Paragraphs(x).Characters(1, 2).Font.Superscript = True
    Next
End With

Something like this should get you started; the code's written to run w/in PPT and will need some mods for you to run it from w/in Excel:

Dim oSl As Slide
Dim oSh As Shape
Dim oPres As Presentation
Dim x As Long

' for example purposes, we'll do this IN PPT
' and use the current presentation
Set oPres = ActivePresentation

' and we'll work with slide 1
Set oSl = oPres.Slides(1)

' rather than using PPT's own footnotes, I'd simply
' add my own text box ...
Set oSh = oSl.Shapes.AddTextbox(msoTextOrientationHorizontal, 10, 500, 500, 50)

' and work with it ...
With oSh
    ' add your text:
    .TextFrame.TextRange = "1One line of text" & vbCrLf _
        & "2Two lines of text, the second a bit longer" & vbCrLf _
        & "3New we are three lines of text"

    ' subscript the first character of each line up to 9
    On Error Resume Next    ' in case there are fewer lines
    For x = 1 To 9
        .TextFrame.TextRange.Paragraphs(x).Characters(1, 1).Font.Superscript = True
    Next
    ' and the first two characters of each line past that
    For x = 10 To .TextFrame.TextRange.Paragraphs.Count
        .TextFrame.TextRange.Paragraphs(x).Characters(1, 2).Font.Superscript = True
    Next
End With
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文