Re: Macros to sort Columns

Subject: Re: Macros to sort Columns
From: Isaac Rabinovitch <isaacr -at- mailsnare -dot- net>
To: techwr-l
Date: Wed, 21 Jan 2004 08:59:49 -0800

SROSENYC -at- aol -dot- com wrote:

Is there some limitation to MSWord or VBA that prevents me from recording a macro which sorts a table based on three of it's columns (one of which is in 01-JAN-04 date format)? The same sort works fine in Excel. SOS!



Writing a macro recorder for a word processor is a lot harder than writing one for a spreadsheet. I couldn't begin to count the number of things for which the Word recorder creates incorrect VBA, or simply skips over it.

I never rely on a recorded VBA macro to do exactly what I recorded. Aside from the problems just mentioned, I find the messy code style esthetically uncool.

That being said, I had no trouble creating such a macro. Then again, I'm running Word 2003, and it wouldn't suprise me if the macro recorder had improved recently.

If Word 2003 isn't available, you can easily enter the macro by hand. If you type "selection.sort" and then hit a space, a hint box will prompt you for all the parameters. If that's not enough hit F1 for the API doc. Be sure to look at the doc for the Selection object not the Table object.




Previous by Author: Re: Missing the point
Next by Author: Re: texas tech university online graduate program/experience
Previous by Thread: Macros to sort Columns
Next by Thread: Missing the point


What this post helpful? Share it with friends and colleagues:


Sponsored Ads