Does anyone know the enumerations for the GetOpenTypeFeature method would be expecting? I've tried several variations on what shows up in the application but to no avail. Receive the 'Invalid value specified for parameter Feature' error. [usage] textRange.GetOpenTypeFeature(feature as string)
You can use the Application.GetSupportedOpenTypeFeatures to get the list of available OpenType Features, its a long list so I will not post the entire list here but you will get something like this:
aaltabvfabvmabvsafrcakhnblwfblwmblwsc2pcc2sccaltcaseccmpcfarcjctcligcpctcpspcswhcurs
You can then use the Feature string with the GetOpenTypeFeature. So for example, if I wanted to see if the TextRange is using Case-Sensitive Forms you would use "case", here is a simple example:
If ActiveShape.Text.Story.GetOpenTypeFeature("case") Then MsgBox "Case-Sensitive Forms are used" Else MsgBox "Nope, no Case-Sensitive Forms" End If
If you want to set the Feature on or off you can so something like this:
' Turn the feature on ActiveShape.Text.Story.SetOpenTypeFeature "case", 1 ' Turn the feature off ActiveShape.Text.Story.SetOpenTypeFeature "case", 0
Hope that helps,
-Shelby