Home |
Search |
Today's Posts |
#1
|
|||
|
|||
How to find End-of-Row marker
Hi
Im a workig on VBA. im looking for the word 'table' at the begining of the paragraph by using the phrase '^13Table' with wilcards ON. But sometimes the word 'table' occures immediately below the table. Pls suggest me how to identify the word 'table' in such suituation Thanx Lily |
#2
|
|||
|
|||
"Lily" wrote:
Hi Im a workig on VBA. im looking for the word 'table' at the begining of the paragraph by using the phrase '^13Table' with wilcards ON. But sometimes the word 'table' occures immediately below the table. Pls suggest me how to identify the word 'table' in such suituation Thanx Lily Hi Lily, Unfortunately, the end-of-cell and end-of-row markers are invisible to "Edit Find". You need a work-around, like searching for "Table" and then checking the previous character: If AscW(Selection.Characters.First.Previous) = Chr(13) Then '... Or loop the paragraphs collection in the first place (and check the left 5 letters) instead of using Find. Or read the document in a variant (doctext = ActiveDocument.Content.Text), use Split(doctext, Chr(13)), and then look at the 5 left letters of each item in the array (If Left(doctext(i),5) = "Text" Then). The array index i will still be the same as the paragraph index in the document, so you can modify the corresponding paragraph. What will be fastest depends on your documents. Greetings, Klaus |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find and replace manual line breaks | Microsoft Word Help | |||
Find and Replace | New Users | |||
Find and Replace Locks Up Word | Formatting Long Documents | |||
Find and Replace anomaly | Microsoft Word Help | |||
--A Find & Replace Question-- | Microsoft Word Help |