如何在powerpoint中使用Dialogs(wdDialogInsertSymbol)确定字符代码(ascii或hex)

问题描述 投票:1回答:1

选择的参考文献: - 应用程序的visual basic - Microsoft powerpoint 14.0对象库 - 自动化 - Microsoft Office 14.0对象库

如何使用Dialogs(wdDialogInsertSymbol)确定角色的代码以及应该选择哪些其他参考?

谢谢。

Sub fdjlas()Dim osh As Shape Dim oSl As Slide

For Each oSl In ActivePresentation.Slides
    For Each osh In oSl.Shapes
        If osh.HasTextFrame Then
            With osh.TextFrame.TextRange
                For i = 1 To .Characters.Count
                    With .Characters(i).Font
                        MsgBox ("Char number: " & Dialogs(wdDialogInsertSymbol).CharNum)
                    End With
                Next
            End With
        End If
    Next
Next

MsgBox ("done")

结束子

OUTPUT: 编译错误: 找不到方法或数据成员 MsgBox(“字符号:”和对话框(wdDialogInsertSymbol).CharNum)

*对话框突出显示

vba powerpoint
1个回答
-1
投票

那样的话呢?

Dim oSl As Slide
Dim oSh As Shape
Dim i As Long

For Each oSl In ActivePresentation.Slides
    For Each oSh In oSl.Shapes
        If oSh.HasTextFrame Then
            With oSh.TextFrame.TextRange
                For i = 1 To .Characters.Count
                    'With .Characters(i).Font
                    '    MsgBox ("Char number: " & Dialogs(wdDialogInsertSymbol).CharNum)
                    'End With
                    MsgBox .Characters(i) & ": " & Asc(.Characters(i))
                Next
            End With
        End If
    Next
Next
© www.soinside.com 2019 - 2024. All rights reserved.