Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-23-2021, 07:32 PM
Guessed's Avatar
Guessed Guessed is online now Word 2019 will not properly run macro Windows 10 Word 2019 will not properly run macro Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,164
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

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
Reply With Quote
Reply

Tags
macro, macro error



Similar Threads
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
Word 2019 will not properly run macro Macro Enabled Word Doc Does not Properly Work on Different Machine 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

Other Forums: Access Forums

All times are GMT -7. The time now is 04:15 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft