Dim oCDs As ControlDefinitions = ThisApplication.CommandManager.ControlDefinitions Dim oUpdateStyles As ControlDefinition = oCDs.Item("UpdateStylesCmd") oUpdateStyles.Execute2(False) AppActivate(ThisApplication.Caption) System.Windows.Forms.SendKeys.SendWait("Y ") 'ThisApplication.UserInterfaceManager.DoEvents() 'oCDs.Item("PurgeStylesCmd").Execute 'Purge Unused styles