need some VB help!!!! should be easy... add a button to an outlook form!

mcveigh

Diamond Member
Dec 20, 2000
6,457
6
81
Guys all I want to do is add a button on a contact form that can be customized to open a specified folder on the comoputer. I need it on the form part of the contact form so it can be customized for each contact

does anybody know how to this or anything close to it??? please!!:(
 

3141592653

Member
Aug 13, 2001
25
0
0
ok here is a way to do it:

Set up the gui
1. Tools -> Forms -> Design This Form
2. Show the control toolbar using Form -> Control Toolbar
3. Create a button somewhereon the form by dragging the button from the control toolbar or whatever method you choose. The button is probably called CommandButton1.
4. Add a microsoft common dialog control to the control toolbar by right clicking on the control toolbar, check the box on custom controls -> Available Controls -> Microsoft Common Dialog Control. click OK. There should now be a new funny icon on the control toolbar with tooltip text saying CommonDialog.
5. Add the Common Dialog Control to your form by dragging the icon to your form. You can put it anywhere because it won't be visible. The Common Dialog is probably called CommonDialog1

Add the VBScript:
1. click on Form -> View Code
2. copy and paste this:
Sub CommandButton1_Click()
'Get the page
Set myPage = Item.GetInspector.ModifiedFormPages.Add("General")
'Get the control
Set myControl = myPage.Controls("CommonDialog1")
'Show the Save Control
With myControl
.ShowSave
End With
End Sub

3. Close the script editor and Run!

Hope this helps