As the effects of climate change and urbanisation intensify, liveability and comfort in outdoor spaces decrease. Because of large spaces exposed to solar radiation and low crossing of airflows, courtyard buildings are extremely vulnerable in this regard. However, there are significant gaps in the literature on outdoor comfort in courtyards, especially regarding the effect of border configuration (including gap position and features), as well that of tree density. The study proposes a methodology—to be used during preliminary design—to compare the effect of alternative scenarios for courtyard buildings on outdoor microclimate, varying both the building perimeter configuration and courtyard vegetation layout. A matrix is set to combine the two variables and select relevant scenarios, which are then simulated in ENVI-met focusing on air temperature, wind speed and physiological equivalent temperature (PET). A case study in Bologna, Italy (humid subtropical climate) is presented as an example of the implementation. The resulting outdoor microclimate maps and frequency diagrams are compared and discussed. It emerges that both variables have a role in outdoor comfort: while gap configuration affects air temperature more (up to a difference of 1 °C), tree density impacts PET by up to 2 °C difference. The methodology can be replicated in several other contexts to support the optimisation of courtyard building design from the early stages.