Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-15-2021, 07:34 AM
txacoli txacoli is offline Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Windows 10 Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Office 2019
Novice
Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot
 
Join Date: Sep 2021
Posts: 9
txacoli is on a distinguished road
Default 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!!
Reply With Quote
  #2  
Old 09-15-2021, 10:44 AM
Charles Kenyon Charles Kenyon is offline Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Windows 10 Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,081
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

It is called a Mapped Content Control. See:
Reply With Quote
  #3  
Old 09-15-2021, 02:45 PM
txacoli txacoli is offline Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Windows 10 Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Office 2019
Novice
Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot
 
Join Date: Sep 2021
Posts: 9
txacoli is on a distinguished road
Default

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?
Reply With Quote
  #4  
Old 09-15-2021, 08:18 PM
Charles Kenyon Charles Kenyon is offline Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Windows 10 Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,081
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

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.
Reply With Quote
  #5  
Old 09-15-2021, 08:42 PM
Guessed's Avatar
Guessed Guessed is offline Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Windows 10 Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
  #6  
Old 09-16-2021, 01:13 AM
txacoli txacoli is offline Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Windows 10 Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Office 2019
Novice
Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot
 
Join Date: Sep 2021
Posts: 9
txacoli is on a distinguished road
Default

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.
Reply With Quote
  #7  
Old 09-16-2021, 02:59 AM
gmayor's Avatar
gmayor gmayor is offline Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Windows 10 Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
Reply With Quote
  #8  
Old 09-16-2021, 06:29 AM
txacoli txacoli is offline Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Windows 10 Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Office 2019
Novice
Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot
 
Join Date: Sep 2021
Posts: 9
txacoli is on a distinguished road
Default

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.
Reply With Quote
  #9  
Old 09-16-2021, 07:02 AM
Guessed's Avatar
Guessed Guessed is offline Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Windows 10 Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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>
Then open your Word document and embed that xml file in the document by going to Developer Tab > XML Mapping Pane. Click on the custom xml part dropdown in the pane to ‘Add a new part’ and navigate to the xml file to load it inside this document.

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
Reply With Quote
  #10  
Old 09-16-2021, 02:06 PM
txacoli txacoli is offline Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Windows 10 Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Office 2019
Novice
Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot
 
Join Date: Sep 2021
Posts: 9
txacoli is on a distinguished road
Default

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.
Reply With Quote
  #11  
Old 09-16-2021, 04:03 PM
Guessed's Avatar
Guessed Guessed is offline Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Windows 10 Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
  #12  
Old 09-16-2021, 04:05 PM
txacoli txacoli is offline Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Windows 10 Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Office 2019
Novice
Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot
 
Join Date: Sep 2021
Posts: 9
txacoli is on a distinguished road
Default

Brilliant. Thank you again!!
You’re a true gent.
Reply With Quote
  #13  
Old 09-17-2021, 09:10 AM
Charles Kenyon Charles Kenyon is offline Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Windows 10 Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,081
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

See also: Enhanced Document Properties AddIn
Reply With Quote
Reply

Tags
bounding box, content controls

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Auto Create/Format a Word Document based on Check Boxes shanerolle Word VBA 21 05-13-2020 10:42 AM
Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Calculate week in Word document based on date entered into same document ArviLaanemets Word VBA 4 11-18-2019 12:25 AM
Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot 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
Help required to create Bounding Boxes in Word Document please - repeating data entered in one spot Repeating Data in a Document sumblnddude Word 5 11-24-2017 08:01 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:47 AM.


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