There was a recent trailer (within last year) for a movie about a romance based on a book the guy wrote. But it turns out the book isn't his. He found it in an attic?? I thought it was Silver Linings Playbook, but that wasn't it. I thought the title had the word "book" in it but I have yet to be able to find it.
I believe that you are looking for The Words from 2012. It stars Bradley Cooper, Zoe Saldana, Jeremy Irons and Dennis Quaid. It's a story within a story about man who finds a manuscript and through a mishap ends up passing it off as his own. It causes much strife between he and his wife and the real writer of the manuscript. Dennis Quaid plays a writer who is giving a reading of the book. Bradley Cooper and Zoe Saldana play the husband (who finds the manuscript) and his wife. Jeremy Irons plays the actual author. The trailer can be found on Youtube