Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 10-07-2019, 03:17 AM
Guessed's Avatar
Guessed Guessed is offline Want to copy & paste a table underneath itself x no. of time, table found through style heading name Windows 10 Want to copy & paste a table underneath itself x no. of time, table found through style heading name Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
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

You can't name the table itself but you can use other methods to identify particular tables.

For instance you can place a bookmark in a table and then use something along the lines of
ActiveDocument.Bookmarks("bmname").Range.Tables(1)

The beauty of using a bookmark is that it can't exist in more than one place so if you copy and paste that table, the copies won't also have the bookmark in them.

You can also iterate through the tables to find each one that matches your pattern. eg
For each aTable in ActiveDocument.Tables
if aTable.Style = "Fred" then 'do something

end if
Next aTable
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 

Tags
copy and paste, headings, table



Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking to copy select cells in table using dropdown list to paste to new table in another worksheet CaptainRetired Excel Programming 18 01-04-2018 07:22 PM
Want to copy & paste a table underneath itself x no. of time, table found through style heading name Is it possible to copy non-contiguous rows of a Table and paste them as a separate Table in Word? Joey Cheung Word Tables 1 08-12-2014 05:15 PM
Want to copy & paste a table underneath itself x no. of time, table found through style heading name Heading 1 and Table & Figures style mismatch ezrayst93 Word 5 07-21-2014 11:06 PM
Want to copy & paste a table underneath itself x no. of time, table found through style heading name Layered or Nested Table difficulty--can't edit the table underneath theheartsmaster Word Tables 1 12-10-2012 04:10 AM
How to have this Heading – Table of contents style? Jamal NUMAN Word 0 01-13-2011 06:02 PM

Other Forums: Access Forums

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