Creating a 'Smart' Document