Write a VBA script to auto forward all incoming emails from an Outlook client INBOX folder to a nominated gmail account. The script will then delete any emails that have been forwarded from the Outlook client's SEND and DELETE folders but keep the original email in the INBOX.
Preferably, the script will be able to redirect, that is, the sender name and receiver name will appear in the gmail inbox folder exactly the same as in the original Outlook client, so that one can answer the email in the gmail account by clicking REPLY.
The script is needed since the auto forward rule has been disabled by the MS Exchange admin.
-----------------------------------------------------------------------------------------------------------------------------------------------------
A possible script is shown below:
Sub AutoForwardAllSentItems(Item As [login to view URL])
Dim strMsg As String
Dim myFwd As [login to view URL]
Set myFwd = [login to view URL]
[login to view URL] ""
[login to view URL]
Set myFwd = Nothing
End Sub
Add the above code in the Visual Basic editor of Outlook (Alt-F11 should get your started). Be sure to change to the address where you want the mail to go
Tell Outlook to run this code for each inbound message (Tools -> Rules and Alerts -> New Rule -> Check Messages when they arrive -> Next -> YES -> Checkbox "Run a Script" -> Then select the script you just created.
Now Outlook should automatically forward each email you receive, but it won't be blocked by the Admin as an "Auto-forward".
Thanks
I have over 10 years of experience with VB, VBA,. Net, including the development of plug-ins for Outlook.
I have developed what you need, pluig-in for Outlook that reads the messages and sends them to another system or email.
Please contact me for more details.