Solved

Need a little help

Posted on 2004-08-15
3
155 Views
Last Modified: 2010-08-05
Hi,

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

Regards,

itsmevic
0
Comment
Question by:itsmevic
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
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.

Discofish
0
 

Author Comment

by:itsmevic
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,

itsmevic
0
 
LVL 2

Expert Comment

by:Discofish
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.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…

860 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