ViewCode Method From Microsoft Word Visual Basic previous page next page ViewCode Method Displays the code window for the selected ActiveX control in the specified document. Note This method is available only from outside of Word. expression.ViewCode expression Required. An expression that returns a Document object.