did you know that a link with an anchor does not work when the page is not loaded ?
The macro table of contents as a workaround does not work either
see this example : https://constructbuy.atlassian.net/wiki/spaces/CTOKB/pages/109838627/Tips+to+get+you+started#Taskbar