View Single Post
 
Old 01-27-2016, 02:25 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,366
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

The macro could be fairly simple. For example, suppose the 'Document Number' paragraph is the always first in the document and the table is always the last table in the document:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim StrTmp As String, i As Long
With ActiveDocument
  StrTmp = Replace(Split(.Paragraphs(1).Range.Text, ": ")(1), vbCr, "")
  With .Tables(.Tables.Count)
    For i = 0 To 5
      .Cell(5, i + 2).Range.Text = Split(StrTmp, "-")(i)
    Next
  End With
End With
Application.ScreenUpdating = True
End Sub
There's a bit of guesswork in the above regarding your table, as I'm not quite sure of its layout.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote