[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


Need a little help

Posted on 2004-08-15
Medium Priority
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
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
  • 2

Accepted Solution

Discofish earned 1000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
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

650 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