I want to change in the table of contents the look of the parts. I reproduced on Word what I want :
I've looked into the site if the question was already answered but I didn't found what I want.
All I want is to center the part name in the TOC and also get rid of the page number. I am using the book class and I don't want to use other document classes.
Thank you.
EDIT. Here is my MWE :
\documentclass{book}
\begin{document}
\tableofcontents
\part{First part}
\chapter{A first chapter}
\chapter{A second one}
\part{Second part}
\chapter{A third one}
\chapter{The last one}
\end{document}
Here is my preambule with titlesec :
\documentclass{book}
%Redifining paragraph spacing and thus spacing in the TOC
\usepackage{titlesec}
\usepackage{parskip}
\setlength{\parskip}{ 0.4\baselineskip}
\titlespacing\section{0pt}{9pt plus 4pt minus 2pt}{5pt plus 2pt minus 2pt}
\titlespacing\subsection{0pt}{9pt plus 4pt minus 2pt}{2pt plus 2pt minus 2pt}
\titlespacing\subsubsection{0pt}{9pt plus 4pt minus 2pt}{2pt plus 2pt minus 2pt}
\setlength\parindent{0pt}
% Here the code of Christian Hupfer
\usepackage{tocloft}
\renewcommand\cftpartpresnum{\hfill}
\renewcommand\cftpartleader{\hfill}
\begin{document}
\tableofcontents
\part{First part}
\chapter{A first chapter}
\chapter{A second one}
\part{Second part}
\chapter{A third one}
\chapter{The last one}
\end{document}



