Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 02-12-2020, 08:54 AM
gmaxey gmaxey is offline VBA coding to insert a word table using  quickparts and insert table menu Windows 10 VBA coding to insert a word table using  quickparts and insert table menu Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
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
 

Tags
insert word table, vba, word vba macro



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA coding to insert a word table using  quickparts and insert table menu Insert Excel cells Word Table BUT Fit? markg2 Word Tables 9 02-09-2020 02:25 PM
Insert a Excel table in an existing PowerPoint table Vallin PowerPoint 1 03-09-2015 06:25 AM
VBA coding to insert a word table using  quickparts and insert table menu Insert a Word Table into an Excel cell Kapoof Excel 1 02-18-2014 02:12 PM
VBA coding to insert a word table using  quickparts and insert table menu Word 2007: Insert Para after Table rphox2003 Word 10 03-06-2013 11:13 PM
Insert table in document - automatically updates second table in summary? Mechanic Word 2 08-01-2012 09:44 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:55 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft