![]() |
|
|||||||
|
|
Thread Tools | Display Modes |
|
#5
|
|||
|
|||
|
Thanks again.
Not sure if I am doing sth wrong, but get an error message in the 'If' statement that you provided as a replacement, my macro is like this now: Code:
Sub Macro15()
Application.ScreenUpdating = False
Dim Rng As Range, i As Long
With ActiveDocument.Tables(1)
Set Rng = .Range
With .Range
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "#"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute
End With
If .Find.Found = True
.MoveEnd Unit:=wdCell, Count:=1
.Text = vbNullString
End If
End With
End With
Application.ScreenUpdating = True
End Sub
|
| Tags |
| delete text toright, macro, table cell |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
cell alignment gets deleted when using backspace in a cell
|
saandahn | Word Tables | 4 | 01-08-2018 09:27 AM |
| How to delete unused cell remaining at end of a block of deleted data | SKEETER | Excel | 2 | 10-24-2017 07:06 AM |
| How can I delete spaces & lines in a table cell | mrayncrental | Word VBA | 3 | 10-20-2014 07:09 PM |
Delete table if cell has data
|
So New2 This | Word VBA | 1 | 05-06-2013 09:00 PM |
| How can I delete the content of a cell in column if the cell value is more than 1000? | Learner7 | Excel | 2 | 06-27-2011 05:44 AM |