2010-04-06 66 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