View Single Post
 
Old 02-12-2020, 08:54 AM
gmaxey gmaxey is online now Windows 10 Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,422
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

To insert a named building block from the Built-In Building Blocks.dotx file you can use:

Code:
Sub InsertBuildingBlock()
Dim oTmp As Template
  Templates.LoadBuildingBlocks
  For Each oTmp In Templates
    If UCase(oTmp.Name) = "BUILT-IN BUILDING BLOCKS.DOTX" Then
      Exit For
    End If
  Next oTmp
  If Not oTmp Is Nothing Then
    oTmp.BuildingBlockTypes(wdTypeTables).Categories("Built-in").BuildingBlocks("With Subheads 1").Insert Where:=Selection.Range, RichText:=True
  End If
lbl_Exit:
  Exit Sub
End Sub

You could create your own custom building block in that template or gallery with the correct title and number of rows/columns.
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote