VBA基础

相对路径(EXCEL)  Application.ThisWorkbook.path
相对路径(PPT) Application.ActivePresentation.Path

PPT用potplayer打开当前文本目录下的音乐

Sub run()
curdic = Application.ActivePresentation.Path
a = curdic & "\potplayer\potplayermini.exe"
b = curdic & "\a.mp3"
Shell a & " " & b, 1
End Sub

PS:用添加动作可以方便的调用宏

 

 

 

posted @ 2013-10-13 00:11  cnsealine  阅读(473)  评论(0编辑  收藏  举报