' ========================================================= ' This macro inserts a ToC entry for the selected text ' ToC is built at the bottom of the document, before the tag ' ========================================================= Sub MAIN EditCopy StartOfLine Insert "__tmp_anchor__" Insert " " EditFind .Find = "/body", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .Format = 0, .Wrap = 2, .FindAllWordForms = 0 StartOfLine InsertPara LineUp 1 Insert "
" EditPaste Insert "" EditFind .Find = "__tmp_anchor__", .Direction = 1, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .Format = 0, .Wrap = 2, .FindAllWordForms = 0 EditCut End Sub ' ========================================================= ' This macro inserts a double-linked endnote ' with selected text as note symbol, before the tag ' ========================================================= Sub MAIN EditCopy EditClear Insert "__tmp_anchor__" Insert " [" EditPaste Insert "]" EditFind .Find = "/body", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .Format = 0, .Wrap = 2, .FindAllWordForms = 0 StartOfLine InsertPara LineUp 1 Insert "
[" EditPaste Insert "]" Insert " " InsertPara Insert "Replace _this_with_Note_" EditPaste EditFind .Find = "__tmp_anchor__", .Direction = 1, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .Format = 0, .Wrap = 2, .FindAllWordForms = 0 EditCut End Sub