Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
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. |
#3
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
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. |
#4
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
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. |
#5
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
Doug -
I created the macro in Visual Basic. When I ran it I received the error: "Run-time error '424': object required" I clicked debug and it highlighted the line in the macro beginning "For i =" I typed just as you said, so I am not sure what is wrong. Any thoughts? Thanks for your assistance. Hal "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. |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Header with picture or text box | Page Layout | |||
Creating dynamic cross reference links in a Word document | Microsoft Word Help | |||
multiple tables same text | Tables | |||
autoshape text wrapping | Page Layout |