I have a macro that creates Outlook rules based on the currently selected
email. The macro needs to extract the subject line for use within an Outlook
rule. The macro works if I expand a conversation [1] and select an
individual email. The macros fails if I just select the conversation
heading.


I've included the bit that fails [2]

[1] Viewing 'by Conversation topic'

[2]
Function GetCurrentItem() As Object
    Dim objApp As Application
    Dim objSel As Selection
    Dim objItem As Object
           
    Set objApp = CreateObject("Outlook.Application")
    Select Case objApp.ActiveWindow.Class
        Case olExplorer
            Set objSel = objApp.ActiveExplorer.Selection
            If objSel.Count > 0 Then
                Set objItem = objSel.Item(1)
            End If
        Case olInspector
            Set objItem = objApp.ActiveInspector.CurrentItem
        Case Else
            ' can't handle any other kind of window
    End Select
   
    Set GetCurrentItem = objItem
   
    Set objItem = Nothing
    Set objSel = Nothing
    Set objApp = Nothing
End Function

-----Original Message-----
From: Snook, Kevin S (ITD) [mailto:[EMAIL PROTECTED]] 


What do you need to do exactly? How do you wish to display the conversation
topic id?

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

List Charter and FAQ at:
http://www.sunbelt-software.com/exchange_list_charter.htm

Reply via email to