Word 2013 "this is not a valid style name"

1.4k Views Asked by At

**Edit:

BUG FOUND: I found the "invalid stylesheet". It is S28 in this case, there is no 'name' in front of the semicolon. This creates an extra space before the semi-colon. I found other instances of "sl0 ;" that worked fine. It's that extra space ('sl0 . ;') that was causing the issue.

So a bit of a background, we are taking .rtf files created in a medical EMR (Epic) and converting them to .tiffs for a vendor. Most all of the files are fine, but there are a few that are getting formatted weirdly, but I can't figure out why. What happens is the error pops up which stops the conversion script (Which basically just opens Word and prints it via file to tif). The error I'm getting is:

"This is not a valid style name."

Is there a way to trace this to figure out what exactly is causing the problem? I have searched and the very very few results that came up point to the filename (Which is fine. Even renaming does not help). Here is a copy of the stylesheet information (broken down), which may or may not help:

{\stylesheet
{\f0\fs24 Normal;}
{\cs1 Default Paragraph Font;}
{\s2\snext0\fi0\li0\ri0\sb0\sa0\sl0 Definition Term;}
{\s3\snext0\fi0\li360\ri0\sb0\sa0\sl0 Definition List;}
{\cs4\i Definition;}
{\s5\snext0\outlinelevel1\fs48\b\fi0\li0\ri0\sb100\sa100\sl0\outlinelevel1\keepn H1;}
{\s6\snext0\outlinelevel2\fs36\b\fi0\li0\ri0\sb100\sa100\sl0\outlinelevel2\keepn H2 ;}
{\s7\snext0\outlinelevel3\fs28\b\fi0\li0\ri0\sb100\sa100\sl0\outlinelevel3\keepn H3;}
{\s8\snext0\outlinelevel4\fs24\b\fi0\li0\ri0\sb100\sa100\sl0\outlinelevel4\keepn H4;}
{\s9\snext0\outlinelevel5\fs20\b\fi0\li0\ri0\sb100\sa100\sl0\outlinelevel5\keepn H5;}
{\s10\snext0\outlinelevel6\fs16\b\fi0\li0\ri0\sb100\sa100\sl0\outlinelevel6\keepn H6 ;}
{\s11\snext0\i\fi0\li0\ri0\sb0\sa0\sl0 Address;}
{\s12\snext0\fi0\li360\ri360\sb100\sa100\sl0 Blockquote;}
{\cs13\i CITE;}
{\cs14\f2\fs20 CODE;}
{\cs15\ul0\uldb0\i Emphasis;}
{\cs16\ul\cf6 Hyperlink;}
{\cs17\ul\cf8 FollowedHyperlink;}
{\cs18\f2\fs20\b Keyboard;}
{\s19\snext0\f2\fs20\fi0\li0\ri0\sb0\sa0\sl0 Preformatted;}
{\s20\snext0\f0\fs16\v\brdrt\brdrdb\brdrcf4\fi0\li0\ri0\sb0\sa0\sl0\qc z-Bottom of Form ;}
{\s21\snext0\f0\fs16\v\brdrb\brdrdb\brdrcf4\fi0\li0\ri0\sb0\sa0\sl0\qc z-Top of Form;}
{\cs22\f2 Sample;}
{\cs23\b Strong;}
{\cs24\f2\fs20 Typewriter;}
{\cs25\i Variable;}
{\cs26\v\cf9 HTML Markup;}
{\cs27\v Comment;}
{\s28\snext0\cf4\cb1\chcbpat1\fi0\li0\ri0\sb0\sa0\sl0  ;}
{\s29\snext0\fs24\cf4\cb1\chcbpat1\fi0\li0\ri0\sb0\sa0\sl0 header;}
{\s30\snext0\fs24\cf4\cb1\chcbpat1\fi0\li0\ri0\sb0\sa0\sl0 footer;}
{\cs31\f3\fs22\cf4 EmailStyle15;}
}
0

There are 0 best solutions below