View Single Post
 
Old 04-01-2019, 03:24 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

In your sample document, there is an extra level of complexity - you tables are contained inside text boxes. Try this code
Code:
Sub ApplyTableStyle()
  Dim t As Table, aShp As Shape
  For Each t In ActiveDocument.Tables
    t.Style = "Light Shading - Accent 3"
  Next
  
  For Each aShp In ActiveDocument.Shapes
    For Each t In aShp.TextFrame.TextRange.Tables
      t.Style = "Light Shading - Accent 3"
    Next t
  Next aShp
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote