how to placing text in empty table in Ms word but not all cells just certainty cells --> can skip cells contains text before
i found code but not work fully , the code can placing text for all empty cells
here code
Code: Select all
Sub ProcCells1()
Dim tTable As Table
Dim cCell As Cell
Dim sTemp As String
sTemp = "test"
For Each tTable In ActiveDocument.Range.Tables
For Each cCell In tTable.Range.Cells
'An apparently empty cell contains an end of cell marker
If Len(cCell.Range.Text) < 3 Then
cCell.Range = sTemp
End If
Next
Next
Set oCell = Nothing
Set tTable = Nothing
End Sub
1. drag/block your table range that i want inserted text (can skip/not overwrite cells that contains text before)
2. show message box "typing or input your text that you want ......."
3. done/finish
i attachment my sample file afte running that code
anyone help me, greatly appreciated
susant