A large number of modes can be supported by multimode fibers. There are applications where higher order modes are preferred. Microbend intensity sensors are good examples. The sensitivity of these sensors is greatly increased if higher order modes are excited. In this work, a simple method to excite higher order modes preferentially is suggested. It consists of thin-film gratings deposited directly onto the fiber end. By controlling the film thickness or transparency of the grating structure, a desired transmission coefficient T(r,Phi) is synthesized. The desired mode can be excited preferentially by incident Gaussian beams without the aid of additional optical components. Binary intensity and binary phase gratings have been studied. Numerical investigation reveals that the phase gratings are more effective for the preferential excitation of higher order modes than the intensity gratings. In fact, by using binary phase gratings and in optimal excitation conditions as much as 81.1, 76.9, 74.6, 73.3, and 72.3% of the power in the incoming, linearly polarized, fundamental Gaussian beam can be converted to LP(02), LP(03), LP(04), LP(05), and LP(06) modes, respectively, excluding Fresnel loss.