View Single Post
 
Old 07-18-2022, 11:00 PM
mark99k's Avatar
mark99k mark99k is offline Windows 10 Office 2016
Novice
 
Join Date: Oct 2012
Location: California USA
Posts: 20
mark99k is on a distinguished road
Default

Ah sorry. This forum is about VBA (that is, macros). Are you familiar with those? What I posted is a VBA expression that could become part of a macro written to do what you want. A more complete version is below. It assumes you start with your cursor in the table.

If you don't yet know how to write macros, this may not make much sense. I've only just returned to this forum after several years away, so I'm unsure whether there's a beginner-level posting about (or a pointer to a site for learning) the basics of VBA. Reply back if you need help finding one. The learning curve for VBA is steep but short.

Code:
Sub AddDueDateBelowCreateDate()
Dim rng As Range, tbl As Table
Set tbl = Selection.Tables(1)
Set rng = tbl.Cell(1, 2).Range
rng.MoveEnd wdCharacter, -1
tbl.Cell(2, 2).Range.Text = DateAdd("d", 30, rng.Text)
End Sub
On your second question, yes, this macro would work regardless of whether the date is regular text or a result from the calendar ('Date Picker') Content Control
Reply With Quote