Quantcast
Channel: Word for Developers forum
Viewing all articles
Browse latest Browse all 4350

Rename styles in Word document

$
0
0

Hi there

I have been trying to rename styles in a bunch of Word documents but am kind of stuck as NameLocal is read only.

As a workaround, I vaguely thought of duplicating the style to be replaced, then apply the duplicate to all instances and finally delete the original style. But then I didn't find out how to duplicate a style...

The only solution I can think of right now would be:

  1. Create all new styles manually in a separate document, kind of master document.
  2. Copy them to each of the documents to be modified.
  3. Find out in every document if the style to be "renamed" is in use, and if so, apply the new style instead (I have a table with pairs of old and new style names, of course).
  4. Delete the style that has now become obsolete.

Does somebody know any shorter way to do this?

By the way, we're talking about C#, VSTO and Office 2010 here. Office 2013 would be possible too, if that makes a difference.

Kind regards, and thanks in advance for any helpful suggestions and thoughts.

Nora


Viewing all articles
Browse latest Browse all 4350

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>