Adapt textbox in different file formats