如何为 PowerPoint 2003 创建插件

发布于 2024-08-27 16:59:27 字数 52 浏览 5 评论 0原文

我想为 PowerPoint 2003 创建一个插件,向工具栏添加一个按钮。 我该怎么做?

I want to create an addin for PowerPoint 2003 that adds a button to the toolbar.
How can I do this?

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

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

发布评论

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

评论(2

野心澎湃 2024-09-03 16:59:27

创建一个新模块并添加以下自动打开功能。
您需要将文件保存为 addins 文件夹中的 ppa。

Sub Auto_open()

    Dim oToolbar As CommandBar
    Dim oButton As CommandBarButton

    'Create the toolbar
    Set oToolbar = CommandBars.Add(name:="CommandbarName", Position:=msoBarTop)

    'Add the first button
    Set oButton = oToolbar.Controls.Add(Type:=msoControlButton)

    With oButton
        .Caption = "New button"
        .OnAction = "FunctionTocall"
        .Style = msoButtonIconAndWrapCaption
        .FaceId = 11 'icon
    End With

End Sub

Create a new module and add the below autoopen function.
You would need to save the file as ppa in the addins folder.

Sub Auto_open()

    Dim oToolbar As CommandBar
    Dim oButton As CommandBarButton

    'Create the toolbar
    Set oToolbar = CommandBars.Add(name:="CommandbarName", Position:=msoBarTop)

    'Add the first button
    Set oButton = oToolbar.Controls.Add(Type:=msoControlButton)

    With oButton
        .Caption = "New button"
        .OnAction = "FunctionTocall"
        .Style = msoButtonIconAndWrapCaption
        .FaceId = 11 'icon
    End With

End Sub
漫雪独思 2024-09-03 16:59:27

如果您的目标是 PowerPoint 2007,请查看 Robert Green,创建应用程序级加载项以自动执行常见 Office 任务

http://msdn.microsoft.com/en-us/library/dd935909.aspx

IF your target is PowerPoint 2007, check Robert Green,Create an Application-Level Add-In to Automate Common Office Tasks

http://msdn.microsoft.com/en-us/library/dd935909.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文