Microsoft PowerPoint 2010 and Visual Basic 7.0: writing macros

Asked By 20 points N/A Posted on -

Using  Microsoft PowerPoint 2010, and Visual Basic 7.0, I've been trying to write a macro that will go into the same directory as the active ppt file. It should observe all the documents in the specified folder and generate a series of buttons that will create a hyperlink to each document that assembles the criteria ????.ppt.

I've found the basic logic in implementing this, but when I try to run it, the problem lies in loading an array. My researches have directed me to implement the, string, searchCriteria) method, but I am always getting a runtime error 424: object needed. 

Here are parts of my code that are related to the problem:

myPath = ActivePresentation.Path

FileNames = Directory.GetFiles(myPath, "????.ppt")


After some additional research, I got the following in the MSDN library:


Public Shared Function GetFiles(path as string, searchPattern as string, searchOption as SearchOption) as string()

However, it is not working. Also, the compiler does not like the line of code, even though I've tried putting it in the module and in a class. 

I'll confess that I am a full layman when it comes to understanding the code. My knowledge is little and only on the basic level, but I'm totally obsessed with the language right now. Please help me to solve this. Thanks a lot!


Best Answer by Iamexpert
Best Answer
Best Answer
Answered By 0 points N/A #100795

Microsoft PowerPoint 2010 and Visual Basic 7.0: writing macros



You need to create the code with the visual basic and micsrosoft power point for maco and the code you are showing that is somehow correct code. I yet have not created such macro code but the code you have shown here is looking correct and it will create the function you want. Hope this solution will help you getting out of the rid. I have great grip on microsoft power point and the problem can be solve by microsoft power point but the code you want to write, I yet have not created code about this but    

i know this code is correct and algorithm you are using is correct and you are working in the right path. This is the point I can guide and tell you are going in the right point.

Answered By 20 points N/A #100798

Microsoft PowerPoint 2010 and Visual Basic 7.0: writing macros


Hi expert, Thank you for the information and sharing your knowledge.

Login/Register to Answer

Related Questions