Hi All,

I currently have a code (below) that creates an email template in Outlook, which does exactly what I want it to do, opens up a specific email in outlook which the user then adjusts accordingly (subject, body of the email, etc.). Now, the company I work for decided to switch from the normal Outlook application to the web-based Outlook that opens through a browser and obviously the code no longer works. Is there a way for VBA to work with Outlook OWA or is there any alternative method with which to achieve the same result?

Any help / suggestion is much appreciated


Sub Time_Manager()

Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)

strbody = "Hello All,<br><br>" & _
"Please be advised that all shifts have been approved.<br><br><br>" & _
"Thank you.<br>"

With OutMail
.Display
.To = ""
.CC = ""
.BCC = ""
.Subject = "Time Manager"
.HTMLBody = "<BODY style=font-size:11pt;font-family:Calibri>" & strbody & "<br>" & .HTMLBody


End With

On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub