Outlook voting button no response summary

I asked a question that was very similar to this question before.  The ID of the old question was  ID: 22664290 and Blue Devil Fan helped me with it.  His reponse was exactly what I was looking for.

Our team used to use voting buttons as an acknowledgement that the email was read.  The emails were sent out to groups of people who needed to know about a change in the organization.  We kept the emails that were sent out and used the tracking tab as records that the people had acknowledged the change.  It took us about a year but we realized that this was ineffective because many people did not acknowlege.  Now we have over 100 emails with missing acknowledgements.

The emails would be sent out with the subject of the change as the subject line of the email.  What I am looking for is a macro that can summarize what the subject of the email was and who did not acklowedge.  We can then go back and find out who needs to perform a retroactive acknowledgement of the change.

We stored all the emails as .msg files in a specific directory.  Can someone please help with writing a macro that can search for voting button emails and create a summary of the subject lines and below each subject line create a list of those who did not acknoweledge?  If necessary I can send a few examples of these emails to someone if they need to play around to get it to work correctly.
browneye9000Asked:
Who is Participating?
 
David LeeConnect With a Mentor Commented:
Hi, browneye9000.

Try this.

'This declaration must go at the top of the module.
Private Declare Function ShellExecute Lib "shell32.dll" _
  Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
  ByVal lpFile As String, ByVal lpParameters As String, _
  ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Sub CheckForVotes()
    Dim olkItem As Outlook.MailItem, _
        olkRecipient As Outlook.Recipient, _
        strFolder As String, _
        strFileName As String, _
        objFSO As Object, _
        objFile As Object
    'Change the folder path on the following line as needed
    strFolder = "C:\eeTesting\"
    strFileName = Dir(strFolder & "*.msg")
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    'Change the output filename and path as desired
    Set objFile = objFSO.CreateTextFile(strFolder & "No Responses.txt", True)
    Do Until strFileName = ""
        ShellExecute 0&, "open", strFolder & strFileName, 0&, 0&, 0&
        Do Until Application.Inspectors.Count = 1
            DoEvents
        Loop
        Set olkItem = Application.ActiveInspector.CurrentItem
        objFile.WriteLine "Message: " & olkItem.Subject
        For Each olkRecipient In olkItem.Recipients
            If olkRecipient.TrackingStatus <> olTrackingReplied Then
                objFile.WriteLine "  - " & olkRecipient.Name
            End If
        Next
        olkItem.Close olDiscard
        strFileName = Dir
    Loop
    objFile.Close
    Set objFile = Nothing
    Set objFSO = Nothing
    Set olkRecipient = Nothing
    Set olkItem = Nothing
End Sub
0
 
browneye9000Author Commented:
Once again you have amazed me.  Thanks so much.  You've saved us hours of work!
0
 
David LeeCommented:
Thanks and you're welcome!
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
browneye9000Author Commented:
Ran the macro and found out that it is pulling everyone on the voting list.  Not just those that have no response to the vote.  Also, if possible, I would also like to have the macro pull names that indicate the word "DELETED" beside it.  This indicates that the person never acknowledged the email but just deleted it.
0
 
David LeeCommented:
"Ran the macro and found out that it is pulling everyone on the voting list"
I've run the macro several times against voting messages I have and it always works correctly.  Did I misunderstand what you wanted to accomplish?  This macro is desgined to work only with messages that employed voting buttons.  The macro doesn't pay any attention to whether the message was read, it only checks to see if the recipient voted.  If they didn't vote, then they go on the list.
0
 
browneye9000Author Commented:
You are exactly right.  I tried to apply it to a different type of file that we had sent out.  Once I got my head out of my *@^# I realiized that I wasn't doing it correctly.  Sorry for bothering you.
0
 
David LeeCommented:
No problem.  If you need another version that checks to see if messages were deleted without being read, then I can modify this code to do that.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.