Let A be a domain of the boundary of a (weakly) pseudoconvex domain Ω of ℂn and M a smooth, closed, maximally complex submanifold of A. We find a subdomain E of ℂn, depending only on Ω and A, and a complex variety W⊂E such that bW=M in E. Moreover, a generalization to analytic sets of depth at least 4 is given.