I'm using tocloft package to format Table of Contents.
The problem is reproduced in the following minimal working example. The indentation level of Appendix A is incorrect. But the command \setlength{\cftchapnumwidth}{30mm} doesn't work for the second time.

Here is the text version of the picture:
Contents
Chapter 1. My chapter name bla bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla 2
Appendix A: My appendix name bla bla bla bla bla bla bla bla
bla bla bla bla bla bla bla bla bla bla bla bla 3
^ $
^ - incorrect indentation level (25 mm)
$ - correct indentation level (30 mm)
This picture was produces by the following code.
\documentclass[12pt,openany,oneside,a4paper]{book}
\usepackage[titles]{tocloft}
\begin{document}
\setlength{\cftchapnumwidth}{25mm} %25mm have been chosen manually
\tableofcontents
\chapter*{Chapter 1. My chapter name bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla}
\addcontentsline{toc}{chapter}{Chapter 1. My chapter name bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla}
Chapter text.
\appendix
\setlength{\cftchapnumwidth}{30mm} %This command doesn't work!
\chapter*{Appendix A: My appendix name bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla}
\addcontentsline{toc}{chapter}{Appendix A: My appendix name bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla}
Appendix Text.
\end{document}
I have no idea how to patch the code.
\setlength{\cftchapnumwidth}{30mm}has to go before\tableofcontents, it is there it is used not within the text itself. Regarding your manual addingChapter, thememoirclass can do this automatically plusmemoirhas thetocloftfeatures build in. – daleif Mar 07 '12 at 23:07\chapter*and\addcontentsline; why don't you simply use\chapter? – Gonzalo Medina Mar 07 '12 at 23:08