Editing Table of Authorities Categories

C

CJ

Heres a good one to chew on...
There are occasions when we want to separate out the Statutes category into
two separate categories, "federal statutes" and "state statutes", because
Word doesn't recognize that federal statutes must appear before state
statutes, and we don't want to run the risk of manually moving the federal up
before the state and then updating the table of authorities and forgetting to
do the manual work again.

Here's my issue:
I have macro that reassigns categories 2 through 8, essentially renaming
Statutes and Other Authorities, and then just dropping Other Authorities
through Constituational Provisions down one level.

This is only to work if the attached template is one of four templates,
otherwise it is to leave everything alone and quit. What is happening is
that it is changing the normal.dot anyway.

Is there any way to not have normal.dot be changed? I can program it so it
will put the categories back to Word's default categories, but if someone has
already modified their categories in normal.dot, I don't want to mess with
that.

Here's my code, help mucho appreciated, please!

Sub TOASplitStatutes()
'
' splits federal and state statutes out, state statutes takes the
'place of level 3 "other authorities", and then all other
'categories drop down one level only if certain templates are attached
'BUT IT STILL CHANGES NORMAL! NEED FIX

Dim objAD As Document
Dim strTplt As String
Set objAD = ActiveDocument
strTplt = objAD.AttachedTemplate

If strTplt = "SuperiorCourtBriefMaster.dot" _
Or strTplt = "DelawareSupremeCourtBriefMaster.dot" _
Or strTplt = "USSupremeCourtBriefMaster.dot" _
Or strTplt = "ChanceryCourtBriefMaster.dot" _
Or strTplt = "DistrictCourtBriefMaster.dot" Then

ActiveDocument.TablesOfAuthoritiesCategories(1).Name = "Cases"
ActiveDocument.TablesOfAuthoritiesCategories(2).Name = "Federal Statutes"
ActiveDocument.TablesOfAuthoritiesCategories(3).Name = "Delaware Statutes"
ActiveDocument.TablesOfAuthoritiesCategories(4).Name = "Other Authorities"
ActiveDocument.TablesOfAuthoritiesCategories(5).Name = "Rules"
ActiveDocument.TablesOfAuthoritiesCategories(6).Name = "Treatises"
ActiveDocument.TablesOfAuthoritiesCategories(7).Name = "Regulations"
ActiveDocument.TablesOfAuthoritiesCategories(8).Name = "Constitutional
Provisions"

Else

MsgBox ("If you want to split the TOA statutes out to" & vbNewLine &
"separate federal and state statutes, you must" & vbNewLine & "attach the
correct MorrisJames brief template first." & vbNewLine & "Attach template and
rerun the macro.")
Exit Sub
End If

Set objAD = Nothing

End Sub
 
C

CJ

Well, I found out today that TOA categories are not stored in a template, but
are kept in the registry on a per user level, and each user can have a single
set of categories defined. So, when you change the TOA categories, it's
being saved to the registry.
I'm wondering if you can get the registry settings first, make the changes,
and then put the registry settings back? Or is it even worth it?
Ideas, anyone?
 

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