Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
WCrihfield
in reply to: steveh3

Hi @steveh3.  This should do it for you.  I just got rid of the question in the middle of the loop, and the conditional statement, based on the answer to that question.  Then condensed some stuff a bit.

'This logic runs thru all of Drawings Styles and updates them.
Sub Main()
	OpenDoc = ThisDoc.Document
	oStyles = OpenDoc.StylesManager.Styles
	'Runs thru all Styles and see if they are up to date
	For Each oStyle As Style In oStyles
		If Not oStyle.UpToDate Then oStyle.UpdateFromGlobal
	Next
	Try : OpenDoc.Save : 	Catch : End Try
	'Tells user that Styles have been updated.
	MessageBox.Show("Drawing Styles have been Updated" & vbCr & oFile)
End Sub

If this solved your problem, or answered your question, please click ACCEPT SOLUTION .
Or, if this helped you, please click (LIKE or KUDOS) :thumbs_up:.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)