Article ID: 181538
Article Last Modified on 6/17/2005
ActiveWindow.ActivePane.View.Type = wdOutlineViewNOTE: The second occurrence of this statement in the sample macro in the "More Information" section of this article immediately follows the "ActiveDocument.Close" statement.
' ActiveWindow.ActivePane.View.Type = wdOutlineView
Note the apostrophe at the beginning of the line.
Sub Test()
ActiveDocument.SaveAs FileName:="test.doc",FileFormat:= _
wdFormatDocument, LockComments:=False, Password:="", _
AddToRecentFiles:=True, WritePassword:="", _
ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False, _
SaveAsAOCELetter:=False
ActiveWindow.ActivePane.View.Type = wdOutlineView
ActiveDocument.Save
ActiveDocument.Close
ActiveWindow.ActivePane.View.Type = wdOutlineView
Documents.Open FileName:="test.doc", ConfirmConversions:=False, _
ReadOnly:= False, AddToRecentFiles:=False, PasswordDocument:="", _
PasswordTemplate:= "", Revert:=False, WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto
End Sub
163435 VBA: Programming Resources for Visual Basic for Applications
Additional query words: wordcon
Keywords: kbbug kbnofix kbmacro kbdtacode KB181538