What is the significance of building blocks in word




















The BuildingBlocksEntries collection contains all the building blocks for a template. Therefore, the preferred way to add new building blocks programmatically is to use the Add method for the BuildingBlockEntries collection. The following code example collapses the current selection, creates a range and specifies the text for the range, and then adds the selection as a custom building block to the collection of building block entries in the template attached to the current document.

As mentioned previously, you can add an unlimited number of categories. However, there is no Add method for the Categories collection.

Therefore, to add a new category to the collection, you need to add a new building block. For example, in the previous code sample, if the "Book Titles" category does not exist when you run the code, Word adds it to the Categories collection. At some point you will want to access one of the building blocks that you have, whether that is a custom building block or one of the built-in building blocks.

You could use the BuildingBlockEntries collection; however, because building blocks can share the same name, you would need to identify the type and category for the building block before knowing which one you want returned. Therefore, the best way to access existing building blocks is through the BuildingBlocks collection. The following code example accesses the building block that you added in the previous code example. After you have access to a building block, use the Insert method of the BuildingBlock object to insert it into a document.

The following code example expands the previous code sample by adding a line for inserting the building into the active document at the Insertion Point or for replacing the selected text, if text is selected.

When you insert a building block by using the ribbon, Word automatically determines certain things about the building block, such as where to insert it; however, when you insert a building block through the object model, none of this built-in intelligence automatically happens. For example, when you insert a header building block by using the ribbon, Word automatically determines to replace the existing header. When inserting the same header building block by using the object model, you need to explicitly specify where to place the building block text.

If you combine building blocks with content controls, you can filter which building blocks a user can access.

You do this using a content control and an event. This event has a parameter for the active content control. You can determine whether the content control is a building block content control. If it is, you use the BuildingBlockType property and the BuildingBlockCategory property to identify which type and category to use to filter the list of building blocks that are available for the content control.

This specifies which building blocks show up in the drop-down list in the content control header. The following code example assumes that there is at least one content control in the document. If the content control is a building block content control, the list of building blocks displayed in the building block list in the content control header includes only those added by using the AddCustomBuildingBlock subroutine shown earlier in this topic.

Microsoft Word is the most popular word processing software in the world. This tip applies to Microsoft Word , , , , , and Word in Office With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates , a computer and publishing services company.

Learn more about Allen When printing a worksheet, you may want to rotate the output on the page to fit a certain orientation. Excel doesn't Want to delete a bunch of rows in a worksheet based on the value in a certain cell of each row?

There are a couple of In putting together a workbook, you may develop a worksheet that acts as an index, to contain links that lead to other This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Word's Building Blocks can be a great tool to improve your productivity when writing.

Depending on the type of writing Building Blocks can be a powerful timesaver when developing your documents. Being able to delete multiple Building Blocks Creating custom Building Block entries is not only extremely helpful, but very easy. This tip explains how. Enter your address and click "Subscribe.

Your e-mail address is not shared with anyone, ever. Maximum image size is 6Mpixels. Images larger than px wide or px tall will be reduced. This is known as a Quick Part or Building Block in word. Quick Parts is a feature in Word that lots you create, store and reuse pieces of content. These Quick Parts are also known as Building Blocks. Word Building Blocks can be pieces of reusable text, images or objects that you can freely reuse in your documents.

They can be made up of anything, all the way from a simple line of text to entire cover pages made of text and images. If you want to learn more about how to format your text using the ruler and paragraph tools , read our guide.

The Building Block will keep it ready for you.



0コメント

  • 1000 / 1000