Issue in creating macro creates run time error 424
Basically I am trying to build a macro which will enter into the same folder same as active powerpoint file, see all the files in the folder, and add a series of buttons which are hyperlinks to all the files that meet the experienced the event????.ppt. I've used basic logic here.
My problem is when I am running the program how will I load an array with all of the paths. Experts said that System.IO.directory.getfiles (string, string, search Criteria) method, but a run time error 424 pop up.
I am using PowerPoint 2010 but says that it is Visual Basic 7.0
Here are my codes, not all of it just the relevant parts
myPath = ActivePresentation.Path
FileNames = Directory.GetFiles(myPath, "????.ppt")
I’ve made some research and got in the MSDN library:
Public Shared Function GetFiles(path as string, searchPattern as string, searchOption as SearchOption) as string()
But, it didn't work either. The compiler doesn't like the line of code. (I tried putting it in the module and in a class). I'll admit that I am good with code. I am a little expert, mostly of logic, but at present I am stuck with language right now.
So, please help me. Help will be appreciated cordially.
Thanks for any reply.