Solved

Need a little help

Posted on 2004-08-15
3
153 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now