Reply
 
Thread Tools Display Modes
  #1   Report Post  
smiba
 
Posts: n/a
Default MAcro to find text only on first row of table

Hi,

I have a macro that uses Selection.Find to locate text and then deletes the
column of the table where the text is found. How would I add the criteria to
only delete the row if the text found is in the first row?

Using Word 2003

Thanks
  #2   Report Post  
Helmut Weber
 
Posts: n/a
Default

Hi,


Selection.Information(wdEndOfRangeRowNumber)
returns the row number where the end of the selection is.

So:

if Selection.Information(wdEndOfRangeRowNumber)= 1 then
'your code
endif

There is too: Selection.Information(wdStartOfRangeRowNumber)
--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
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
How to paste a column of text into a column in a Word Table Sam Page Layout 2 July 31st 05 08:03 PM
Find all instances of a recurring text robfer Microsoft Word Help 2 April 22nd 05 06:02 AM
Table headers/footers and layout Keith Page Layout 1 April 8th 05 07:37 PM
How do I create a macro to data sort in a table within a protecte. Keenly52 Tables 5 March 29th 05 08:38 AM
word 97 table now text david Tables 3 November 25th 04 03:34 AM


All times are GMT +1. The time now is 03:41 PM.

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"