Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-08-2011, 10:17 PM
macropod's Avatar
macropod macropod is offline Copy/Paste/Delete Table & Section etc. Windows 7 32bit Copy/Paste/Delete Table & Section etc. Office 2007
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi flds,
I've tested the code. The error occurs when the source document has nothing before the first table. Please note that I only made the minimum changes necessary to integrate the code with what you asked for. Reworking the code to handle these conditions correctly will take a small amount of effort - but not today.

On reviewing the code I also found that (aside from the fact that it moves the tables to a new Word document instead of to an Excel workbook) a number of variables weren't defined and the code copies the paragraph following the table to the new document as well. Is that what you wanted? As for moving Word tables to Excel, whilst that's not all that difficult to do in principle, retaining the formatting gets complicated, especially if the Word table has merged cells.



As for the 'Appendix' Section you referred to, do all documents have one? Do the appendices only ever span one Section? Whatever the case, it would probably make sense to process the appendices before deleting the Section breaks.

I've also updated the 'Main' sub to handle documents that may have 0 and >1 TablesOfContents. Finally, contrary to what I had expected to happen, the code isn't deleting the tables in the source document. It will do so if you change:
SrcDocTableRange.Delete
to:
SrcDocTable.Delete
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy/Paste/Delete Table & Section etc. copy and paste not working Ellie Word 3 11-07-2013 02:23 PM
Can't copy paste irenasobolewska Office 2 10-26-2012 05:09 PM
Copy - Paste between 2 tables rod147 Excel 1 10-22-2009 08:21 PM
Copy & paste low resolution worriedme Drawing and Graphics 0 06-01-2009 03:05 AM
Copy/Paste/Delete Table & Section etc. Copy and paste special Dace Excel 2 02-16-2009 12:18 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:29 AM.


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