Solved

folders

Posted on 1998-12-30
6
138 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
  • 3
  • 3
6 Comments
 
LVL 3

Accepted Solution

by:
cognition earned 20 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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…

705 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now