I'm working on an auto reply in Outlook 2010 using a VBA script so that whenever someone emails me, there's an auto response that responds back with my current unread email count along with the date and time of the oldest email.
In regards to Code this is what I have so far:
Sub AutoResponse(objmsg As Outlook.MailItem)
Dim objReply As MailItem
Dim omsgItem As Outlook.MailItem
Dim inbox As MAPIFolder
Set inbox = Application.GetNamespace("MAPI"). _
GetDefaultFolder(olFolderInbox)
Set objReply = objmsg.Reply
objReply.Subject = "Re: " & objReply.Subject
objReply.HTMLBody = "Hello," _
& "<br>" _
& "<br>" _
& "<br>" _
& "Thank you for your email. This is to verify that I have received your email. I currently have " & inbox.UnReadItemCount & " unread emails and the oldest email is (Code goes here) in my inbox and will be reading emails in a first in first out fashion. If the matter is urgent and cannot wait please call me directly" _
& "<br>" _
& "<br>" _
& "Regards, Mike" _
& "<br>" _
objReply.Send
Set objReply = Nothing
End Sub
The exact wording will be different but you should get the idea.
I'm extremely new to this and have been able to piece together a bit of code from Google and previous knowledge when developing a different app in .Net.
Any help would be greatly appreciated.