Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / September 2007

Tip: Looking for answers? Try searching our database.

How to delete content in a table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
juan - 19 Sep 2007 18:14 GMT
Hi, I have a table with 6 columns and variable rows, how to delete the
content of all the cells except the cells in row 1?

Thanks
Juan Uribe
Tony Jollans - 19 Sep 2007 19:49 GMT
One way ...

With ActiveDocument
   .Range(.Tables(1).Rows(2).Range.Start,
.Tables(1).Rows.Last.Range.End).Rows.Delete
End With

Signature

Enjoy,
Tony

> Hi, I have a table with 6 columns and variable rows, how to delete the
> content of all the cells except the cells in row 1?
>
> Thanks
> Juan Uribe
juan - 19 Sep 2007 20:32 GMT
thanks tony, excelent,
Juan Uribe

> One way ...
>
[quoted text clipped - 8 lines]
> > Thanks
> > Juan Uribe
Chip Orange - 20 Sep 2007 15:18 GMT
Juan,

Did you want to actually remove the other rows, or just to empty their
cells, but leave them in place?

Chip

> Hi, I have a table with 6 columns and variable rows, how to delete the
> content of all the cells except the cells in row 1?
>
> Thanks
> Juan Uribe
juan - 20 Sep 2007 16:22 GMT
Thanks Chip, I realize that, this way it erases the cell, I changed ...:=1,
Column:=2).row.Delete  for ...:=1, Column:=2).Range.Delete and it works
erasing only the content

> Juan,
>
[quoted text clipped - 8 lines]
> > Thanks
> > Juan Uribe
Chip Orange - 21 Sep 2007 19:28 GMT
I would have thought that would also delete the rows or columns, so I guess
I don't quite understand how it's working.

My thought was to use:

.range.text = ""

Which would only clear each cell I think.

Anyway, it sounds like you have what you need.

Chip

> Thanks Chip, I realize that, this way it erases the cell, I changed
> ...:=1,
[quoted text clipped - 13 lines]
>> > Thanks
>> > Juan Uribe
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.