Setting a macro in a table

S

Snowbunny

I would like to set a macro for a sorting sequence I use all the time in a
table I have set up in Word 2007. Please tell me how to do this.
 
D

Doug Robbins - Word MVP

Tell us more about the sequence to enable more specific assistance to be
supplied.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
S

Snowbunny

I have tables with 14 columns. I need to sort columns 8, 7, 11 in that order
after I enter any new rows with info. I used to have a macro set up for this
on my other computer. By the time I got a new one and made a new table, I
forgot how to do it. My old one was Word 2000 now I have Word 2007. I can't
seem to find any instructions with this new version.
 
D

Doug Robbins - Word MVP

Nothing has changed in this respect between Word 2000 and 2007

The following was recorded:

Selection.Tables(1).Sort ExcludeHeader:=True, FieldNumber:="Column 8",
SortFieldType _
:=wdSortFieldAlphanumeric, SortOrder:=wdSortOrderAscending,
FieldNumber2 _
:="Column 7", SortFieldType2:=wdSortFieldAlphanumeric, SortOrder2:=
_
wdSortOrderAscending, FieldNumber3:="Column 11", SortFieldType3:= _
wdSortFieldAlphanumeric, SortOrder3:=wdSortOrderAscending,
Separator:= _
wdSortSeparateByCommas, SortColumn:=False, CaseSensitive:=False, _
LanguageID:=wdEnglishAUS, SubFieldNumber:="Paragraphs",
SubFieldNumber2:= _
"Paragraphs", SubFieldNumber3:="Paragraphs"


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 

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