using outlook web via VBA (1 Viewer)

mo9204

New member
Local time
Today, 17:58
Joined
Feb 9, 2018
Messages
8
Hi all,

I am currently using the below code for the user to open email me direct for issues with their programme. currently they use outlook app installed on their machines, however they soon to be going to outlook web app.

is there a way where i can simply direct the code to open the outlook web app?

i will also be using the same method to open the web app for attachments etc


Private Sub Command26_Click()
Dim appOutLook As Outlook.Application
Dim MailOutLook As Outlook.MailItem
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
With MailOutLook
.BodyFormat = olFormatRichText

.To = "mom@gmail.com"
.CC = "ben@gmail.com"
.Subject = "Issue with my access application."
.Body = " Tell us more about the problem with your application in detail and we will be in touch very soon. please also include screenshots of the issue "
.Display
End With
'MsgBox MailOutLook.Body
Exit Sub
email_error:
MsgBox "An error was encountered." & vbCrLf & "The error message is: " & Err.Description
Resume Error_out
Error_out:
End Sub�


cheers guys
 

Beetle

Duly Registered Boozer
Local time
Today, 10:58
Joined
Apr 30, 2011
Messages
1,808
Unfortunately no (afaik). OWA is browser based so standard Office automation code won't work. Any interaction would need to be through a browser object model. You would need to do some research on browser automation through VBA.
 

Users who are viewing this thread

Top Bottom