|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot
Hi everyone
I have a very simple (for most people!) query about how to create a bounding box in a Word document. I'm adapting a current Word document which already has some bound boxes in and was created by someone else. I want to use these because the document uses the same fields at different points throughout the document and I don't want users to have to keep typing or pasting the same information in over and over again. I can't seem to do it. When I think it's sorted, something goes wrong and I'm back to square one. There's very little help on the internet too, unless I'm searching for the wrong thing (I know it's about Content Control). Can someone either guide me through the best way to put this information into a document (you may have a better way to do it) or share a good webpage that guides a relative simpleton like me through the process please? Please bear in mind that I know nothing about code, so it needs to be a straightforward process. Thank you!! |
#2
|
|||
|
|||
It is called a Mapped Content Control. See:
|
#3
|
|||
|
|||
Thanks Charles
I did actually find this page earlier and spent about 2 hours trying to make it work for me. I would get one element sorted and then add another, which would sometimes mess up the first one. When I thought I had it all correct, it then messed up a completely unrelated bounding box that was already in the document that I didn’t need to change, which threw me completely….which is when I asked for help. Is there any other way to do this other than through a Mapped Content Control process? |
#4
|
|||
|
|||
Did you read both pages?
The first one talks about controls already in your document, built-in to every document that get renamed. The second discusses mapped controls in general. The first has links to at least two utilities that can create these. You cannot copy the second kind from one document to another and have them remain mapped. This is the best and simplest way. Anything else will be much more complex. |
#5
|
||||
|
||||
The first link that Charles posted gives you alternatives but Mapped CCs is easily the best way to do this.
If you are having problems then you need to be more specific about what exactly you are doing that is 'messing up completely unrelated bounding boxes'. Perhaps post a sample document and describe the steps that 'break it'. Are you using Rich Text CCs - they can be problematic. Avoid this CC type if you are having issues with them or post a doc that shows the issue.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#6
|
|||
|
|||
Thanks Andrew
The problem with the doc I’m using is that there is sensitive information in there, so I can’t share it, otherwise I would have done. I’ll try again and avoid the rich text CC’s and will re-read the first link Charles shared to see if I can get through the block I have. That will have to be over the weekend as I don’t have time in the week to sort it, so fingers crossed. |
#7
|
||||
|
||||
If you usehttps://www.gmayor.com/insert_content_control_addin.htm to insert a content control, the content of which you want repeated elsewhere, and check the map option, you can copy and paste that control anywhere you wish in the document. Whatever you enter in one of the controls will be repeated in the others. You don't need to know anything about the mapping other than it exists.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#8
|
|||
|
|||
So, I've created a test document (attached) to show you what I've (sort of) done and so you can see that it's not working and hopefully point me in the direction of where I've gone wrong.
The reports we have use the same information in them about 4 - 5 different times, but not altogether and not all in the same place. Don't ask me why - it's a work thing!! As it's a work thing, I can't download the Content Control addin that Graham mentioned as my work restricts this. Staff have to physically input this information and it drives everyone mad, so I'm trying to do something about it. I've created this test2 document using information gathered from the internet. I've done everything to the letter and yet when you put information in the first section, it doesn't duplicate it in the second. If anyone can tell me what stupid mistake I'm making, I will be eternally grateful. Thanks Last edited by txacoli; 10-19-2021 at 03:46 PM. |
#9
|
||||
|
||||
None of those CCs are mapped. You also don't have a custom xml file in the document to map them to.
Start by creating an xml (text) file in Notepad with contents like this. Save it to your desktop and include any other element names you need in your real document. Code:
<?xml version="1.0" encoding="utf-8"?> <Root xmlns="http://txacoli.test"> <StaffMember /> <StaffNumber /> <WorkingArea /> <DateOfBirth /> </Root> Next you map the xml elements to each of the Content Controls on the page. Select a Content Control, then in the XML Mapping Pane, while showing that particular xml part, right click on the relevant field and choose to 'Map to Selected Content Control' Then you can change one of your instances and as your cursor leaves the CC, the other ones linked to the same xml field will update instantly.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#10
|
|||
|
|||
Guessed - thank you SO MUCH for taking the time to help me out. I'm not a computer expert at all (as you can probably see), but a keen amateur, totally self-taught and who likes to learn extra things as time passes. When I come up against something I need to do but don't know, I seek help and it's kind people like you who take the time to respond who make it all worthwhile.
This has worked PERFECTLY! I have one final question if you don't mind? The document will be on a Sharepoint drive for all the team to use - and there are about 100 of us. Should this section..... <Root xmlns=http://txacoli.test> ......point to somewhere on the Sharepoint drive, or is it enough to embed it into the document so that anyone who opens the document will be able to use it? Thank you for your help. |
#11
|
||||
|
||||
The namespace is completely flexible and you can call it anything. It doesn't rely on other things existing somewhere despite the 'url' appearance. It merely serves as a unique name so the document and developer (you) can identify which embedded xml file is being used to connect to the CCs to.
Once the xml file is embedded in the document, the document is completely standalone and doesn't care who else accesses or edits the document. It won't matter that the document is stored on Sharepoint. You won't need to maintain the external xml file and it can be deleted once it has been loaded to the document. Note that if you paste these mapped CCs into a different document that doesn't contain the xml then the CCs will behave as if they are not mapped.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#12
|
|||
|
|||
Brilliant. Thank you again!!
You’re a true gent. |
#13
|
|||
|
|||
See also: Enhanced Document Properties AddIn
|
Tags |
bounding box, content controls |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Auto Create/Format a Word Document based on Check Boxes | shanerolle | Word VBA | 21 | 05-13-2020 10:42 AM |
Calculate week in Word document based on date entered into same document | ArviLaanemets | Word VBA | 4 | 11-18-2019 12:25 AM |
Bounding Boxes | BarnabyS | Word | 7 | 05-22-2019 06:12 AM |
Move cursor up several lines after form data entered in document | zanestein | Word VBA | 6 | 05-23-2018 04:01 AM |
Repeating Data in a Document | sumblnddude | Word | 5 | 11-24-2017 08:01 AM |