![]() |
#6
|
||||
|
||||
![]()
OK. Add the following to the ThisDocument module of the document
Code:
Option Explicit Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean) If ContentControl.Title = "Issue Date" Then If Not ContentControl.Range.Text = ContentControl.PlaceholderText Then ActiveDocument.SelectContentControlsByTitle("Expiry Date").Item(1).Range.Text = _ DateAdd("m", 12, CDate(ContentControl.Range.Text)) End If End If End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
newi1 | Word VBA | 3 | 04-22-2016 07:02 PM |
Autofill dates - how can I get the same date and consecutive dates? | Exhale | Excel | 3 | 04-05-2016 03:11 AM |
![]() |
lenoble22 | Word | 1 | 01-16-2014 12:20 PM |
How to change dates automatically | PaperBuster | Word | 5 | 09-24-2012 09:31 PM |
How to change number format of dates | ketanco | Project | 1 | 09-11-2012 02:34 PM |