InsertTableOfAuthorities Doesn't Write WINWORD6.INI Entries |
Q122947
The information in this article applies to:
- Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c
SYMPTOMS
The InsertTableOfAuthorities command does not add the [Table of Authorities Categories] section to the WINWORD6.INI file. By contrast, this section is added to the WINWORD6.INI file when you choose to add the table of authorities using the Index And Tables command on the Insert menu.
For example, the following macro does not add this section:
Sub MAIN MarkCitation .LongCitation = "Joe v. Bob", .Category=1 InsertTableOfAuthorities .Category = 1 End Sub
STATUS
Microsoft has confirmed this to be a problem in Word versions 6.0, 6.0a, and 6.0c for Windows. This problem was corrected in Word version 6.0 for Windows NT.
WORKAROUND
The EditTOACategory command must be used in the macro for each Table of Authorities Category that needs to be added to the WINWORD6.INI file. The EditTOACategory command precedes the InsertTableofAuthorities command as shown in this example:
Sub Main EditTOACategory .Category = 1, .CategoryName = "Cases" MarkCitation .LongCitation = "Joe vs. Jane", .Category = 1 InsertTableofAuthorities .Category = 1 End Sub
WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this macro code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
MORE INFORMATION
The first time you create a table of authorities (using the Index And Tables command from the Insert menu), the [Table of Authorities Categories] section is added to the WINWORD6.INI file. This section includes 16 default categories. The WordBasic InsertTableofAuthorities command does not add this entry and also does not define the default categories in the WINWORD6.INI file. The result of not having these entries in the WINWORD6.INI file are shown in the following examples:
A table of authorities created using the Index And Tables command from the Insert menu, looks like this:
CASES Joe vs. Jane..........................1
Using the macro from the "Symptoms" section above, a table of authorities will look like this:
Joe vs. Jane..........................1
Note that the Category title "CASES" (without the quotation marks) is missing. This is because the macro does not create the [Table of Authorities Categories] section in the WINWORD6.INI file.
REFERENCES
"Microsoft Word Developer's Kit," version 6.0, page 541
Additional query words: 6.0 winword toa table of authorities categories category winword6.ini macro InsertTableofAuthorities
Keywords : kbmacro kbofficeprog
Issue type :
Technology :
Last Reviewed: March 28, 2000 |