I currently can send emails to others using VBA code (see
below). I also would like to send a Outlook Appointment also using
VBA code. I have researched and googled about
everything I can and there are quite a few examples but I
can't pinpoint on how to send a Outlook Appointment to someone
else for them to accept and add to their calendar. Does anyone
have any advice on how to accomplish this? I could do this
in lieu of the Email or as an addition to the email. I
anxiously await for some very good solutions and advice. I
want to do this without using 3rd party solutions.
below). I also would like to send a Outlook Appointment also using
VBA code. I have researched and googled about
everything I can and there are quite a few examples but I
can't pinpoint on how to send a Outlook Appointment to someone
else for them to accept and add to their calendar. Does anyone
have any advice on how to accomplish this? I could do this
in lieu of the Email or as an addition to the email. I
anxiously await for some very good solutions and advice. I
want to do this without using 3rd party solutions.
Code:
Sub SendMail1()
'Finance to Scheduling
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Dim clsSendObject As accSendObject
Dim strMsg As String
Dim emailsubject As String
Dim emailtext As String
Dim SL As String, DL As String
Dim toEmail As String
Dim ccEmail As String
SL = vbNewLine
DL = SL & SL
If Me.FinanceCheckList1_1 = True Then
emailsubject = "Form #" & Me.FormId.Value & "; Scheduling, Please complete Checklist and Forward to ECN Analyst"
emailtext = "ATTENTION!" & DL & _
"Please make sure you view all parts called out on Form to be changed." & SL & _
"You might have to scroll to the right to see all parts." & DL & _
"Form Type= " & DLookup("FormNameLong", "FormShortNameTbl", "FormName='" & Me.FormType & "'") & DL & _
"Special Instructions:" & SL & _
Me.SpecialInstructions.Value & DL & _
"Form #" & Me.FormId.Value & DL & _
"Comments: " & Me.FinanceCheckListComments1.Value & DL & _
"1. Please go to appropriate Form (Make to PhantomJ) and then to the Form Number Listed above" & SL & _
"2. Complete your Checklist" & SL & _
"3. Next, Click Scheduling1 CheckBox in Routing above to Forward Form to ECN Analyst" & DL & _
"Thank you for your help" & DL & _
DLookup("ActualName", "ChangeFormUserNameTbl", "LoginName='" & GetCurrentUserName() & "'") & SL & _
"Finance"
toEmail = "abjwoote@nmhg.com"
Set clsSendObject = New accSendObject
strMsg = String(3000, "a")
clsSendObject.SendObject , , accOutputrtf, _
toEmail, , "abajacks@nmhg.com", emailsubject, emailtext, True
Set clsSendObject = Nothing
End If
If Me.FinanceCheckList1_2 = True Then
emailsubject = "Form #" & Me.FormId.Value & "; This Request has been Disapproved, Engineering Please see Comments Below"
emailtext = "ATTENTION!" & DL & _
"Form Type= " & DLookup("FormNameLong", "FormShortNameTbl", "FormName='" & Me.FormType & "'") & DL & _
"Special Instructions:" & SL & _
Me.SpecialInstructions.Value & DL & _
"Form #" & Me.FormId.Value & DL & _
"Comments: " & Me.FinanceCheckListComments1.Value & DL & _
"Thank you for your help" & DL & _
DLookup("ActualName", "ChangeFormUserNameTbl", "LoginName='" & GetCurrentUserName() & "'") & SL & _
"Finance"
toEmail = DLookup("LoginName", "ChangeFormUserNameTbl", "ActualName='" & Me.RequestedBy & "'") & "@nmhg.com"
ccEmail = DLookup("LoginName", "ChangeFormUserNameTbl", "ActualName='" & Me.EcnBomAnalystAssigned & "'") & "@nmhg.com;abrwilso@nmhg.com; abkthomp@nmhg.com"
Set clsSendObject = New accSendObject
strMsg = String(3000, "a")
clsSendObject.SendObject , , accOutputrtf, _
toEmail, ccEmail, "abajacks@nmhg.com", emailsubject, emailtext, True
Set clsSendObject = Nothing
End If
End Sub