Thanks Andrew. That seq field setup works great. I created the string...
Quote:
Table {StyleRef 1 \s}.{Seq Table \s 1}
|
and then saved it as a building block call Table.
Code:
Sub InsertAutoTextEntry()
ActiveDocument.AttachedTemplate.BuildingBlockTypes(1).Categories("General").BuildingBlocks("Table").Insert Where:=Selection.Range, RichText:=True
End Sub
With this code I get a runtime error 5941. If I record the action, I get...
Code:
Sub Macro1()
Application.Templates( _
"C:\Users\jeffb\AppData\Roaming\Microsoft\Document Building Blocks\1033\16\Building Blocks.dotx" _
).BuildingBlockEntries("Table").Insert Where:=Selection.Range, RichText:=True
End Sub
Not sure what step I am missing?