Move Table Columns

S

StanC

I have a table with two columns. I want to put column two before (to the
left of) column 1. How do I do that?
 
J

Jean-Guy Marcil

Bonjour,

Dans son message, < StanC > écrivait :
In this message, < StanC > wrote:

|| I have a table with two columns. I want to put column two before (to the
|| left of) column 1. How do I do that?

Select column 2, do CTRL-X (Cut)
Place the cursor the first cell of column 1 and hit CTRL-V (Paste)

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
S

StanC

I'm terribly sorry. I realize now my first note wasn't clear. I do
understand how to move the columns manually while working in Word.

What I meant to ask was how do I do that in a VBA program? At the moment,
I don't understand how to use code to select the column, cut it, then
write the equivalent of the menu command: Paste Columns.
 
J

Jean-Guy Marcil

Bonjour,

Dans son message, < StanC > écrivait :
In this message, < StanC > wrote:

|| I'm terribly sorry. I realize now my first note wasn't clear. I do
|| understand how to move the columns manually while working in Word.
||
|| What I meant to ask was how do I do that in a VBA program? At the moment,
|| I don't understand how to use code to select the column, cut it, then
|| write the equivalent of the menu command: Paste Columns.

In that case, try this quick and dirty sub:

'_______________________________________
Sub MoveCol()

With Selection.Tables(1)
With .Columns(2)
.Select
Selection.Copy
.Delete
End With
.Cell(1, 1).Select
Selection.Collapse
Selection.Paste
Selection.Collapse
End With

End Sub
'_______________________________________

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top