#1
|
|||
|
|||
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 |
#2
|
|||
|
|||
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. |
|
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 |
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 |