Windows Macro Program

Are there any good Macro recording programs for Windows XP out there?

Here is what I want to do:  

I would highlight (or click on) a filename is Windows Explorer . .
Then I would start the Macro . .
The Macro would Copy the filename, then switch to Excel,
then Paste the filename to the currently selected cell.

Is this possible?  I hope so because I need to do this for 10,000 filenames!!


LVL 16
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Technically, yes, but you'd have to run that macro 10,000 times.  Each time you run the macro, you'll have to specify which filename you want copied and which cell you want it in.


This is the one I use:  Macro Express

Do you just want to copy all of the filenames in a directory to excel?
Would copying all the file names at once in a folder and pasting them into a column in excel do what you want?  If so, you could use something like this: 

MikeMCSDAuthor Commented:
thanks for the replies . . .

what I have to do is match a product ID to its thumb image and its larger image -
those are the 2 filenames I need to copy over, so I have to know which image
is for what product.
Just having a macro that could copy and paste the filename into the cell would help . .
and yes you were right . . "but you'd have to run that macro 10,000 times".

If I were to first select the cell in Excel, then click on the image filename in Explorer
and run the macro, would it find the selected cell in Excel?
Could I get the focus to go into that top text box in Excel . . the one where you can edit
the currently selected cell?  

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

Here's what the macro could do for you.
Let's pretend you have excel open as well as the folder with the files and the macro is already created.

1. You click on the cell in Excel where you want the filename.
2. You switch back to the folder.
3. You select the file and then activate the macro.

Here's what the macro does:

A. It hits F2 (hotkey for Rename)
B. It hits CTRL-C (hotkey for Copy)
C. It hits Alt-Tab to switch to Excel (hotkey to switch between open programs)
D. It hits CTRL-V (hotkey for Paste).  Since the cell is already selected it will paste in the correct cell.

10,000 times, that's one hell of a task.

How do you know which cell to put it in?  There might be a way to make your task easier.  If you're willing to send me a small portion of that excel file in an attachment thru email I might be able to help you more.  My email address is in my profile.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MikeMCSDAuthor Commented:
thanks tosh . .  Those steps for the macro were exactly what I had in mind.

The reason I need to do this is that I have this web site:
that I am rebuilding using ASP.NET and SQL Server. The store has 5000 products.
I have to add all the products to the database's Products table.
The person that is going to be doing this is going to be using Excel.  I will then
take that Excel file and convert it into an SQL Server table.

Can the Macro Express program handle this?
I'll send you the file to take a look at.
Okay I got the file,
What goes in tbPath, the filename?
What goes in ImagePath, the location of the file?
MikeMCSDAuthor Commented:

Thank you tosh9iii!!!
I'm going to post the solution here just in case anyone else runs into the same problem.
Good luck and let me know if I can help you more.

I believe that'll work for "most" of them, but not all, here's one
possibility that "might" work:

Let's pretend you have excel open as well as the folder with the files
(the folder will have to be in Search mode(Ctrl-F)) and the macro is
already created.

1.  You're in Excel, and you click on the product number.
2.  You activate the macro.

Here's what the macro does:

A.  It hits CTRL-C (hotkey for Copy)
B.  It hits Alt-Tab to switch to the folder (hotkey to switch between
open programs)
C. It hits Tab 3 times to get to the Search box.
D. It hits CTRL-V (hotkey for Paste).  Since the text is highlighted,
pasting the text will overwrite whatever was there before.
E. It hits Enter and then the computer searches for the file.
F. For the macro, there will need to be a time delay, perhaps 5-10
seconds to give the computer time to search thru 10,000 files
G. Hopefully, each time it does this, there will only be one result.
So after it finishes searching, the macro will hit Shift-Tab to select
the file.
H. It hits F2 (hotkey for Rename)
I. It hits CTRL-C (hotkey for Copy)
J. It hits Alt-Tab to switch to Excel (hotkey to switch between open programs)
K. It hits the left arrow 4 times to reach tbPath.
L. It hits CTRL-V (hotkey for Paste).
M. It hits left arrow once.
N. It hits CTRL-V (hotkey for Paste).
O. It hits down arrow once
P. It hits left arrow 5 times, to reach the next product number
Q. Then it repeats all of the steps and does it over and over again,
until something goes wrong or there are no files that come up in the

Like it said, I think that it'll work for "most" of them, but not all.
There are other with prod no. like: 1052E-V-S    and filenames like:

Since the prod no has the dash between E-V, it wouldn't be able to
find the filename.

That's why some of these are going to have to be done manually and why
someone is going to have to watch over it, making sure nothing goes
wrong.  When it comes to these macros, something is bound to go wrong.
But I like them anyways.

I hope this was helpful.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Operating Systems

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.