A code C in the Hamming graph Gamma = H(m, q) is a subset of the vertex set V Gamma of the Hamming graph; the elements of C are called codewords. Any such code C induces a partition {C, C-1, ..., C-rho} of V Gamma, where rho is the covering radius of the code, based on the distance each vertex is to its nearest codeword. For s is an element of {1, ..., rho} and X <= Aut(C), if X is transitive on each of C, C-1, ..., C-s, then C is said to be (X, s)- neighbour-transitive. In particular, C is said to be X-completely transitive if C is (X, rho)-neighbour-transitive. It is known that for any (X, 2)-neighbour-transitive code with minimum distance at least 5, either i) X is faithful on the set of coordinate entries, ii) C is X-alphabet-almost-simple or iii) C is X-alphabet-affine. Classifications of (X, 2)-neighbour-transitive codes in the first two categories having minimum distance at least 5 and 3, respectively, have been achieved in previous papers. Hence this paper considers case iii). Let q = p(dm) and identify the vertex set of H (m, q) with F-p(dm). The main result of this paper classifies (X, 2)-neighbour-transitive codes with minimum distance at least 5 that contain, as a block of imrimitivity for the action of X on C, an F(p- )subspace of F-p(dm) of dimension at most d. When considering codes with minimum distance at least 5, X-completely transitive codes are a proper subclass of (X, 2)-neighbour-transitive codes. This leads, as a corollary of the main result, to a solution of a problem posed by Giudici in 1998 on completely transitive codes.