It is difficult to see how
 With OutlookMail
     EmailTo = .DataFields("StudentNumber")
     ReplyToTeachers = .DataFields("Teacher")
could work.

'.Datafields' is not related to OutlookMail.