Results 1 to 6 of 6
  1. #1
    cgschlangen
    Guest

    Comparing Subjects (Outlook 2000)

    Okay... I'm going to try to explain my problem as best as possible, then explain my thoughts of a solution, then I'm hoping you guys can help me figure out how to accomplish it...

    Problem:
    From time to time we use outlook on a semi-standalone network to transfer government messages around to each other. Usually never more than a month or two - but we generally rcv about 4000 messages in that time period (which are deleted after our mission). The only problem is there is glitch somewhere in the system and we constantly receive duplicate messages. I'm an end user - not a glitch fixer - but I am hoping to be able to help out other end users to keep from having to deal with these duplicate messages...

    Buying an addon program is also not an option.

    So my thoughts are to start logging every message that comes in in a text file. Then from there create a script that looks something like this (except in VBA):

    If first 20 characters of subject match first 20 characters of any line in text file then
    take entire subject and compare to entire matching line
    if entire subject is equal to entire matching line then
    add message to category "SUSPECTEDDUPE"
    end if
    end if

    Obviously I'm looking at a lot of computing... But hey - that's the computers problem not mine...
    One thought is - would comparing the first 20 characters actually take longer than comparing the entire subject line if it's going to pulled anyways?
    Any thoughts? Does anyone have a script like this already or a sample that might help me achieve this goal?

    Thanks in advance,
    Dan

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Comparing Subjects (Outlook 2000)

    Can you explain more about why you get duplicates?

    If you have a huge messagebase and a lot of folders, coding this won't be easy. You might want to look creating a Search Folder, and sorting by subject, and possibly the "Conversation" and "Group By" views, and see if there's a manual solution. I don't think it will matter much to code speed how you write your subject comparisons, if you decide to go that route.

    In answer to your very last question, see also:
    <post#=315,594>post 315,594</post#>
    http://www.slipstick.com/addins/housekeeping.asp
    http://www.mapilab.com/outlook/#duplicates_excluding

    Most Outlook VBA discussion is here in this Outlook Forum, and if you elect to run the comparisons within Outlook rather than an exported "textbase", people here will be happy to help. If you elect to run comparisons outside outlook, the VBA Forum is probably the best place to post further questions.
    -John ... I float in liquid gardens
    UTC -7ąDS

  3. #3
    cgschlangen
    Guest

    Re: Comparing Subjects (Outlook 2000)

    I don't really understand why we get duplicates, - it's not your traditional sense of "conversations" though - they are really duplicates... If I had to guess it probably has something to do w/ a non-outlook system forcing messages into outlook to be distributed to many many many units some on non-outlook systems, and checks and balances, and probably a typo or two somewhere...

    I thought about running comparisons against messages already in folders, but thought it would be much simpler to compare against "textbase" - although comparing against folders would give me the immediate benefit of not having to build the data in the textbase... I have most of my code already completed - and will be sure to troubleshoot it (you know it's going to need it!) in the VBA Folder.

    Thanks for the links - it's good to see that there are products out there looking to do what I need - but unfortunately it's on a stringently controlled network and any commercial addons need to be approved, and probably wouldn't be because "they" probably think they're close to figuring this problem (that's been plaguing us for 2 years now) out... lol --- [img]/forums/images/smilies/smile.gif[/img]

    Thanks again,
    Dan

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Comparing Subjects (Outlook 2000)

    It seems that there might be a root cause. What mailserver is used to distribute the messages? Are the messages distributed by distribution lists?

    After you have identified the dups, how do you plan to remove them from the user messagebases? Or do you only need to remove them from your archive text messagebase? It seems to me that working in Outlook will reduce the steps to the solution, but it's your call.
    -John ... I float in liquid gardens
    UTC -7ąDS

  5. #5
    cgschlangen
    Guest

    Re: Comparing Subjects (Outlook 2000)

    LOL - I know it's driving you mad that you can't help me fix the real problem - but I have no clue... Absolutely none... I have no access to the servers nor any access to even a picture of the infrastructure... I'm just an end user as mentioned above who has the pleasure of reading every message to see if it's a dupe and delete it if it is... My thought is merely to make it easier to identify the dupes... I've got it all almost figured out...

    I know I said I'd troubleshoot my script in the VBA forum - however the one problem I have seems to be an Outlook problem - as I can compare everything - I just can't figure out how to manipulate my mail item...
    Here's what I have

    Public WithEvents myOlItems As Outlook.Items

    Public Sub Application_Startup()

    ' Reference the items in the Inbox. Because myOlItems is declared
    ' "WithEvents" the ItemAdd event will fire below.
    Set myOlItems = Outlook.Session.GetDefaultFolder(olFolderInbox).It ems

    End Sub

    Private Sub myOlItems_ItemAdd(ByVal Item As Object)

    'LogFileName = "c:msgtransferlogdupelog.txt"
    LogFileName = "z:dschlangenpublicdupelog.txt"
    Dim SUSDUPE As String

    ' Check to make sure it is an Outlook mail message, otherwise
    ' subsequent code will probably fail depending on what type
    ' of item it is.

    If TypeName(Item) = "MailItem" Then
    SUSDUPE = False
    Open LogFileName For Input As #2
    While Not EOF(2)
    Line Input #2, TextOfLine
    If Item = TextOfLine Then
    SUSDUPE = True
    End If
    Wend
    Close #2
    If SUSDUPE = False Then
    Open LogFileName For Append As #1
    Print #1, Item
    Close #1
    End If

    End If
    SUSDUPE = False

    End Sub


    I'd figure I'd have to add something like:

    If SUSDUPE = True Then
    Item.Categories = "SUSDUPE"
    End If

    But it doesn't work that way...
    Any thoughts?
    Thanks in advance,
    Dan

  6. #6
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Comparing Subjects (Outlook 2000)

    > But it doesn't work that way...

    Maybe this? After adding the category you need to use Item.Save or your change should be discarded.

Posting Permissions

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