You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the best method to change the VTType of a property?
I'm asking this because I noticed that when you create a numeric custom property in Word, its VTType depends on the value assigned to the property. If I assign an integer the VTType will be VT_I4 instead if I assign a decimal value the VTType will be VT_R8. This seems reasonable initially, but what happens when a user changes the values?
Well, if I change the previous integer value of the numeric custom property to a decimal value, the VTType will change from VT_I4 to VT_R8 and it still makes sense. Same way if I change the previously decimal value to integer the numeric custom property VTType will change from VT_R8 to VT_I4.
I noticed that the custom property ID doesn't change when the VTType changes, therefore I guess the software updates its value.
How do we manage this situation with openmcdf? VTType is read-only, I guess the solution is to delete the property and recreate it with the same ID, the new VTType, and the new value. Is this the right approach? Or perhaps the VTType should be read-write?
Note that Solid Edge files have the same behavior so it must be an MS specific
The text was updated successfully, but these errors were encountered:
I've just been doing it by deleting and readding the properties, though I'm mostly working with a specific set of custom properties that need to be a specific type, so if the current type is different then it's wrong anyway.
I'm not sure what the best approach in general is - changing the property type for user defined properties might be useful sometimes, but all the default ones (In SummaryInformation etc) have fixed types defined by Microsoft, so it doesn't really make sense to allow those to be changed.
Yes my issue it's about custom properties where I can change iteratively the type but more important, for integer versus decimal it change seamlessly by the software
What is the best method to change the VTType of a property?
I'm asking this because I noticed that when you create a numeric custom property in Word, its VTType depends on the value assigned to the property. If I assign an integer the VTType will be VT_I4 instead if I assign a decimal value the VTType will be VT_R8. This seems reasonable initially, but what happens when a user changes the values?
Well, if I change the previous integer value of the numeric custom property to a decimal value, the VTType will change from VT_I4 to VT_R8 and it still makes sense. Same way if I change the previously decimal value to integer the numeric custom property VTType will change from VT_R8 to VT_I4.
I noticed that the custom property ID doesn't change when the VTType changes, therefore I guess the software updates its value.
How do we manage this situation with openmcdf? VTType is read-only, I guess the solution is to delete the property and recreate it with the same ID, the new VTType, and the new value. Is this the right approach? Or perhaps the VTType should be read-write?
Note that Solid Edge files have the same behavior so it must be an MS specific
The text was updated successfully, but these errors were encountered: