Need a little help

Posted on 2004-08-15
Last Modified: 2010-08-05

    I just purchased some software that writes folder browser controls, it looks pretty easy for the most part.   I'm trying to make a folder browser control for my Outlook Form that I've created.  I could use the the paper-clip icon but for testing purposes I'd like to know if if you can put folder browser controls in the actual form.

    I can get it to work in Visual Basic but for some reason it is not working on my Outlook Form when I run it.  The only thing I did differently in Visual was that I added as a Component and it the folder browser icon appeared in my toolbar in which case i just dropped it into the form and pasted this code here behind it and it worked great.

Private Sub Command1_Click()
    With FolderBrowser1
        .Folder = "c:my computer"
        .Title = "Please select default file location."
        .Owner = Me.hWnd
    End With
    If FolderBrowser1.Show Then

        MsgBox "Folder selected is " & FolderBrowser1.Folder
        MsgBox "Cancel selected."
    End If
End Sub

   I've tried pasting this code in the Properties of my control on the form in Edit portion of it's properties, as well as trying to paste it into Form>View Code as a script there, I then bind the data by coping the control from the Edit Compose page to the Edit Read page and then run it.  It will not run, I click on the Control and nothing happens.

   Since i know the code works in VB no problems, is there anyone that could test this on an Outlook form to see if it will work.  If it does if you could outline the steps as if I were a two year old I'd greatly appreciate it.  Mucho points for this one!  Thanks in Advance.


Question by:itsmevic
  • 2

Accepted Solution

Discofish earned 500 total points
ID: 11804197
It sounds like you need to add the control into your Outlook Visual Basic Project. But.....

Is there a reason it needs to be done in Outlook?    You can just do this from your VB Project:

Set olApp = CreateObject("Outlook.Application")

Now you can use olApp to control Outlook. Then just create a toolbar icon in outlook and have it run your program.


Author Comment

ID: 11805581
Hi Discofish,

     Thanks for the great suggestion.  I was wondering could you walk me thru this step-by-setp in your reply?  I would greatly appreciate this.  Example:

1.)  Open Outlook.
2.)  Click on Tools.
3.)  Click on Design Form.
4.)  Open your Form.
5.)  Click on this...
6.)  Click on that....
7.)  Paste the code SetolApp = CreateObject("Outlook.Application") in the View Code window along with the code you have above.
8.)  Run the Form and test...

Something along those lines please...This way I fully understand what your saying.  GREATLY APPRECIATED!!!

Thanks Again,


Expert Comment

ID: 11825191
If you want a walk through, you'll need to give me some more specific info about your visual basic project, the name of the control you're trying to use etc. I'll be happy to do so once you provide the info that I need to understand the problem.

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Introduction In a recent article ( for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
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…

786 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