SelectCell

C

Cheryl

I recorded a short macro in MicrosoftWord 2003 for a repetive task, then
tried to modify it in the macro editor when conditions changed. This is the
macro:

Sub Macro2()
'
' Macro2 Macro
' Macro recorded 8/9/2005 by Administrator
'
Selection.Font.Size = 12
Selection.MoveRight Unit:=wdCell
Selection.MoveRight Unit:=wdCell
Selection.TypeText Text:="CSW"
Selection.MoveRight Unit:=wdCell
Selection.MoveRight Unit:=wdCell, Count:=4
Selection.SelectCell
Selection.Copy
Selection.MoveLeft Unit:=wdCell, Count:=4
Selection.PasteAndFormat (wdPasteDefault)
Selection.MoveLeft Unit:=wdCell
Selection.MoveLeft Unit:=wdCell
End Sub

The part that doesn't work starts at the line "Selection.SelectCell". I
want to copy the contents of the current cell of the table, then paste them
to the cell that I move to. I'm pretty sure that all my moves are correct
because the cursor ends up in the cell I expect it to, but when the macro
finishes, the contents of the cell I tried to copy haven't been pasted to the
cell I expected it to be pasted into. What exactly does "SelectCell" do? Is
there some other way I should be doing this?

Thank you.
Cheryl
 
C

Cheryl

Shortly after I posted this, I finally found the error in this macro. I
looked for a way to delete the post, but couldn't find one... Cheryl
 

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