Thanks. Now understand why its not working.
Do you mind looking at my code to see if you can find anything that would
"one-off" it? Thought is would be Item.Send or Item.To but removing these
did not allow it to work.
Code...
Dim strIndent
Sub PrintIDs(objCB)
For Each objCBControl In objCB.Controls
Item.Body = Item.Body & strIndent & objCBControl.ID & ": " &
objCBControl.Caption & vbCrLf
If objCBControl.Type = 10 Then
strIndent = strIndent & vbTab
PrintIDs objCBControl.CommandBar
If Len(strIndent) > 0 Then strIndent = Left(strIndent,
Len(strIndent) - 1)
End If
Next
End Sub
Sub Send_Click()
'MISSING FIELDS
if Item.UserProperties.Find("Staff Title").Value = "" then
Msgbox "Please enter the CSC's title",,"Missing Data"
Exit Sub
End if
if Item.UserProperties.Find("Staff name").Value = "" then
Msgbox "Please enter the Staff members name",,"Missing Data"
Exit Sub
End if
if Item.UserProperties.Find("Staff number").Value = "" then
Msgbox "Please enter the Staff number",,"Missing Data"
Exit Sub
End if
if Item.UserProperties.Find("Windows login").Value = "" then
Msgbox "Please enter the Windows Login of the staff member",,"Missing Data"
Exit Sub
End if
If Item.UserProperties.Find("Brand Required").Value = "" then
MsgBox "Select the Brand"
Exit Sub
End If
If Item.UserProperties.Find("CSCSite").Value = "" then
MsgBox "Select the Site"
Exit Sub
End If
if Item.UserProperties.Find("INeed").Value = "" OR
Item.UserProperties.Find("INeed").Value = "Please select from the drop box"
then
Msgbox "Please enter what the request is for",,"Missing Data"
Exit Sub
End if
'POPULATE THE TO FIELD
If Item.UserProperties.Find("Brand required").Value = "KNZ" then emailto =
"
[email protected]"
If Item.UserProperties.Find("Brand required").Value = "NBZ" AND
Item.UserProperties.Find("NBZModelSite").Value = "Wellington" then emailto =
"
[email protected]"
If Item.UserProperties.Find("Brand required").Value = "NBZ" AND
Item.UserProperties.Find("NBZModelSite").Value = "Auckland" then emailto =
"
[email protected]"
If Item.UserProperties.Find("Brand required").Value = "NBZ" AND
Item.UserProperties.Find("NBZModelSite").Value = "Both" then emailto = ""
If Item.UserProperties.Find("Brand required").Value = "Both" AND
Item.UserProperties.Find("NBZModelSite").Value = "Wellington" then emailto =
"
[email protected];
[email protected]"
If Item.UserProperties.Find("Brand required").Value = "Both" AND
Item.UserProperties.Find("NBZModelSite").Value = "Auckland" then emailto =
"
[email protected];
[email protected]"
If Item.UserProperties.Find("Brand required").Value = "Both" AND
Item.UserProperties.Find("NBZModelSite").Value = "Both" then emailto =
"
[email protected]; "
Item.To = emailto
Item.Send
End Sub