none
Outlook 2010 rule (run as a script) not working RRS feed

  • Question

  • Dear Sir/Madam,

    My Outlook 2010 is connected to Exchange Server 2010. I used Outlook 2010 rule (Apply this rule after the message arrives->run the following autoreply script) to autoreply for every incoming emails. However, the above mentioned autoreplyrule is not working many times. I would like to know the following:

    1)  May someone give some suggestion how to solve the rule always not working issue?
    2)  When the autoreply rule can run, it can run only when the outlook 2010 is running and the computer is unlocked (i.e. without windows login screen with login username and password), anyone know how the autoreply rule can also run if the computer is locked?
    3) How to modify the script in order for the outlook template can also support Subject and Company Logo image?
    4) May I know the website to get the Outlook 2010 VBA developer/programming guide (especially for email object)?

    Sub AutoReply(olItem As Outlook.MailItem)

    Dim olOutMail As Outlook.MailItem

    Dim oTemp As Outlook.MailItem

    Dim fso As Object

         MsgBox ("test")

         Set fso = CreateObject("Scripting.FileSystemObject")

         If fso.FileExists("C:\Self\AutoReply.oft") Then

             Set oTemp = CreateItemFromTemplate("C:\Self\AutoReply.oft")

             With olItem

                 Set olOutMail = olItem.Reply

                 With olOutMail

                     .Subject = "AutoReply Testing"

                     .HTMLBody = oTemp.HTMLBody

                     .Send

                 End With

                 Set olOutMail = Nothing

             End With

             oTemp.Close olDiscard

         Else

             MsgBox "Template not found!"

         End If

    End Sub

    Thank you very much for your help and attention.

    Regards,
    Stanley

    • Edited by Stanleycha Saturday, August 12, 2017 7:40 AM
    Friday, August 11, 2017 3:53 PM

All replies