I found some Visual Basic Application code that you can use to automate when you close outlook to display an out of message reply.
Here is the code:
Private Sub Application_Quit()
Dim objMAPISession As Object
Set objReminders = Nothing
If MsgBox(“Would you like to turn the Out of Office Assistant on?”, vbYesNo, “Activate Out of Office Assistant”) = vbYes Then
Set objMAPISession = CreateObject(“MAPI.Session”)
objMAPISession.Logon , , True, False
objMAPISession.OutOfOffice = True
Set objMAPISession = Nothing
Here are the instructions to get this going:
1. Open up Outlook.
2. Click Tools->Macros->Visual Basic Editor.
3. If not already expanded, expand Microsoft Office Outlook Objects and select ThisOutlookSession.
4. Copy the code and paste it into the right-hand pane of the VB editor.
5. Click the diskette icon on the toolbar to save the code.
6. Close the VB editor.
7. Click Tools->Macros->Security.
8. Change the security level to Medium.
9. Click Ok.
10. Close Outlook.
11. Start Outlook.
12. You’ll receive a dialog-box telling you that ThisOutlookSession contains macros and asking if you want to enable them. Click Enable Macros.
13. Try closing Outlook. When you do a dialog-box should appear asking if you want to turn the Out of Office Assistant on. If you click Yes it will be turned on.
Clicking No will leave it off.