Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-10-2013, 08:41 AM
kjworduser kjworduser is offline Using range object to work with multiple columns Windows 7 32bit Using range object to work with multiple columns Office 2010 32bit
Novice
Using range object to work with multiple columns
 
Join Date: Mar 2013
Posts: 5
kjworduser is on a distinguished road
Default Using range object to work with multiple columns

To those of you who are more at home in using ranges ("Home on the Range", sorry for the pun), how do you do the following tasks:

1. Select (and work with) multiple columns in a Word table? For example, select and delete columns 3-5 of a 6-column table.

2. Move columns? For example, move column 4 before column 2.

And if you are tempted to refer me to some good introduction on using range objects - please succumb!

"Where seldom is heard a discouraging word!"

Many thanks.
Reply With Quote
  #2  
Old 11-01-2013, 03:03 AM
macropod's Avatar
macropod macropod is offline Using range object to work with multiple columns Windows 7 32bit Using range object to work with multiple columns Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi kjworduser,

I've been away and didn't see your post.

Here's one of many possible approaches to deleting a column:
Code:
Sub Demo()
With ActiveDocument.Tables(1)
  While .Columns.Count > 3
    .Columns(3).Delete
  Wend
End With
End Sub
And here's one of many ways of moving a column:
Code:
Sub Demo()
With ActiveDocument.Tables(1)
  .Columns(4).Select
  Selection.Cut
  .Columns(2).Select
  Selection.Paste
End With
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using range object to work with multiple columns Use of Range Object Question jsb73 Word VBA 6 08-14-2012 07:35 PM
Using range object to work with multiple columns Formatting multiple tables and columns efficiently? table_column Word Tables 1 07-02-2012 05:55 PM
Using range object to work with multiple columns Range.Information(wdStartOfRangeRowNumber): Application-defined or Object-defined err tinfanide Excel Programming 2 06-09-2012 10:19 AM
Using range object to work with multiple columns moving data from single to multiple columns? mzimmers Excel 3 08-23-2010 08:20 AM
Using range object to work with multiple columns how to center text in multiple columns galiwock Excel 1 05-12-2010 09:02 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:09 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft