folders

How can I trace a folder location in a computer automatically. ie. Templates folder in office, it could be in c:\.......\templates or may be d:\........\templates. I need a code that searches for it because I want to install templates directly to it.
thank you
sml41Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
cognitionConnect With a Mentor Commented:
If it is the office templates folder you are looking for, you can retrieve the value from the registry.
Look in :
HKEY_CURRENT_USER\Software\Micorosft\Office\8.0\Common\FileNew\LocalTemplates

Or check for other versions of office.
0
 
sml41Author Commented:
I have not worked with the registry before, please can u send me a sample code for that.

thank you
0
 
cognitionCommented:
Search the microsoft site for VBREG.bas. That module contains more than enough registry funtions to get you started.
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
sml41Author Commented:
Thanks, I have got the regvb, but it is complicated, i appreciate if you can start me up with sample code for this particular problem.
0
 
cognitionCommented:
The fololowing is an article that explains how to use the functions, there is lots of smaples supplied.

"Reading and Modifying the Windows Registry Through Visual Basic"
0
 
sml41Author Commented:
thanks
0
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.

All Courses

From novice to tech pro — start learning today.