Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Newtown, Pennsylvania, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Capture menu selection in macro (Outlook 2003)

    I would like to have a button on the toolbar in the task view that will allow me to easily switch between 'All Active Tasks' and 'Active Tasks for Today'. If there were a way to record macros in Outlook it would be easy, but where do I go to get started with writing a macro to do this? The alternative seems to be several layers of menu selection, and I am rather lazy!

    Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Capture menu selection in macro (Outlook 2003)

    Here is a possible macro. Make sure that the names of the view correspond exactly to the names in your View menu.

    Sub ToggleTaskView()
    If TypeName(ActiveWindow) = "Explorer" Then
    With ActiveExplorer
    If .CurrentFolder.DefaultItemType = olTaskItem Then
    If .CurrentView = "All Active Tasks" Then
    .CurrentView = "Active Tasks for Today"
    ElseIf .CurrentView = "Active Tasks for Today" Then
    .CurrentView = "All Active Tasks"
    End If
    End If
    End With
    End If
    End Sub

  3. #3
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Newtown, Pennsylvania, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Capture menu selection in macro (Outlook 2003)

    Awesome! Thanks Hans

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •