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
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 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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.
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
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…

717 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