2010-04-06 53 views

回答

2

創建一個新模塊並添加下面的自動打開功能。 您需要將文件另存爲ppa在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

如果你的目標是PowerPoint 2007中,檢查羅伯特·格林,創建一個應用程序級外接自動執行常見辦公任務

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

+0

這不可能是PowerPoint 2007中,因爲他是指的是一個工具欄,而不是功能區或快速訪問欄。 – thenonhacker 2011-12-03 06:30:35