wordpress hit counter
Re: Renaming Styles - WordprocessingML - Formats - OpenXML Developer

Re: Renaming Styles

Formats

Discussions about working with different Open XML Formats

Renaming Styles

  • rated by 0 users
  • This post has 2 Replies |
  • 0 Followers
  • In my attempt to go through and rename styles before feeding multiple docx's into a merge library I have created a large and complicated routine that modifies the <w:style w:styleId="..."> and <w:name w:val="..."> attributes of the style element. Then modifies any reference to old style id's in the rest of the docx.

    This seems as if it shouldn't be this laborious, does anyone know of a better way?
    -nomad311
  • i am working on styles too these days, i don't know what is the laborous work you've done in your code, but i would like to hint whether you've noticed that the SDK has provided certain properties in the Style class ,through which your code could directly access the Style children which are mostly of single key-value pairs,read the code hereunder:

    Style s = new Style();
    s.StyleID = "New Style";
    s.StyleName = "New Style Name";
    ...
    Welcome to visit my Blog:xiaoyuvax.spaces.live.com Follow me on Twitter: twitter.com/xiaoyuvax
  • I can only assume that your using the 2.0 SDK, which I am unfortunately unable to use in its current state :(

    Thanks for the suggestion though,
    -nomad311
Page 1 of 1 (3 items)