I have a VBA script that generate and send an email. Sometimes some of the recipients of the email are out of office and have an Automatic Reply turned on. Since the content of
You can either
use Exchange Web Services API to retrieve the OOF status
use Extended MAPI (C++ or Delphi only) to open the other user's mailbox (IMsgStore) and read the PR_OOF_STATE property.
Use Redemption (any language; disclaimer: I am Redemption developer) and use RDOExchangeMailboxStore.OutOfOfficeAssistant or read the PR_OOF_STATE property using RDOStore.Fields[]. To open other user's mailbox, you can use RDOSession.GetSharedMailbox.
UPDATE. Note that #2 and #3 require access rights to the mailbox in question. You can do what Outlook does when it displays the mail tip in a banner when a recipient you are about to send to is OOF. Use EWS and GetMailTips operation. Redemption exposes this functionality through RDOAddressEntry.GetMailtips and RDOMailTips object.