This can be done by writing a script and using the HelpNDoc API. These scripts can be built and run with the Script Editor. The object we need to use is HndTopics
.
The HndTopics
object includes some useful methods:
GetTopicDescription
SetTopicDescription
These can be used in combination with the Pascal functions Pos
/ StringReplace
.
var
// Current topic ID
aTopicId, aTopicDesc, aTopicDescNew: string;
begin
try
// Get first topic
aTopicId := HndTopics.GetTopicFirst();
// Loop through all topics
while aTopicId <> '' do
begin
// Does this topic description include the phrase?
aTopicDesc := HndTopics.GetTopicDescription(aTopicId);
if (pos('Midweek Editor', aTopicDesc) <> 0) then
begin
aTopicDescNew := StringReplace(aTopicDesc, 'Midweek Editor', 'Meeting Editor', [rfReplaceAll]);
HndTopics.SetTopicDescription(aTopicId, aTopicDescNew);
Print('Old: ' + aTopicDesc);
Print('New: ' + aTopicDescNew);
end;
// Get next topic
aTopicId := HndTopics.GetTopicNext(aTopicId);
end;
finally
end;
end.