![]() |
|
#3
|
|||
|
|||
|
Or if you really wanted to play around with ranges, but much less readable/understandable than above
Code:
Sub UpdateMyTips()
Dim myNewTip As Long
Dim myOldTotal As Long
With ActiveDocument.Paragraphs(2).Range.Words(1)
With .Previous(unit:=wdParagraph).Words(1)
myNewTip = CLng(.Text)
.Text = " " & vbCrLf
End With
myOldTotal = CLng(.Words(1).Text)
.Words(1).Text = CStr(myNewTip + myOldTotal) & " "
.Paragraphs(1).Range.InsertAfter Text:=myNewTip & " " & Format(Now(), "DDDD, MMMM d, yyyy") & vbCrLf
End With
End Sub
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Addition
|
James__S | Word | 1 | 08-18-2016 06:20 PM |
Addition of new colors
|
marif300 | Project | 3 | 05-20-2016 07:32 AM |
Addition Formula is Giving a Date!!!
|
MikeM3 | Excel | 9 | 01-15-2016 02:41 AM |
Need tips for creating a specific word format
|
DomDom | Word | 5 | 09-24-2014 01:24 AM |
Putting a horizontal line in a Word Document -- should be simple, right?
|
biotechguy | Word | 4 | 05-10-2010 11:58 AM |