How can i search for the end-of-row mark in word find?
What the special format.
Printable View
How can i search for the end-of-row mark in word find?
What the special format.
Isn't it a (CARRIAGE RETURN + LINE FEED) - basically vbNewLine for each new line and (LINE FEED) for each line that's wrapped ?
I am talking in the microsoft find. like /p means paragraph mark and /t = tab mark. What finds the end of row mark?
What's that ??? :confused: What are you trying to do anyway?Quote:
Originally Posted by shragel
I think he is talking about doing this from within Word itself using VBA which is why we were a little confused.Quote:
Originally Posted by RhinoBull
Moved to Office Development.
So does anyone know the answer?
If your taking about paragraphs line wrapping and being able to determine the word that is at the end of the line before it wraps then I do not believe there is a character for that. Its all about what fits on the line as Word will start the rest of the sentence/paragraph on the next line. You may be able to determine the number of lines or get the verbiage on a line.
I am talking in a table where is such a mark for the end of the cell, or end of the mark. I am looking to search for that.
Like shown in this link
http://www.oreilly.com/catalog/word2...pter/ch10.html
Oh, then you want the .Clees in a .Row. If you set an object variable to the table and then another one to the particular row in question then you will get the needed object property.
My problem is that when i am creating a mail merge for labels, all the labels get a extra paragrah before the end, so what i want is to delete the last paragraph from all labels so that it showld be centered.
So then in the paragraph in each cell you will want to remove the "^p" from it. ^p is Words paragraph or new line character. ;)
but i only want to remove the last one of each cell
For example
Name {Enter}
Address {Enter}
City, State Zip {Enter}
{Enter}
{End of cell mark}
And i need to remove only the last enter from each cell.
You can use Instr or InstrRev to find the last occurance of the ^p character. Or youcan use the Replace function and specify the last character of the string as the starting point.
Quote:
Originally Posted by RobDog888
All I can say, is "Merry Christmas to all, and to all, a good night"
but i need to remove the lasst of each cell.
See the attached document.
Dont know what dglienna is talking about but anyways...
You can loop through the cells in a row and replace the ending paragraph character with a empty string.
VB Code:
Dim cel As Cell For Each cel In ActiveDocument.Tables(1).Rows cel.Range.Text = Replace(cel.Range.Text, "^p", vbNullString, Len(cel.Range.Text) - 2, , vbTextCompare) Next
Oh. Now I understand. .Clees = .Cells
My mistake. :)
:D I didnt even see that. I am a bit dyslexic. Doubled up on the e's instead of the l's.