Hi,
I have code within a custom task form that opens a meeting request. Issue is when it's done through the task it puts the senders meeting in their task folder instead of their calendar. How to you designate the folder, currently code says currentfolder. When testing I manually changed outlook to be in calendar and it worked as it should, need to have it done through code so that these meetings will show correctly on calender, here is the current code:
Case "ENGQUALFMEA2meet"
'open fmea2 stick meeting request
Set myinspector = Item.GetInspector
Set myPage1 = myInspector.ModifiedFormPages("Step 1 Part Info")
Set ENGQUALFMEA2meet = myPage1.Controls("ENGQUALFMEA2meet")
'verify part number, new senior process revision, BU and Customer is filled in
Set EngQualNewSeniorRevTxt = myPage1.Controls("EngQualNewSeniorRevTxt")
Set EngQualPNTxt = myPage1.Controls("EngQualPNTxt")
Set EngQualBuUnit = myPage1.Controls("EngQualBuUnit")
Set EngQualCustNameTxt = myPage1.Controls("EngQualCustNameTxt")
Set EngQualFMEASentVal = myPage1.Controls("EngQualFMEASentVal")
If ENGQUALFMEA2MEET.Value = 0 Then EngQualFMEASentVal.Value = 0
If ENGQUALFMEA2MEET.Value = 0 Then Exit Sub
If EngQualBuUnit.Value < 1 Then
MsgBox "Business Unit Field on Step 1 Is Empty",,"Warning!!!"
ENGQUALFMEA2meet.Value = 0
Exit Sub
ElseIf EngQualPNTxt.Value = "" Then
MsgBox "Part Number Field on Step 1 Is Empty",,"Warning!!!"
ENGQUALFMEA2meet.Value = 0
Exit sub
ElseIf EngQualNewSeniorRevTxt.Value = "" Then
MsgBox "Senior New Process Revision Field on Step 1 Is Empty",,"Warning!!!"
ENGQUALFMEA2meet.Value = 0
Exit Sub
ElseIf EngQualCustNameTxt.Value = "" Then
MsgBox "Customer Name Field on Step 1 Is Empty",,"Warning!!!"
ENGQUALFMEA2meet.Value = 0
Exit Sub
End If
EngQualFMEASentVal.Value = 1
Fmea2Subject = "P/N_Sr. New Process Rev.
" & EngQualPNTxt.Value & ")_((" & EngQualNewSeniorRevTxt.Value & "))_Business Unit{" & EngQualBuUnit.Value & "}_Customer: {{" & EngQualCustNameTxt.Value & "}}"
FMEA2Body = "Part Number: " & EngQualPNTxt.Value & Chr(13) & "Senior Process Revision: " & EngQualNewSeniorRevTxt.Value & Chr(13) & "Business Unit (If 3, Part will utilize both Business Units): " & EngQualBuUnit.Value & Chr(13) & "Customer: " & EngQualCustNameTxt.Value
Msgbox "Do Not Modify Meeting Request Subject Information",,"Caution!!!"
strform = "IPM.APPOINTMENT.FMEAStickLvl2"
Set objfolder = Application.ActiveExplorer.currentFolder
Set objItem = objFolder.Items.Add(strform)
objitem.Subject = FMEA2Subject 'added
objitem.Location = "Training Room"
'objitem.Start = Now() + 5
objitem.body = FMEA2Body
Thanks for any help you can offer.
I have code within a custom task form that opens a meeting request. Issue is when it's done through the task it puts the senders meeting in their task folder instead of their calendar. How to you designate the folder, currently code says currentfolder. When testing I manually changed outlook to be in calendar and it worked as it should, need to have it done through code so that these meetings will show correctly on calender, here is the current code:
Case "ENGQUALFMEA2meet"
'open fmea2 stick meeting request
Set myinspector = Item.GetInspector
Set myPage1 = myInspector.ModifiedFormPages("Step 1 Part Info")
Set ENGQUALFMEA2meet = myPage1.Controls("ENGQUALFMEA2meet")
'verify part number, new senior process revision, BU and Customer is filled in
Set EngQualNewSeniorRevTxt = myPage1.Controls("EngQualNewSeniorRevTxt")
Set EngQualPNTxt = myPage1.Controls("EngQualPNTxt")
Set EngQualBuUnit = myPage1.Controls("EngQualBuUnit")
Set EngQualCustNameTxt = myPage1.Controls("EngQualCustNameTxt")
Set EngQualFMEASentVal = myPage1.Controls("EngQualFMEASentVal")
If ENGQUALFMEA2MEET.Value = 0 Then EngQualFMEASentVal.Value = 0
If ENGQUALFMEA2MEET.Value = 0 Then Exit Sub
If EngQualBuUnit.Value < 1 Then
MsgBox "Business Unit Field on Step 1 Is Empty",,"Warning!!!"
ENGQUALFMEA2meet.Value = 0
Exit Sub
ElseIf EngQualPNTxt.Value = "" Then
MsgBox "Part Number Field on Step 1 Is Empty",,"Warning!!!"
ENGQUALFMEA2meet.Value = 0
Exit sub
ElseIf EngQualNewSeniorRevTxt.Value = "" Then
MsgBox "Senior New Process Revision Field on Step 1 Is Empty",,"Warning!!!"
ENGQUALFMEA2meet.Value = 0
Exit Sub
ElseIf EngQualCustNameTxt.Value = "" Then
MsgBox "Customer Name Field on Step 1 Is Empty",,"Warning!!!"
ENGQUALFMEA2meet.Value = 0
Exit Sub
End If
EngQualFMEASentVal.Value = 1
Fmea2Subject = "P/N_Sr. New Process Rev.
FMEA2Body = "Part Number: " & EngQualPNTxt.Value & Chr(13) & "Senior Process Revision: " & EngQualNewSeniorRevTxt.Value & Chr(13) & "Business Unit (If 3, Part will utilize both Business Units): " & EngQualBuUnit.Value & Chr(13) & "Customer: " & EngQualCustNameTxt.Value
Msgbox "Do Not Modify Meeting Request Subject Information",,"Caution!!!"
strform = "IPM.APPOINTMENT.FMEAStickLvl2"
Set objfolder = Application.ActiveExplorer.currentFolder
Set objItem = objFolder.Items.Add(strform)
objitem.Subject = FMEA2Subject 'added
objitem.Location = "Training Room"
'objitem.Start = Now() + 5
objitem.body = FMEA2Body
Thanks for any help you can offer.