Quantcast
Channel: Word for Developers forum
Viewing all articles
Browse latest Browse all 4350

some mistakes in macro

$
0
0

I have found a macro to select all of the tables in Word, but I want it to convert all of the tables to texts. Now I put the macro behind it but failed. Could you please help me? I do need your help.

Selection.Cut
    Selection.GoTo What:=wdGoToSection, Which:=wdGoToFirst
    Selection.Paste
    Dim mytable As Table
    For Each mytable In ActiveDocument.Tables
    mytable.Range.Editors.Add wdEditorEveryone
 Next
    ActiveDocument.SelectAllEditableRanges (wdEditorEveryone)
    ActiveDocument.DeleteAllEditableRanges (wdEditorEveryone)

   

I add a macro Below. 

Selection.Rows.ConvertToText Separator:=wdSeparateByParagraphs, _
        NestedTables:=True

End Sub


Viewing all articles
Browse latest Browse all 4350

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>