![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
ok I'm very new to programing in Outlook. I have a custom form with 3
command buttons on it and I want to use the GetPublicFolder() function but not sure how to call the function for each button or if it needs to be inside the Sub for each button see code below Public Function GetPublicFolder() Dim colFolders Dim objFolder Dim arrFolders Dim i On Error Resume Next strFolderPath = Replace(strFolderPath, "/", "\") arrFolders = Split(strFolderPath, "\") Set objFolder = Application.Session.GetDefaultFolder(18) Set objFolder = objFolder.Folders.Item(arrFolders(0)) If Not objFolder Is Nothing Then For i = 1 To UBound(arrFolders) Set colFolders = objFolder.Folders Set objFolder = Nothing Set objFolder = colFolders.Item(arrFolders(i)) If objFolder Is Nothing Then Exit For End If Next End If Set GetPublicFolder = objFolder Set colFolders = Nothing Set objApp = Nothing Set objFolder = Nothing End Function 'ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ ZZZZZ 'ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ ZZZZZ 'ZZ need to call public function GetPublicFolder() ZZZ 'ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ ZZZZZ 'ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ ZZZZZ 'Action and call for Create Contact History Sub creathist_Click() 'need to assign projourn as default form GetPublicFolder(Public Folders\All Public Folders\Construction\Project Jornals\) MsgBox "This will open Project Journals" End Sub 'Action and call for Create Task Sub CommandButton4_Click() 'need to assign protask as default form GetPublicFolder(Public Folders\All Public Folders\Construction\construction\Project Task\) MsgBox "This will open Project Task" End Sub 'Action and call for Create Appt Sub CommandButton3_Click() 'need to assign proappt as default form GetPublicFolder(Public Folders\All Public Folders\Construction\construction\Project Appointmenst and Dates\) MsgBox "This will open Project Appointmenst and Dates" End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Scheduling without email function | Valarie | Outlook - General Queries | 1 | April 12th 06 05:10 AM |
Outlook 2003 Import Function | pwoodbba | Outlook - Using Contacts | 1 | April 7th 06 11:22 AM |
Search Function has changed | LAH | Outlook Express | 4 | March 10th 06 01:42 PM |
Autocomplete function works only once | Kyle Roberts | Outlook - General Queries | 3 | February 21st 06 05:00 AM |
Spare time function | magoo | Outlook - Calandaring | 0 | February 2nd 06 07:11 PM |