Word Macro to insert rows to multiple tables
Closed
such
-
May 16, 2011 at 02:44 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - May 24, 2011 at 10:26 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - May 24, 2011 at 10:26 AM
Related:
- Word Macro to insert rows to multiple tables
- How to insert photo in word for resume - Guide
- How to insert check mark in word - Guide
- How to insert watermark in word - Guide
- Word apk for pc - Download - Word processors
- Number to text in word - Guide
1 response
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
May 24, 2011 at 10:26 AM
May 24, 2011 at 10:26 AM
In word 2007, when I inserted a table and ran your code. this is what I found
the cell that contain "Procedure" also comes up with baggage. There are two extra non printable characters. So the match failed. In my case I had to make this change
the cell that contain "Procedure" also comes up with baggage. There are two extra non printable characters. So the match failed. In my case I had to make this change
Sub copyn() 'macro to copy rows to multiple tables Dim tTable As Table Dim TargetText As String Dim oRow As Row Dim v As Variant TargetText = "Procedure" For Each tTable In ActiveDocument.Tables For Each oRow In tTable.Rows v = oRow.Cells(1).Range.Text v = Replace(v, Chr(13), vbNullString) v = Replace(v, Chr(7), vbNullString) If v = TargetText Then Selection.Paste Next oRow Next tTable End Sub