View Single Post
 
Old 10-18-2013, 05:18 AM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,590
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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.
Attached Files
File Type: doc DateDiff.doc (50.5 KB, 47 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote