Results 1 to 6 of 6
  1. #1
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts

    Email archive (Outlook 2003)

    We are using a macro (code below) to display a warning when users have chosen "Reply to All." This is the best result we could find that worked in every circumstance. There is a Remove All But One button which users may click to remove all but the primary recipient.

    The problem: we have a third party program (EAS) that is a utiity to archive email messages. After using EAS to perform a search of archived messages, double-clicking on an item in the "hit" list causes the Reply to All warning to appear, if the archived message has multiple recipients. Is there a way to determine whether the message is coming from a typical Outlook store or from some other type of archival system? I've tryied checking msg.Parent, but in all cases it's "Inbox."

    Thanks.
    Richard Barrett


    If TypeOf Inspector.CurrentItem Is Outlook.MailItem Then
    Set msg = Inspector.CurrentItem
    ' check if new item
    If msg.Size = 0 Then ' 0 indicates it's a new message
    ' check if replyall
    'If SaveButtonFound = True Then ' Not an archived message displayed in a new inspector
    If msg.Recipients.count > 1 Then
    strMsg = "If you do not want to reply to all original recipients, "
    strMsg = strMsg & "choose Remove All But One."
    MsgBox strMsg, vbOKOnly, "Reply to All Warning"
    End If
    'End If
    Else ' size is > 0, therefore an incoming message
    ' do nothing
    End If
    Set msg = Nothing
    End If

  2. #2
    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: Email archive (Outlook 2003)

    I'm confused. The macro fires upon viewing an archived message, rather than replying to it? What if you test for the Sent property (I can't recall whether that is a boolean or a date...).

  3. #3
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts

    Re: Email archive (Outlook 2003)

    The macro should fire only after a user hits Reply to All. But in the case of these archived messages, it's firing when the message opens (if there are multiple recipients.)

    I think I see why. The macro is based on NewInspector. I believe that the archival utility stores the contents of messages in a database, and then dispalys them, as needed, in a.... NewInspector. Thus the macro is triggered. I tried looking at the toolbar of the new inspector to see if there was a Send button. (Obviously, that would appear only on a new message or a reply.) Although my Send button test works well on a static message, it doesn't behave as expected when a new inspector is being created. I was hoping to find something that is unique about these archived messages that would provide a clue. The Send button seemed like a good idea.....

  4. #4
    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: Email archive (Outlook 2003)

    Try these to confirm true newness:

    <code>msg.Sent = false

    msg.SentOn = "1/1/4501"</code>

    If the message has never been sent, its SentOn date for some reason is "1/1/4501"

  5. #5
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts

    Re: Email archive (Outlook 2003)

    I've been playing with the Sent property since your earlier post, with good results. It seems that if the message has *ever* been sent, Sent = True. Only a new msg would return False. I can't test this with the archival utility just now, but I'm hoping this will work as I expect it to.

    Thanks.
    Richard

  6. #6
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts

    Re: Email archive (Outlook 2003)

    I just logged on remotely and gave that a try.... it did the trick!

    Thanks again,
    Richard

Posting Permissions

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