You have:
Dim AgeofPlan As Date
but you're passing 'DateDiff(yyyy, TheDate, Now)' to it, which is a number, not a date.
To insert the content into the document, bookmark the destination, then use code like the attached.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|