Re: Cell contents swapping by Mark
Mark
Wed Sep 17 02:25:56 CDT 2003
Tim,
It's a bit of a dance but doable:
Dim t As Table, r As Range
Set t = ActiveDocument.Tables(1)
t.Cell(1, 1).Range.Cut
Set r = t.Cell(1, 2).Range
r.MoveEnd wdCharacter, -1
t.Cell(1, 1).Range.FormattedText = r.FormattedText
t.Cell(1, 2).Range.Paste
--
Mark Tangard <Mark@Tangard.com>, Microsoft Word MVP
Please reply only to the newsgroup, not by private mail.
Note well: MVPs do not work for Microsoft.
"Life is nothing if you're not obsessed." --John Waters
Tim wrote:
>
> Hi All
>
> We have a macro that allows the user to swap the text in
> two adjacent cells in a table ... works great.
> Now we are looking to use formfields rather than plain
> text, we have tried to ammend the macro to swap the
> formfield but get an error, any suggestions on swappings
> formfields, or even better, the entire contents of a cell
> whether it be formfield or text or img ?
>
> Thanks for any input
>
> Tim