This is what I have for the email with a hyperlink:
[vba]Private Sub Submit_Ticket_Click()
Dim oApp As Object
Dim oMail As Object
'Create and show the outlook mail item
Set oApp = CreateObject("Outlook.Application")
Set oMail = oApp.CreateItem(0)
With oMail
.To = "Supervisor1; Supervisor2; Supervisor3"
'.CC = ""
.Subject = "Verify Pressroom Pulled Job Counts"
.HTMLBody = "A pull ticket has been submitted. Please check the <a href=""V:\press\Forum\Count Control\Pull Tickets\Verification Needed\"">Verification Needed</a> folder."
.Importance = 2
.Display
End With
'Restore screen updating and release Outlook
Application.ScreenUpdating = True
Set oMail = Nothing
Set oApp = Nothing
End Sub[/vba]
And this is what I have for the attachment email:
[vba]Private Sub OK_Button_Click()
Dim oApp As Object
Dim oMail As Object
'Create and show the outlook mail item
Set oApp = CreateObject("Outlook.Application")
Set oMail = oApp.CreateItem(0)
With oMail
.To = "Scheduling; Pressroom Manager; Pressroom Engineer"
.Subject = "Pressroom Pulled Job Ticket"
.Attachments.Add ActiveWorkbook.FullName
.Display
End With
'Restore screen updating and release Outlook
Application.ScreenUpdating = True
Set oMail = Nothing
Set oApp = Nothing
[/vba]
It crashed when I reached
[vba]Set oApp = CreateObject("Outlook.Application") [/vba]