ppt启动时自动执行那个事件?比如WORD是autoexec
我想在PPT的工具栏中插入一个按钮,当点击按钮的时候用MSGBOX把选中的文本显示出来?如果做成模板,应该把模板放到那个目录中,当PPT启动时能自动装载其中的内容啊? 版主帮忙啊,太感谢了. Sub Macro1()'
' 宏由 cnTest 记录,日期: 2004-2-13
'Dim cmBar As CommandBar
Dim conTrol As CommandBarControl
CommandBars("msg").Delete
Set cmBar = CommandBars.Add("msg", msoBarTop)
cmBar.Visible = True
Set conTrol = cmBar.Controls.Add(msoControlButton, 1, , , True)
conTrol.Caption = "显示选定内容"
conTrol.TooltipText = "show "
conTrol.Visible = True
conTrol.OnAction = "msgStr"
conTrol.Width = 200End Sub
Sub msgStr()
MsgBox (ActiveWindow.Selection.TextRange.Text)
End Sub 1.ActiveWindow.Selection.TextRange.Text运行时不能通过.2.我写了一个向PPT工具栏中增加按钮的宏,我想在PPT启动时自动执行,这样就可以自动增加按钮了.应该把这段宏加到那个过程中啊?
页:
[1]