Results 1 to 2 of 2
2007-11-16, 18:28 #1
- Join Date
- Jan 2004
- Mount Prospect, Illinois
- Thanked 0 Times in 0 Posts
Internationalization of TOCs (2002, 2003, 2007)
I'm having problems with TOCs and Tables of Figures when used in other languages/regional settings.
Documents with TOCs/TOFs in them seem to be just fine, but insertion of new TOCs/TOFs with styles listed, either by specifying the field text, e.g.
selection.fields.add selection.range wdFieldTOC, "t ""Appendices,2"""
or by inserting an existing one from an AutoText entry, results in an error message in the field. A little testing shows that replacing the comma with a semicolon (the list separator in the Regional and Language Options Control Panel) makes things work... but this is a major pain:
1) I set up the AutoText entries to simplify things, now I can't depend on their being valid
2) How would I fetch the current List Separator anyway, even if I could fix things?
a) Is there a region-free way to specify the codes in a TOC/TOF field? Semicolon doesn't work in English
[img]/forums/images/smilies/cool.gif[/img] Any other suggestions? I could build from scratch, using toc.HeadingStyles.Add -- how many versions of Word support that? Or I could do a Replace() function to change the commas to semis, assuming I knew when to use semis...
Word and VBA never pass up an opportunity to confound.
(my previous internationalization issue was that the ColumnWidths property of list boxes wants 1,3 instead of 1.3 in some regions -- so "1.3;1.5" wouldn't work, but 1.3 & ";" & 1.5 does!)
2007-11-16, 18:35 #2
- Join Date
- Mar 2002
- Thanked 28 Times in 28 Posts
Re: Internationalization of TOCs (2002, 2003, 2007)
To retrieve the list separator for the system running the code, use
And the decimal separator is