Is there a way to open PowerPoint .ppt using a macro.
Additionally, I also need to beable to open videos that end in .wmv and/or .mov and/or .avi
Is there a way to open PowerPoint .ppt using a macro.
Additionally, I also need to beable to open videos that end in .wmv and/or .mov and/or .avi
Last edited by Launchnet; 03-09-2009 at 09:46 PM.
Thanks for helping . . .
Matt @ Launchnet
Hello Matt,
Here is a macro that will run a program based on its file extension. Place this code in a standard VBA module. Change the file name and file path to match the program you want to open and run.
![]()
Private Declare Function ShellExecute _ Lib "Shell32.dll" _ Alias "ShellExecuteA" _ (ByVal hWnd As Long, _ ByVal lpOperation As String, _ ByVal lpFile As String, _ ByVal lpParameters As String, _ ByVal lpDirectory As String, _ ByVal nShowCmd As Long) As Long Sub RunProgram() Dim FilePath As String Dim RetVal As Long Filename = "Test File.mpg" FilePath = "C:\Documents and Settings\Owner\My Documents\" RetVal = ShellExecute(0&, "open", Filename, "", FilePath, 1&) End Sub
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks