Error! Style Not Defined appears in header of MS Word target

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.

Error! Style Not Defined appears in header of MS Word target

Postby Jane Dudgeon on Fri Oct 03, 2008 6:22 am

Hello all. On several Flare (4) projects, I have seen this on the Header of every page in a MS Word target.
"Error! Style Not Defined
I know that the correct style was defined when building the Word target.
Has anyone else seen this in the header? My employer will not pay for customer support, so I would be very grateful if someone would either reply to my situation or would someone who has customer support please inquire about this?
Jane :cry:
Jane Dudgeon
Propeller Head
Posts: 13
Joined: Wed Sep 03, 2008 1:06 pm

Re: Error! Style Not Defined appears in header of MS Word target

Postby wclass on Fri Oct 03, 2008 7:05 am

This error occurs if you have specified running headers in your output, but the generated style can't be found.

What styles from the generated Word document do you want in the running header? The standard H1, H2 etc should work, but if you have added a class to your styles, like "h1.mystyle", then you have to specify "h1_mystyle" in the header variables - that is, with an underscore in the name.
Check what the style name is once it gets to Word - this is what will have to be in the header variable.
Margaret Hassall - Melbourne
Propellus Maximus
Posts: 1233
Joined: Mon Feb 27, 2006 5:56 am
Location: Melbourne, Australia

Re: Error! Style Not Defined appears in header of MS Word target

Postby KevinDAmery on Fri Oct 03, 2008 7:09 am

I've seen this before - it's one of those goofy things that happens when Word decides to be "helpful." Basically, if Word sees that you have two or more styles that look the same, it combines them all together into one style, which is named the same as the first one it came across. This can be a real pain because in many cases we have classes of headings for different purposes - they look the same, but other parameters are different, such as always having a page break before or not. Word ignores those parameters, unfortunately, when it comes to style combining.

So, if it combines styles and the style whose name it took doesn't match the one you applied the styleref to in the header, naturally it doesn't find anything to put in the header and says that the style isn't defined. It *was* defined when it left Flare, of course, but sometimes Word thinks its smarter than you are (it's never right, but that doesn't stop it from going ahead with whatever hare-brained scheme it has in mind).

What I did to get around this was to make a visual variation in the headings that were prone to the problem. For example, I made the H1 style I use for my TOC use black text as well as not having a page break before, then made my normal H1 style use one of our corporate colours along with the page break before. Because of the colour change, Word doesn't think they're the same style so it leaves the style names intact.

Until next time....
Kevin Amery
Certified MAD for Flare
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Return to Printed Documentation Targets

Who is online

Users browsing this forum: No registered users and 3 guests