I need a macro to update excel file based on Outlook mail. I have a file named "project number addition" which has sheet named"project no" which has project numbers in column C and status in column G. I have a macro which send mail to a person requesting to add the project number with subject "Project number creation: xxxxxxxx"
The person will send mail back informing us whether added or not added.
I have created a rule in outlook to move mails to a folder named "project number" with subject"Re: project number creation:xxxxxx"
I need the macro to go through the mails in this folder and match the project number from column C and subject, and update whether is has been added or not added from body of mail into columnG.
Reply mails contains only either "Added" or "Not added"
I found a code similar one but don't know how to proceed, attaching it for reference
' This routine wants a folder. It does nothing but display its name.
Dim FolderNameTgt As String
Dim FolderTgt As MAPIFolder
' The names of each folder down to the one required separated
' by a character not used in folder names.
' ##############################################################
' Replace "Personal Folders|MailBox|Inbox" with the name
' of one of your folders. If you use "|" in your folder names,
' pick a different separator and change the call of AnswerC2().
' ##############################################################
FolderNameTgt = "Personal Folders|MailBox|Inbox"
Call AnswerC2(FolderTgt, FolderNameTgt, "|")
If FolderTgt Is Nothing Then
Debug.Print FolderNameTgt & " not found"
Else
Debug.Print FolderNameTgt & " found: " & FolderTgt.Name
End If
End Sub```
Thanks in advance.