![]() |
|
#1
|
||||
|
||||
![]()
When two inline tables butt against each other, they join to become one table.
The code, as written, is duplicating the content of the second table. However, it is doing this immediately below the second table. (Without testing the code) I would expect this to be joined with Table(2) and hence Table(2) now includes the previous and duplicated content. If you run the macro again, you would expect that pair to double again (ie grow exponentially). If you think the code is duplicating two separate tables, perhaps visually it appears as two tables but is actually just one. If you use the Select Table command, you should be able to see where a table actually starts and finishes. The code could be amended to ensure there is a paragraph between the original and duplicated table to avoid the two accidently becoming merged. If the command button is pressed repeatedly, where do you want the new duplicate added? It could go after Table 2 always but then it sits between the original and the first duplicate (which might not be what you wanted). FWIW, I believe you should be using a Repeating Content Control do be doing this without needing a macro. See this youtube video for an example of how to do this.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
![]() |
Tags |
macro, macro error |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
What's new in Word 2019, Excel 2019 and Outlook 2019 and Why upgrade to Office 2019 is recommended? | einfomail | Office | 0 | 07-25-2019 11:49 AM |
PgUp/PgDn not working as expected in Word 2019; macro workaround? | AmyJSchneider | Word VBA | 0 | 01-19-2019 03:45 PM |
![]() |
danjoe | Word VBA | 3 | 10-19-2017 05:49 AM |
Macro does not run properly | dherr | Word VBA | 2 | 02-19-2015 08:50 AM |
Word 2000 Macro not working properly | brianlb | Word VBA | 1 | 07-01-2009 07:04 AM |