2010-04-06 9 views

Répondre

2

Créez un nouveau module et ajoutez la fonction autoopen ci-dessous. Vous devez enregistrer le fichier en tant que ppa dans le dossier addins.

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 
0

Si votre cible est PowerPoint 2007, consultez Robert Green, créer un complément d'application Add-in Automatiser Bureau commun Tâches

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

+0

Il est ne peut pas être PowerPoint 2007, parce qu'il est faire référence à une barre d'outils au lieu du ruban ou de la barre d'accès rapide. – thenonhacker

Questions connexes