Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub submit_Click()
Dim bStarted As Boolean
Dim oOutlookApp As Object
Dim oItem As Object
Dim varTo As Variant '-- Email Address for SendObject
Dim stSubject As String '-- Subject line of e-mail
Dim stMenu As String '-- The Menu
Dim stOption As String '-- The Option
Dim stName As String '-- Person who requested help
Dim stPlant As String '-- Plant
Dim stDescription As String '-- Description of Problem
On Error Resume Next
'Get Outlook if it's running
Set oOutlookApp = GetObject(, "Outlook.Application")
If Err <> 0 Then
'Outlook wasn't running, start it from code
Set oOutlookApp = CreateObject("Outlook.Application")
bStarted = True
End If
' Set Variables
'-- Sets Who created the request
stName = Me.Contact_Name
stPlant = Me.Plant
'-- Sets email address
varTo = "help@ventra.com"
stSubject = ":: New CMS Issue ::"
stMenu = Me.Menu
stOption = Me.Option
stDescription = Me.Description_of_Problem
stText = "Person Requesting Help:" & stName & Chr$(13) & _
"Menu Name:" & stMenu & Chr$(13) & _
"Option Number:" & stOption & Chr$(13) & Chr$(13) & _
"Description of Problem:" & stDescription & Chr$(13) & Chr$(13) & _
"This is an automated message. Please do not respond to this e-mail."
'Create a new mailitem
Set oItem = oOutlookApp.CreateItem(0)
With oItem
'Set the recipient for the new email
.To = "help@****.com"
'Set the subject
.Subject = "NEW CMS ISSUE!"
'Set the message body
.Body = stText
.Send
End With
If bStarted Then
'If we started Outlook from code, then close it
oOutlookApp.Quit
End If
'Clean up
Set oItem = Nothing
Set oOutlookApp = Nothing
End Sub