  Let $\Omega \subseteq \mathbb{R}^d$ be open and $D\subseteq \partial\Omega$
be a closed part of its boundary. Under very mild assumptions on $\Omega$, we
construct a bounded Sobolev extension operator for the Sobolev space
$\mathrm{W}^{k , p}_D (\Omega)$, $1 \leq p < \infty$, which consists of all
functions in $\mathrm{W}^{k , p} (\Omega)$ that vanish in a suitable sense on
$D$. In contrast to earlier work, this construction is global and \emph{not}
using a localization argument, which allows to work with a boundary regularity
that is sharp at the interface dividing $D$ and $\partial \Omega \setminus D$.
Moreover, we provide homogeneous and local estimates for the extension
operator. Also, we treat the case of Lipschitz function spaces with a vanishing
trace condition on $D$.
