Converting Multiple Tables to Text
If there is just one table in each header and it is in the Primary Header,
then the following should do it:
Dim i As Long
With ActiveDocument
For i = 1 To .Sections.Count
.Sections(i).Headers(wdHeaderFooterPrimary).Range. Tables(1).ConvertToText
Next i
End With
If there is more than one table, you will need to iterate through them in
the same way as the previous macro
If there a First Page Headers, you will need to add another command
..Sections(i).Headers(wdHeaderFooterFirstPage).Ran ge.Tables(1).ConvertToText
Before the Next i
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
"zoobree" wrote in message
...
I tried the code you suggested but it does nothing to my document. I
suspect
it is because all of the tables are in the headers, there are multiple
sections in the document, and multiple headers in each section. If that's
the problem, is there some way I can create a nested loop to convert all
of
the tables in all of the headers to text?
"Doug Robbins - Word MVP" wrote:
Use the following code in a macro
Dim i As Long
With ActiveDocument
For i = .Tables.Count To 1 Step -1
.Tables(i).ConvertToText
Next i
End With
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
"Hal" wrote in message
...
If one has a document that is composed of multiple tables is there an
easy
way to select the whole document and convert all tables to text at once
or
do
you have to convert each table individuallY? Thanks.
|