In a great tip from Allen Wyatt who is a great source of info, I thought that in a situation where time was of the essence, this would be great to know.
You might have the need to use the tables in another document or you wanted to work on the tables separately (Updating them) while someone else worked on the textual aspect of a large document.
A macro will do the trick. It will extract all of the tables and in between each one, it will place a blank line.
Under the Developer Tab go to "Macros" . Create a name (Copy Tables) and insert the macro text in the Visual Basic Portion that opens up.
If your Developer Tab is not active then you do the following:
1. For 2007- Click on the Microsoft Word Button, Go To Word Options, Choose Popular and place a check under "Show Developer Tab in the Ribbon"
2. For 2010 forward Go to File, Options, Choose Customize Ribbon, Look for the Choice of Main Tabs, Click the Developer Tab and you should now see it listed on your main screen.
Copy this Macro Text and put it in a safe place:
Sub CopyTables ( )
Dim Source As Document
Dim Target As Document
Dim tbl As Table
Dim tr As Range
Set Source = ActiveDocument
Set Target = Documents.Add
For Each tbl In Source.Tables
Set tr = Target.Range
tr.Collapse wdCollapseEnd
tr.FormattedText = tbl.Range.FormattedText
tr.Collapse wdCollapseEnd
tr.Text = vbCrLf
Next
End Sub
Give it a try when you can.
Highly Recommended:
Basic - Advanced MS Word Legal Training.
Expert Hands-On Test Prep
No comments:
Post a Comment