View Single Post
 
Old 08-31-2017, 05:13 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

It's not clear from your post how you're naming the table. That said, what you want is easily done if you simply bookmark the tables concerned, using code like:
Code:
Sub Prior()
  Call UpdateBookmark("Prior", "There were no prior audit issues during this engagement." & vbCr)
End Sub

Sub Reg()
  Call UpdateBookmark("Reg", "There were no regulatory issues during this engagement." & vbCr)
End Sub

Sub UpdateBookmark(StrBkMk As String, StrTxt As String)
Application.ScreenUpdating = False
Dim BkMkRng As Range
With ActiveDocument
  If .Bookmarks.Exists(StrBkMk) Then
    Set BkMkRng = .Bookmarks(StrBkMk).Range
    With BkMkRng
      .Tables(1).Delete
      .Text = StrTxt
      .Style = "Body Text"
    End With
    .Bookmarks.Add StrBkMk, BkMkRng
  End If
End With
Set BkMkRng = Nothing
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote