![]() |
#1
|
|||
|
|||
![]()
Hi there,
I have a word doc that acts as a contract for work to be done. I would like to automate the date field of the payment schedule. The date I enter is the job date and exists in a table cell. In a second table I need to calculate (job date - 14 days) and (job date - 60 days). I've wrestled with both google and word's help and I'm totally skunked. Can anyone set me straight? ...Mike |
#2
|
|||
|
|||
![]()
Mike,
The answers depend what type of form and fields that your are using. For a pure field code solution see: DateCalc.zip at http://www.gmayor.com/downloads.htm You can also use VBA to adjust dates: Sub ScratchMacro() 'A quick macro scratch pad created by Greg Maxey Dim oTbl As Word.Table Set oTbl = ActiveDocument.Tables(1) Dim oDate As Date 'Will error if cell text is not a valid date. oDate = Left(oTbl.Cell(1, 1).Range, Len(oTbl.Cell(1, 1).Range) - 2) oTbl.Cell(1, 2).Range.Text = DateAdd("d", 60, oDate) oTbl.Cell(1, 3).Range.Text = DateAdd("d", -15, oDate) End Sub |
#3
|
|||
|
|||
![]()
Thanks, I'll take a look and post back if I get stuck. There's no form though. I simply have a date in one cell, and need to calculate dates in other cells. Hopefully automatically
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Excel Pivot Table Calculated Field | BertLady | Excel | 0 | 05-21-2012 10:51 AM |
Inserting a table | Katelyn | Outlook | 0 | 04-05-2012 09:39 AM |
How can I make a cell color RED under the Today's date cell? | Learner7 | Excel | 2 | 07-08-2010 12:52 AM |
![]() |
louq | Word | 1 | 10-22-2009 09:29 AM |
Auto-populate an MS Word table cell with text from a diff cell? | dreamrthts | Word Tables | 0 | 03-20-2009 01:49 PM |