Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Mon, 11 Aug 2008 14:34:01 -0700,    group: microsoft.public.word.vba.general        back       


Select Row in word table   
This my be so easy I’m not seeing the trees from the forest but, I am trying 
to simply select the row of a word table, in which my cursor is currently in. 
  The problem is I want to run this on a variety of tables with various row 
and column combinations
date: Mon, 11 Aug 2008 14:34:01 -0700   author:   gb0dms

RE: Select Row in word table   
To: Gb0dms,

In order to select a row where the cursor is at you need:

Selection.rows(1).Select

Steven Craig Miller

"gb0dms" wrote:

> This my be so easy I’m not seeing the trees from the forest but, I am trying 
> to simply select the row of a word table, in which my cursor is currently in. 
>   The problem is I want to run this on a variety of tables with various row 
> and column combinations
date: Mon, 11 Aug 2008 15:57:04 -0700   author:   StevenM stevencraigmiller(at)comcast(dot)net

RE: Select Row in word table   
gb0dms,

Steven's code will do what you need - select the entire row in which your 
cursor is located. However, please be aware that it will fail if your cursor 
in not in a table. To accomodate this possibility check the 
.Information(wdWithinTable) property of the Selection object first.

In addition, you may run into problems if you have any "vertically merged" 
cells _anywhere_ in the table, although "horizontally merged" cells are OK. 
(Of course, if you want to select a column then the reverse applies...)

Finally, please note that the .Delete method of the resulting Selection 
object will just delete the contents of the table cells. If you want to 
"delete" the row, you will need to use the .Cut method.
-- 
Cheers!
Gordon

Uninvited email contact will be marked as SPAM and ignored. Please post all 
follow-ups to the newsgroup.


"gb0dms" wrote:

> This my be so easy I’m not seeing the trees from the forest but, I am trying 
> to simply select the row of a word table, in which my cursor is currently in. 
>   The problem is I want to run this on a variety of tables with various row 
> and column combinations
date: Mon, 11 Aug 2008 18:07:08 -0700   author:   Gordon Bentley-Mix gordon(dot)bentleymix(at)gmail(dot)com

Re: Select Row in word table   
Hi gb0dms,

If Selection.Information(wdWithInTable) Then Selection.Range.Rows.Select
will select as many entire rows as you have rows within one or more columns selected.

-- 
Cheers
macropod
[MVP - Microsoft Word]


"gb0dms"  wrote in message news:CDCBF63A-20E4-4DC7-BCFC-D162CF57226E@microsoft.com...
> This my be so easy I’m not seeing the trees from the forest but, I am trying
> to simply select the row of a word table, in which my cursor is currently in.
>  The problem is I want to run this on a variety of tables with various row
> and column combinations
date: Tue, 12 Aug 2008 18:45:25 +1000   author:   macropod lid

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us