Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-16-2023, 03:06 AM
tonse tonse is offline Building Block Text into a variable Windows 7 64bit Building Block Text into a variable Office 2010
Novice
Building Block Text into a variable
 
Join Date: Aug 2020
Posts: 2
tonse is on a distinguished road
Default Building Block Text into a variable

I am working on VBA code that composes a document out of pieces of other information.
The overall information has to stay in foundation. Only the specified pieces need to be added to the document. Once generated it most be possible to add new pieces of Information to the document on a later stage.

Currently i am using Userfrom with listboxes. Users Can select buildingblocks and cetagories from another template that stays in the foundation. The buildingblocks are inserted in the document. This is working

But: Aside from the buildingblock content that eventually ends up at a customer our staff needs some Side-Information to keep in mind. This information is different for each buildingblock.
My Solution would be:
- Have two type of Buildingblocks. They both have the same categories


- In Type 1 is the actual Buildingblock information that is being inserted in the document
- In Type 2 is the "side" information, that should be visible in an Editbox on the userform. So when an employee selects a BuildingBlock from a listbox, he sees the remarks for that buildingblock
- Unfortunately the comments part of a buildingblock is to limited in terms of number of characters


So the questions are:
- What is the best way to get buildingblock text into an editbox on a userform
- Or is there another/better way to approach this problem
Reply With Quote
  #2  
Old 11-16-2023, 06:10 AM
Italophile Italophile is offline Building Block Text into a variable Windows 11 Building Block Text into a variable Office 2021
Expert
 
Join Date: Mar 2022
Posts: 338
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

For a BuildingBlock that only contains text you can use the Value property - see BuildingBlock.Value property (Word) | Microsoft Learn

Bear in mind that any formatting will be lost.

Use the corresponding custom gallery to hide the instructions from the user.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Reference a Building block gallery control from another Field and insert text using If logic Flynny Word VBA 3 07-30-2018 08:34 PM
VBA Word - Building Block (AutoText) - Array - Replace Text with Specific Building Blocks jc491 Word VBA 7 01-03-2016 10:34 PM
Run Time Error '91': Object variable or With block variable not set using Catalogue Mailmerge Berryblue Mail Merge 1 11-13-2014 05:36 PM
Building Block Text into a variable Run-time error 91 object variable or with block variable not set JUST ME Word VBA 4 03-25-2014 06:56 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 04:54 PM.


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