Option Explicit 'Sub Main Sub BlamNcCode Dim doc As MFGDocument Set doc = Application.ActiveDocument If Not doc.ResultsWindow.Active = eSWT_NCCode Then If Not doc.ToolpathsAreValid Then doc.SimToolpath False End If doc.Post End If End Sub