?
Solved

folders

Posted on 1998-12-30
6
Medium Priority
?
147 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month15 days, 16 hours left to enroll

741 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