Thank you Andrew!
I see that your code for updating the styles is much simpler than what I had, however my documents are all on SharePoint and accessed by lots of people, most of whom don't have access to the template, so it's forever being set back to "Normal". For each job I work on I modify the macro to have the path to the correct template for that job. Perhaps there's a way to code the template path into each file so the macro reads it from there, but that's for another time.
I've put in the steps you wrote, and stepping through it I can see that "x" gets assigned the correct value, however the step "aLT.ListLevels(1).StartAt = x" doesn't set the value. So the result is that the document still ends up with whatever "StartAt" value is set in the template, not the value of "x". Any idea why?
I've just purchased myself a couple of Word VBA courses on Udemy: determined to learn the underlying principles such as why you sometimes need "Set" when filling and variable and sometimes not!
|