extract the CopyNotepad into a function.
Maybe this is the final way to do that.