Question : On right click of a folder and select an option need a way to get the description to show on a box

Hi,

On right click of a folder and select an option need a way to get the description to show on a box
I have details as this
Say the folder is 'Sharath"
Details in description would be
Name : Sharath
age : 33
Sex male

So when a right click button is clicked i want the description to just pop on the outlook screen. With a Ok button.

Regards
sharath

Answer : On right click of a folder and select an option need a way to get the description to show on a box

Here's the code for doing this.  Follow these instructions to use it.

1.  Start Outlook
2.  Click Tools->Macro->Visual Basic Editor
3.  If not already expanded, expand Microsoft Office Outlook Objects and click on ThisOutlookSession
4.  Copy the code from the Code Snippet box and paste it into the right-hand pane of Outlook's VB Editor window
5.  Edit the code as needed.  I included comment lines wherever something needs to or can change
6.  Click the diskette icon on the toolbar to save the changes
7.  Close the VB Editor
8.  Click Tools > Trust Center
9.  Click Macro Security
10. Set Macro Security to "Warnings for all macros"
11. Click OK
12. Close Outlook
13. Start Outlook.  Outlook will display a dialog-box warning that ThisOutlookSession contains macros and asking if you want to allow them to run.  Say yes.

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
Private Sub Application_FolderContextMenuDisplay(ByVal CommandBar As Office.CommandBar, ByVal Folder As Folder)
    Const msoControlButton = 1
    Const msoButtonIconAndCaption = 3
    Dim objButton As CommandBarButton
    Set objButton = CommandBar.Controls.Add(msoControlButton)
    With objButton
        .Style = msoButtonIconAndCaption
        .Caption = "Folder Details"
        'List of face IDs here: http://www.kebabshopblues.co.uk/2007/01/04/visual-studio-2005-tools-for-office-commandbarbutton-faceid-property/'
        .FaceId = 355
        'Change the subroutine path on the next line'
        .OnAction = "Project1.Module76.DisplayFolderInformation"
    End With
End Sub 
Sub DisplayFolderInformation()
    Dim olkFolder As Outlook.Folder
    Set olkFolder = Application.ActiveExplorer.CurrentFolder
    msgbox olkFolder.Description, vbInformation + vbOKOnly, "Folder Information"
End Sub
Random Solutions  
 
programming4us programming4us