Current methods for analysing immunohistochemistry are labour-intensive and often confounded by inter-observer variability. Analysis is time consuming when identifying small clinically important cohorts within larger samples. This study trained QuPath, an open-source image analysis program, to accurately identify MLH1-deficient inflammatory bowel disease-associated colorectal cancers (IBD-CRC) from a tissue microarray containing normal colon and IBD-CRC. The tissue microarray (n= 162 cores) was immunostained for MLH1, digitalised, and imported into QuPath. A small sample (n= 14) was used to train QuPath to detect positive versus no MLH1 and tissue histology (normal epithelium, tumour, immune infiltrates, stroma). This algorithm was applied to the tissue microarray and correctly identified tissue histology and MLH1 expression in the majority of valid cases (73/99, 73.74%), incorrectly identified MLH1 status in one case (1.01%), and flagged 25/99 (25.25%) cases for manual review. Qualitative review found five reasons for flagged cores: small quantity of tissue, diverse/atypical morphology, excessive inflammatory/immune infiltrations, normal mucosa, or weak/patchy immunostaining. Of classified cores (n= 74), QuPath was 100% (95% CI 80.49, 100) sensitive and 98.25% (95% CI 90.61, 99.96) specific for identifying MLH1-deficient IBD-CRC; κ = 0.963 (95% CI 0.890, 1.036) (p< 0.001). This process could be efficiently automated in diagnostic laboratories to examine all colonic tissue and tumours for MLH1 expression.