Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

folders

Posted on 1998-12-30
6
Medium Priority
?
149 Views
Last Modified: 2010-05-03
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
0
Comment
Question by:sml41
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 3

Accepted Solution

by:
cognition earned 60 total points
ID: 1453160
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
 

Author Comment

by:sml41
ID: 1453161
I have not worked with the registry before, please can u send me a sample code for that.

thank you
0
 
LVL 3

Expert Comment

by:cognition
ID: 1453162
Search the microsoft site for VBREG.bas. That module contains more than enough registry funtions to get you started.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:sml41
ID: 1453163
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
 
LVL 3

Expert Comment

by:cognition
ID: 1453164
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
 

Author Comment

by:sml41
ID: 1453165
thanks
0

Featured Post

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question