View Single Post
  #5   Report Post  
David
 
Posts: n/a
Default

Jezebel wrote


and added as first line:
Selection.HomeKey Unit:=wdStory


Don't understand what you have in mind with this. Doesn't help with
any of the problems I mentioned. If you want to deal with errors, add
an On Error Goto statement and do it thoroughly ... but if the code is
for your own use, simply letting the code fall over is quite OK.


I apologize. I misspoke on this one (you didn't mention this as a potential
problem).

Typically the user will click the custom button immediately after entering
data in the first empty row. I noticed in my initial test run (after
changing an existing name in Col 2 and leaving the cursor where it was)
that the sort didn't happen unless I first positioned the cursor in the
first cell of the table. Rather than require the user to remember to do
anything before activating the macro, I chose to position the cursor at the
beginning of the document to take the guesswork out. And since there is
only one table, as stated in my original post, the routine, as modified,
works as desired.

--
David