Macro to Swap Table Cells

If you work with tables, you've probably wished for a way to automatically swap the contents of two adjacent cells. If so, here's a macro that will do the trick. Just put your cursor in the first of the two cells you want to transpose and then run the macro.

If you don't know how to use macros like this, you can learn how here.

'THE MACRO STARTS HERE
Sub SWAPCELLS()
WordBasic.ScreenUpdating 0  'So you don't have to watch gyrations
WordBasic.SelType 1 'Get off any selected text
'In first cell
WordBasic.NextCell  'So you can select cell contents
WordBasic.PrevCell  'Select cell contents
If Asc(WordBasic.[Selection$]()) = 13 Then  'Cell is empty
WordBasic.MsgBox "This cell contains no text to invert.", "Cell Empty"
GoTo Endmacro
Else
WordBasic.WW7_EditAutoText Name:="IMCell1IM", Context:=0, InsertAs:=0, Add:=1
WordBasic.WW6_EditClear
End If
WordBasic.NextCell
'In second cell
If Asc(WordBasic.[Selection$]()) = 13 Then  'Cell is empty
WordBasic.MsgBox "The next cell contains no text to invert.", "Next Cell Empty"
WordBasic.EditUndo  'Put the text back into the first cell
WordBasic.SelType 1 'Get off selected text
GoTo Endmacro
Else
WordBasic.WW7_EditAutoText Name:="IMCell2IM", Context:=0, InsertAs:=0, Add:=1
WordBasic.WW6_EditClear
WordBasic.WW7_EditAutoText Name:="IMCell1IM", Context:=0, InsertAs:=0, Insert:=1
WordBasic.WW7_EditAutoText Name:="IMCell1IM", Context:=0, InsertAs:=0, Delete:=1
End If
WordBasic.PrevCell
'Back in first cell
WordBasic.WW7_EditAutoText Name:="IMCell2IM", Context:=0, InsertAs:=0, Insert:=1
WordBasic.WW7_EditAutoText Name:="IMCell2IM", Context:=0, InsertAs:=0, Delete:=1
Endmacro:
WordBasic.ScreenUpdating 1
WordBasic.ScreenRefresh
End Sub
'THE MACRO ENDS HERE

____________________________________________________

DVORAK KEYBOARD UPDATE

After practicing about half an hour a day for the past three weeks, I'm almost at the point where I can stand to work exclusively in Dvorak, which for me is about 25 words a minute. I still can't get my fingers to automatically go where they should all the time, especially if I try to type quickly. Here are my recommendations for any who are seriously considering making the switch:

1. If you're a beginning typist or don't type very quickly anyway, learn the Dvorak keyboard.

2. If you suffer from repetitive stress injuries but must continue to type (have you considered speech recognition?), learn the Dvorak keyboard.

3. If you're an accomplished QWERTY typist, think twice about taking on the challenge. In the end, the effort may be worth it (I've decided to stick with it), but getting proficient will cost you in time, effort, and exasperation.

4. Take it slow. You won't get fast overnight, so don't try. Initially, aim for accuracy. Speed will come with practice.

5. Use a good typing tutor program to help you learn. Don't use Mavis Beacon Teaches Typing, which no longer supports Dvorak. There's a pretty good free program (KP Typing Tutor) here:

http://www.fonlow.com/zijianhuang/kp/

A program with more thorough instruction and fancier features is TypingMaster, which you can try and buy here:

http://www.typingmaster.com/

6. Practice at least half an hour every day. If you do more than that, take breaks frequently.

7. After your speed reaches about 25 words a minute, avoid working in QWERTY. Otherwise, your fingers will get confused. At least mine do.

8. Try to learn during a time when your workload is light. If deadlines are looming, your reduced typing speed will drive you crazy.

Good luck!

_________________________________________

READERS WRITE

Last week's newsletter explained how to select text vertically using the mouse. Hilary Powers responded:

For the mouse-phobic, there's an easier way: Press and release Shft-Ctrl-F8. The insertion point changes to a long thin line, after which you can select your rectangle with the arrow keys - much more comfortable.

Katie Lewis sent the same tip with some additional information:

You know F8 is an alternative to holding down the Shift key for selecting text? It works well with the cursor keys, so is much more controlled than using the mouse. Ctrl+Shift+F8 does the same thing for vertical selection. (Esc to turn off.)

Thanks to Hilary and Katie for the useful tips.

_________________________________________

RESOURCES

Last week's newsletter listed some document comparison programs to replace the "retired" CompareRite. Both Donna Payne and Bill Rubidge wrote to recommend DeltaView, which you can learn about here:

http://www.workshare.net

Bill noted:

The only downside is that DeltaView is focused on enterprise users (particularly law firms), so they don't offer single-user licenses. They've considered this, but have not accepted it so far because they feel the customer support would cost them too much. Perhaps if enough of us asked about single-user licenses...

As an alternative, examdiff is okay, I also recommend that your readers visit http://www.componentsoftware.com/products/ and take a look at CSdiff and HTMLdiff.

And then again, you can always just stick with your current version of Word. I'm a big fan of downgrading instead of upgrading.

Thanks to Donna and Bill for this helpful information.

This entry was posted in Editing. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

You must be logged in to post a comment.

  • The Fine Print

    Thanks for reading Editorium Update (ISSN 1534-1283), published by:

    The EDITORIUM, LLC
    http://www.editorium.com

    Articles © on date of publication by the Editorium. All rights reserved. Editorium Update and Editorium are trademarks of the Editorium.

    You may forward copies of Editorium Update to others (but not charge for it) and print or store it for your personal use. Any other broadcast, publication, retransmission, copying, or storage, without written permission from the Editorium, is strictly prohibited. If you’re interested in reprinting one of our articles, please send an email message to editor@editorium.com

    Editorium Update is provided for informational purposes only and without a warranty of any kind, either express or implied, including but not limited to implied warranties of merchantability, fitness for a particular purpose, and freedom from infringement. The user (you) assumes the entire risk as to the accuracy and use of this document.

    The Editorium is not affiliated with Microsoft Corporation or any other entity.

    We do not sell, rent, or give our subscriber list to anyone. Period.

    If you’d like to subscribe, please enter your name and email address below. We publish the newsletter once a week, and on rare occasions we may send an important announcement. We never, ever send spam. Thank you for signing up!