Inside the Delphi code :
uses ..., ComObj; const wdListNumberStyleBullet = 23; var vMSWord : variant; Doc : Variant; oListTemplate : Variant; oListLevel : Variant; iLoopTemplates, iMaxTemplates: Integer; iLoopLevels, iMaxLevels : Integer; begin try vMSWord := GetActiveOleObject('Word.Application'); vMSWord.Visible := True; Doc := vMSWord.ActiveDocument; iMaxTemplates := Doc.ListTemplates.Count; for iLoopTemplates := 1 to iMaxTemplates do begin oListTemplate := Doc.ListTemplates.Item(iLoopTemplates); iMaxLevels := oListTemplate.ListLevels.Count; for iLoopLevels := 1 to iMaxLevels do begin oListLevel := oListTemplate.ListLevels.Item(iLoopLevels); if (oListLevel.NumberStyle = wdListNumberStyleBullet) and (oListLevel.NumberFormat = UTF8String(
The current IF checks if it is & bull; bullet wih a *
If you do not need this check, comment out this line (if ...) and uncomment the following ...
Whiler
source share