ActiveDocument object not recognized

L

LauraBorealis

A beginner's question:

I am trying to insert a column into col position 2 in a table, whic
apparently is to be done with the following code:

ActiveDocument.Tables(1).Columns(1).Select
Selection.InsertColumnsRight

However, when I run the macro, the object "Activedocument" is empty.
What is wrong here?
Thanks
 
L

LauraBorealis

Oh, great. So the code I found isn't even for Excel, but for a table i
a Word document? I'll have to pay more attention to the environmen
when code comes back from an MSDN search. (Why isn't Microsof
consistent across platforms...
 
L

LauraBorealis

To insert a column to the right of the presently selected cell:

ActiveCell.Select
ActiveCell.Offset(0, 1).Select
Selection.EntireColumn.Insert
ActiveCell.Offset(0, -1).Select
 
Top