Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-08-2016, 10:23 AM
MAtkins MAtkins is offline Word 2016 how can I detect text changes? Windows 10 Word 2016 how can I detect text changes? Office 2016
Novice
Word 2016 how can I detect text changes?
 
Join Date: Jul 2016
Posts: 13
MAtkins is on a distinguished road
Default Word 2016 how can I detect text changes?

I'm trying to:
• copy text from a table cell


• to another cell on another page,
• after the user completes typing text into the first cell.

I can't figure out how to set up an event listener to determine when the text in the 1st cell has changed, or even if that's feasible in Word 2013+.

Can I do this? If so, how?
Reply With Quote
  #2  
Old 08-08-2016, 05:45 PM
Guessed's Avatar
Guessed Guessed is offline Word 2016 how can I detect text changes? Windows 10 Word 2016 how can I detect text changes? Office 2013
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
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

I think the best solution would be to place a content control in the table cell and use a ContentControl OnExit macro.

But if you are simply to trying to replicate the same content in two places, you don't even need a macro if you are using Content Controls mapped to the same xml data. See http://gregmaxey.com/word_tip_pages/..._controls.html
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 08-09-2016, 01:10 PM
MAtkins MAtkins is offline Word 2016 how can I detect text changes? Windows 10 Word 2016 how can I detect text changes? Office 2016
Novice
Word 2016 how can I detect text changes?
 
Join Date: Jul 2016
Posts: 13
MAtkins is on a distinguished road
Default

Guessed:
Thanks for your help but . . .

I did learn how to map the 2 controls but it's acting erratically.
I created an xml doc:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<AddressXMLNode xmlns="Inspectagator Client Address">
    <Address></Address>
</AddressXMLNode>
I imported it (XML Mapping Pane) and I created 2 controls mapped to it.
Each is in a separate table BUT
The first cell is Align Left, the second one is Align Center.
Every time I change one, the other is changed too.
I can't make it keep the text to the left in the 1st control & in the center on the 2nd control.

I need the user to be able to enter the address (RTF) into the first at the top of the document and that text is automatically entered into the second cell at the bottom of the doc.
BUT - without changing the formatting (namely the alignment).

Is there a way to do this?
Reply With Quote
  #4  
Old 08-09-2016, 02:18 PM
gmaxey gmaxey is offline Word 2016 how can I detect text changes? Windows 7 32bit Word 2016 how can I detect text changes? Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,429
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

Try the InstaMap feature of my CC Tools Add-in. Just give the CCs the same title and use the option to link like titled controls.

Left align the top CC and center align the bottom one

http://gregmaxey.com/word_tip_pages/...rol_tools.html
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #5  
Old 08-09-2016, 05:47 PM
Guessed's Avatar
Guessed Guessed is offline Word 2016 how can I detect text changes? Windows 10 Word 2016 how can I detect text changes? Office 2013
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
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

I think if the CCs are Rich Text CCs then the formatting of individual paragraphs is contained in the xml and therefore you can't format the contents differently in the two instances.

Instead, you will need to map the xml to a pair of Plain Text Content Controls and ensure both allow carriage returns. You can then style the two instances differently. The 'carriage returns' actually become line breaks (aka soft returns) so you can't apply different styles to different paragraphs within the CC.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #6  
Old 08-10-2016, 06:13 AM
gmaxey gmaxey is offline Word 2016 how can I detect text changes? Windows 7 32bit Word 2016 how can I detect text changes? Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,429
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

True. What I was suggesting was placing the CCs in a left and centered aligned table cell.
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #7  
Old 08-10-2016, 06:30 AM
MAtkins MAtkins is offline Word 2016 how can I detect text changes? Windows 10 Word 2016 how can I detect text changes? Office 2016
Novice
Word 2016 how can I detect text changes?
 
Join Date: Jul 2016
Posts: 13
MAtkins is on a distinguished road
Default

Thanks for your replies.
I haven't tried your suggestions yet.
The CCs are in left & center aligned table cells.
Word apparently realigns the 2nd one when text is put into the 1st one.
Reply With Quote
  #8  
Old 08-10-2016, 06:44 AM
gmaxey gmaxey is offline Word 2016 how can I detect text changes? Windows 7 32bit Word 2016 how can I detect text changes? Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,429
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

If you want to send me the document I will have a look. Just sent website feedback and then attach after I reply.
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #9  
Old 08-10-2016, 04:42 PM
MAtkins MAtkins is offline Word 2016 how can I detect text changes? Windows 10 Word 2016 how can I detect text changes? Office 2016
Novice
Word 2016 how can I detect text changes?
 
Join Date: Jul 2016
Posts: 13
MAtkins is on a distinguished road
Default

gmaxey: Thanks for the offer but it's proprietary, owned by my client.
He's pretty uptight about who sees it.

I still haven't had time to work with it today.
Reply With Quote
  #10  
Old 08-10-2016, 05:54 PM
MAtkins MAtkins is offline Word 2016 how can I detect text changes? Windows 10 Word 2016 how can I detect text changes? Office 2016
Novice
Word 2016 how can I detect text changes?
 
Join Date: Jul 2016
Posts: 13
MAtkins is on a distinguished road
Default

The plain text controls seem to have worked.
I'm not sure what 'plain text' means in Word but I'm hoping the control text is taking on the styling of the cell it's in.

Thanks for your help.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 2016 how can I detect text changes? Visio 2016 diagrams embeded in word 2016 not drawing properly stubbo66 Visio 2 08-24-2016 05:58 PM
Word 2016 how can I detect text changes? Creating multiple layers of hidden text in a Word 2016 document? DroopyRise Word 1 07-03-2016 04:19 PM
Mac 2016 - convert text to image? puffin PowerPoint 0 05-26-2016 02:46 PM
Word 2016 mac text not colouring propperly GAMIE64 Word 1 04-29-2016 06:18 AM
2016 Word show text boundaries Kochanski Word 1 09-30-2015 07:16 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:26 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