Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
Find “AnytextA*” Replace “Anytext*”, where * represents the end-of-
cell marker. Parallel to replacing a character before ^p. Should be dead simple, but apparently it aint. How to do it? |
#2
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
Unfortunately, MS has not (yet) provided any way to search for an
end-of-cell marker. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA wrote in message ... Find “AnytextA*” Replace “Anytext*”, where * represents the end-of- cell marker. Parallel to replacing a character before ^p. Should be dead simple, but apparently it aint. How to do it? |
#3
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
On Sep 22, 10:31*am, "Suzanne S. Barnhill" wrote:
Unfortunately, MS has not (yet) provided any way to search for an end-of-cell marker. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Yes, that much is clear. But isn’t there a programmatic approach? I imagine saying: read the contents of a cell into variableX; right truncate variableX by one character; paste variableX back into the cell. |
#4
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
Use a macro containing the following code when the selection is in the table
Dim arng As Range Dim i As Long, j As Long With Selection.Tables(1) For i = 1 To .Rows.Count For j = 1 To .Columns.Count Set arng = .Cell(i, j).Range arng.End = arng.End - 1 If Right(arng.Words.Last, 1) = "A" Then arng.Words.Last = Left(arng.Words.Last, Len(arng.Words.Last) - 1) End If Next j 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 wrote in message ... On Sep 22, 10:31 am, "Suzanne S. Barnhill" wrote: Unfortunately, MS has not (yet) provided any way to search for an end-of-cell marker. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Yes, that much is clear. But isn’t there a programmatic approach? I imagine saying: read the contents of a cell into variableX; right truncate variableX by one character; paste variableX back into the cell. |
#5
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
On Sep 24, 1:32*am, "Doug Robbins - Word MVP"
wrote: Use a macro containing the following code when the selection is in the table Dim arng As Range Dim i As Long, j As Long With Selection.Tables(1) * * For i = 1 To .Rows.Count * * * * For j = 1 To .Columns.Count * * * * * * Set arng = .Cell(i, j).Range * * * * * * arng.End = arng.End - 1 * * * * * * If Right(arng.Words.Last, 1) = "A" Then * * * * * * * * arng.Words.Last = Left(arng.Words.Last, Len(arng.Words.Last) - 1) * * * * * * End If * * * * Next j * * 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 wrote in message ... On Sep 22, 10:31 am, "Suzanne S. Barnhill" wrote: Unfortunately, MS has not (yet) provided any way to search for an end-of-cell marker. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Yes, that much is clear. But isn’t there a programmatic approach? I imagine saying: read the contents of a cell into variableX; right truncate variableX by one character; paste variableX back into the cell. Thanks, Doug. Works beautifully. |
#6
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
This code looks great to remove every day characters, but the problem I have and that a lot of others on the web seem to have but cannot find answers to is how to remove a blank line at the end of the cell, or ^p. I tried replacing the "A" with "^p" of course, but it didn't work.
Any ideas for this? |
#7
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
Replace "A" with Chr(13) - no quotes
-- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Shane Gidley wrote: This code looks great to remove every day characters, but the problem I have and that a lot of others on the web seem to have but cannot find answers to is how to remove a blank line at the end of the cell, or ^p. I tried replacing the "A" with "^p" of course, but it didn't work. Any ideas for this? |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find and replace a character | Microsoft Word Help | |||
Replace cannot find Paragraph Mark | New Users | |||
ü instead of a check mark when I try to copy it from Character Map | Microsoft Word Help | |||
Find/Replace specific character | Microsoft Word Help | |||
Using find and replace with special character symbols | Microsoft Word Help |