manjeet
manjeet

Reputation: 11

How to create an addin for PowerPoint 2003

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

Upvotes: 1

Views: 1214

Answers (2)

mas_oz2k1
mas_oz2k1

Reputation: 2901

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

Upvotes: 0

user240282
user240282

Reputation: 127

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

Upvotes: 2

Related Questions