Solved

folders

Posted on 1998-12-30
6
140 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
ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

 

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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS Date Picker 64 bit 32 bit issue 12 55
VB6 - Convert HH:MM into Decimal 8 56
Add and format columns in vb6 7 57
RUNRMTCMD from AS/400 12 47
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

810 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