The following uses zref's savepos module to store the x-coordinate at the call to \fillparbox, as well as the x-coordinate after issuing an \hfill. The difference between these two x-coordinates then provides the width of a \parbox that you can place there:

\documentclass{article} \usepackage[margin=1in]{geometry} \usepackage[nopar]{lipsum} \usepackage{zref-savepos} \newcounter{fillparbox} \newcommand{\fillparbox}[2][c]{% \stepcounter{fillparbox}% New \fillparbox \mbox{}\zsaveposx{\thefillparbox-L}\hfill\zsaveposx{\thefillparbox-R}% Mark Left and Right end-points remaining on line. \makebox[0pt][r]{\parbox[#1]{\dimexpr\zposx{\thefillparbox-R}sp-\zposx{\thefillparbox-L}sp}{\strut #2\strut}}% } \begin{document} \lipsum[1] \fillparbox{\itshape\bfseries one two three four five six seven eight nine ten eleven twelve thirteen} \lipsum[2] \fillparbox{\itshape\bfseries one two three four five six seven eight nine ten eleven twelve thirteen} \lipsum[3] \fillparbox[t]{\itshape\bfseries one two three four five six seven eight nine ten eleven twelve thirteen} \end{document}
You can still issue the various alignment options association with \parbox, the default being [c]entred (vertically). \struts are inserted to ensure a consistent baseline (see How to keep a constant \baselineskip when using minipages (or \parboxes)?).
align): Compute remaining horizontal space in align environment.