Select Case ThisDoc.Document.UnitsOfMeasure.Massunits
Case 11283 'kilogram If iProperties.Mass > 0.1 Then iProperties.Value("Custom", "Hmotnost") = Round(iProperties.Mass,2) & " kg" Else iProperties.Value("Custom", "Hmotnost") = Round(iProperties.Mass * 1000) & " g" End If Case 11284 'gram If iProperties.Mass > 100 Then iProperties.Value("Custom", "Hmotnost") = Round(iProperties.Mass / 1000,2) & " kg" Else iProperties.Value("Custom", "Hmotnost") = Round(iProperties.Mass) & " g" End If End Select
No comments:
Post a Comment