Reply
 
Thread Tools Display Modes
  #1   Report Post  
Lily
 
Posts: n/a
Default 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   Report Post  
Klaus Linke
 
Posts: n/a
Default

"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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Find and replace manual line breaks Orrie Microsoft Word Help 7 February 9th 05 07:40 AM
Find and Replace Michael R New Users 11 January 22nd 05 05:31 PM
Find and Replace Locks Up Word Karine Rivet Formatting Long Documents 1 January 22nd 05 06:21 AM
Find and Replace anomaly BruceM Microsoft Word Help 7 January 18th 05 05:47 PM
--A Find & Replace Question-- KlikThis Microsoft Word Help 3 January 1st 05 05:58 PM


All times are GMT +1. The time now is 10:36 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"