View Single Post
 
Old 07-30-2013, 03:55 AM
ajay_p5 ajay_p5 is offline Windows 7 32bit Office 2010 32bit
Novice
 
Join Date: Jul 2013
Posts: 2
ajay_p5 is on a distinguished road
Default TOC not updated due to regional "separator" settings

Hi:

I have a document template (.docx), which is used by different user groups in different parts of the world. Since, the different regions have different separators defined by OS settings, the TOC doesn't get updated automatically and throws an error. To mitigate this problem, I check the separator using this code , which I found online:
Code:
{ IF { =product(2;3) } = 6 "{ SET list ";" }" "" }{ IF { =product(2,3) } = 6 
"{ SET list "," }" "" }
{ TOC \t "style1{ list }1{ list }style2{ list }2" \h \z \u }
This solves the problem to a certain extent. However, whenever I try to update the TOC before the first part of the code is executed, it throws an error.

Is there a way that the first part of code is executed
automatically, whenever someone tries to update the TOC.

Please note that, this code needs to be invisible so nobody can change it and VBA is not an option.

Any useful suggestion will be highly appreciated. Please let me know if something is unclear. Thanks.

Best Regards,
Ajay
Reply With Quote