Buildings account for approximately 40% of the global energy consumption and 36% of total carbon dioxide emissions. At present many efforts are underway to reduce energy consumption and carbon footprint of buildings by optimizing their performance. Building envelope elements have a major impact on the performance of buildings. However, the best combination of the building envelope elements for optimizing the performance of buildings is difficult to determine and is not known. Building performance analysis is mostly done through energy modelling by using a whole building simulation tool. However, this is a slow and a tedious process, and generally only a few cases are evaluated in a large range of possible scenarios. By combining a generic optimization scheme with energy modelling, the best combination of building envelope elements can be determined and, thereby, it is possible to optimize the performance of buildings successfully subject to predefined constraints. This paper describes how the performance of an office building located in the suburbs of Colombo, Sri Lanka is optimized in terms of building envelope elements through combined energy modelling and generic optimization. The optimized envelope design with its efficient utilization of daylight, not only reduces the annual energy consumption substantially, but also leads to better thermal comfort for the occupants.