Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Sep 2002
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Table of Authorities Macro in Word 2002 (Word 2002)

    I am trying to write a very simple macro in Word 2002 (Windows XP OS) which will create a Table of Authorities for all categories of TOA contained in the document and insert a heading. This macro worked beautifully in Word 97 (Windows 98), but when I use the same code in 2002, it errors out [Method 'Add' of object 'TableOfAuthorities' failed ... TOA runtime error -2147467269(80004005)]. So ... I went into VB help and it says you can insert the following code to create a Table of Authorities for all categories of the TOA: "ActiveDocument.TablesOfAuthorities.Add Range:=Selection.Range, Category:=0" This is the same code I used in Word 97, and I get the same error message mentioned above. Does anyone know what I need to do to get this darn code to generate a Table of Autorities correctly?

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Table of Authorities Macro in Word 2002 (Word 2002)

    Not many ideas on this one...

    First, I assume it is a typo, but just in case you used the object instead of the collection...
    <UL>Method 'Add' of object 'TableOfAuthorities' failed...[/list]Second, are there any protected sections in the document?

    Third, is the active Selection in a funny place (like the Footnote pane)?

  3. #3
    New Lounger
    Join Date
    Sep 2002
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Table of Authorities Macro in Word 2002 (Word 2002)

    There is nothing unusual about this document (actually, we've tried it with several "standard" documents which are marked with TOA codes). No protected sections, the active selection is not in a footnote pane. As I mentioned, this code works perfectly in Word 97 (I don't have 2000 to test to see if it works there).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •