The code is in my Normal template, along with all my other macros. I tried saving it in the template (and the template as a docm), but same result.
It makes sense that the linked template shouldn't change, but it seems that every time I go back to a document on SP that's had multiple edits, the template is back to "Normal". These people wouldn't be running any code (at least not that they know of!). So I make linking it back to the right template part of the macro.
When I do ctrl+Q and ctrl+space it shows as "Heading 1" all the way through.
Attached is a sample template: not the one I was working on, but has the same result. Click into the line that's styled as Heading 1, Right click list style "Numbered Headings", edit, change "Start At" to 4. "1. Heading 1" becomes "4. Heading 1", which is what I want. Run the macro, and it changes back to "1. Heading 1".
If you look at the "locals" window, it reads the correct value into "x" (in this case, 4), but the last line of code which is supposed to set the value back to "x" once the styles have been updated doesn't change anything: the headings still start at 1.
|