Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-21-2022, 12:43 PM
Souriane Souriane is offline Adding building block in bulk with *Formatting* Windows 10 Adding building block in bulk with *Formatting* Office 2019
Advanced Beginner
Adding building block in bulk with *Formatting*
 
Join Date: Feb 2017
Location: Quebec, Canada
Posts: 82
Souriane is on a distinguished road
Default Adding building block in bulk with *Formatting*

Hi!



I have been using a code (that, I believe, is from Greg Maxey?) which insert in bulk building blocks to a template that is later share with my co-workers. The titles and text for the building blocks are taken by the code in a table in a document. And when I write them in the table, I always make sure to use Normal style which is in Arial 12.

The problem is when we use the building blocks, they are inserted with the "Normal Style" of the document. So if the document's Normal style is in Times but the document was created in Arial, the block is added in Times.

All our documents are in Arial 12 and I want the building block to be also Arial 12.

What should I change to make it possible?

Here is a part of the code:
Code:
For ia = 1 To cTable.Rows.Count
      Set aPrompt = cTable.Cell(ia, 1).Range
      aPrompt.End = aPrompt.End - 1
      Set aTextPart = cTable.Cell(ia, 2).Range
      aTextPart.End = aTextPart.End - 1
      Set objBB = oTmpB.BuildingBlockEntries.Add(Name:=aPrompt, _
          Type:=wdTypeAutoText, Category:=sCategory, Range:=aTextPart)
   Next ia
Thank you for your help!

Souriane
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding building block in bulk with *Formatting* Cannot save Building Block templates with project grNadpa Word VBA 4 03-21-2022 07:18 AM
Adding building block in bulk with *Formatting* VBA temperamentally not finding building block template kateabode Word VBA 2 10-14-2018 08:35 PM
VBA Word - Building Block (AutoText) - Array - Replace Text with Specific Building Blocks jc491 Word VBA 7 01-03-2016 10:34 PM
Adding building block in bulk with *Formatting* How to share building block macros? rdross51 Word VBA 7 03-12-2015 08:59 AM
Building blocks show correctly in dropdown, but wrong building block populates in doc wordgirl123 Word 0 10-03-2013 08:30 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:29 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