We\'ve had these few lines of code running happily in our applications for several years (and in several versions of Office, 2003, 2007, 2010 etc). Purpose is to perform a kind
In my case, this error was caused by the presence of content controls with .LockContentControl == true
.
To work around this issue, I built an IEnumerable
of the content controls with this property set to true, and set .LockContentControl = false
.
Now I can .InsertColumnsRight()
without a problem. Then I restore the .LockContentControl = true
for all content controls in my collection.