Word Output

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
alijs28
Jr. Propeller Head
Posts: 5
Joined: Thu Mar 05, 2015 7:57 am

Word Output

Post by alijs28 »

Hi all,

I've been using Flare for a few months now and have recently upgraded to version 11. I have three projects that have both HTML5 and PDF output. However, now I need to make Word Output. So, I tried just adding a new target type and building it, but I get this message on the bottom of every page:
"Error! Use the Home tab to apply h1 to the text that you want to appear here."

How can I get this to go away?

Thanks
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Word Output

Post by Nita Beck »

Welcome to the forums! :)

Despite my friendly welcome, I not sure what to advise, but that's because I need more information. Where is that string of characters coming from? Is it something in the page layout you've associated with the Word target? Or (and this is what I suspect), is that string of characters at the bottom of the master page that you use for your online output and you've associated that master page with your Word output? In early versions of Flare, master pages were used for both online output and Word output, but around Flare 3 or 4, page layouts were introduced to use for print output, including Word.

So, in your Word target, look in two places:
-- On the General tab, for the Master Page Layout (which actually refers to a page layout file, not a master page file; confusing, I know), make sure you have selected the appropriate page layout file.
-- On the Advanced tab, under Master Page (which actually does refer to a master page file), make sure it says "(default)", in other words, there's no associated master page.

I'm making a lot of guesses here, BTW. Please try to give a bit more information so we can help you troubleshoot the problem.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
devans
Sr. Propeller Head
Posts: 108
Joined: Thu Sep 09, 2010 9:56 pm
Location: Sydney Australia

Re: Word Output

Post by devans »

I get the same message in all my Word documents and have done since I started using Flare - back at version 8 I think. I'd love to know how to fix it in Flare.

What I do is go into my Word document footer, toggle field codes, change the {STYLEREF h1 \* MERGEFORMAT} field to {STYLEREF h1_heading1 \* MERGEFORMAT}, press F9 and then I get the right heading in the footer.

It's to do with the styles having different names in Flare and Word and I have not worked out how to map them.
dorcutt
Sr. Propeller Head
Posts: 234
Joined: Thu May 15, 2014 12:16 pm

Re: Word Output

Post by dorcutt »

I've also seen this error. I somehow got it resolved, but I didn't document how I did it (shame!).

Are you using a Master Page for the word output, or a page layout? Apparently, I'm using the standard System Heading.Level1 variable, but I'm doing it from a Master Page. I think that might have been key. (It's possible to set up your TOC so that the same TOC can be used with both Page Layouts and word Master pages simultaneously. PDF uses page/layout breaks and ignores the section breaks that Word needs. Additionally, it doesn't interfere with HTML5 master pages either). Wish I could provide more details but I can't right now.

devans, that's awesome work with figuring out the root cause of that and the workaround. I think I wanted to use H2 and H3 in my word headers too, but they weren't working even in a master page. I wonder if I added your workaround to a macro if I could resolve that. Thanks!
-Dan, Propellerhead-in-training
wclass
Propellus Maximus
Posts: 1238
Joined: Mon Feb 27, 2006 5:56 am
Location: Melbourne, Australia

Re: Word Output

Post by wclass »

I think I can help there.
Edit your header/footer variables and add the correct text as expected in the Word document.
For example, if you have in flare a style like "H1.Heading1" this will translate to "H1_Heading1" (dots to underscores)
This picture might help:
Flare_HeadersFooters.PNG
The format of H1.Heading looks like what is generated on import - I usually map Word Headings to the standard H1 or H2 and so have not really had this problem when later exporting.
You do not have the required permissions to view the files attached to this post.
Margaret Hassall - Melbourne
devans
Sr. Propeller Head
Posts: 108
Joined: Thu Sep 09, 2010 9:56 pm
Location: Sydney Australia

Re: Word Output

Post by devans »

Hi dorcutt. I am using a master page layout. The footer looks like this:
Master page footer.PNG
I did originally import all my documents from Word so that's probably where the issue arose.

wclass, I don't have any variables! Do I need to create variables for my headers and footers? Thanks.
You do not have the required permissions to view the files attached to this post.
dorcutt
Sr. Propeller Head
Posts: 234
Joined: Thu May 15, 2014 12:16 pm

Re: Word Output

Post by dorcutt »

Hrm, that looks like about what I do, devans. I'm not sure... maybe make sure that your headings are true H1 headings, not H1.Heading 1 or some such as a result of the Word import? Maybe that will solve your issue.

Wclass, I must confess I'm trying to understand what you did and I am definitely missing the concept. So you're saying you would create a custom variable named "Running H/F1" with the definition you describe and put it in the footer where devans has the traditional Heading.Level1 system variable? Where did you get the syntax for that variable definition? I've never seen anything like it (though it looks a bit like cross reference auto-numbering). I'm very intrigued, though, this looks like a new trick about Word output that I don't know, which is always very exciting.
-Dan, Propellerhead-in-training
wclass
Propellus Maximus
Posts: 1238
Joined: Mon Feb 27, 2006 5:56 am
Location: Melbourne, Australia

Re: Word Output

Post by wclass »

There are 2 types of variables - Heading Variables, and Running Headers, the latter works in Word, and the first works in PDF. It's a confusing issue that has been around for a while - I've not tested it recently as I don't create much PDF from Flare, and usually apply my own templates to get Word variables, but have some old projects that still work generating Word using master pages and not page layouts.
The Heading.Level1 looks like "heading variables". Running headers look like "paratext ..."
so I think we have got a mismatch of errors here.

You can search the forums for Running Headers and Heading Variables to get more information.

This Help page may also help with the running header set up:
http://webhelp.madcapsoftware.com/flare ... g%20header

To create a variable set, go to Project Organiser, right click and Add Variable Set ...
Then pick Running HF from the factory templates.
Then I just edited what was created.
Margaret Hassall - Melbourne
dorcutt
Sr. Propeller Head
Posts: 234
Joined: Thu May 15, 2014 12:16 pm

Re: Word Output

Post by dorcutt »

Excellent, thanks for the explanation Margaret. I had no idea that running headers existed. This is exactly why I participate in the forums... maybe I'll be able to get those stupid H2s and H3s working in Word output with this finally. I could only get the H1s working for some reason.
-Dan, Propellerhead-in-training
dorcutt
Sr. Propeller Head
Posts: 234
Joined: Thu May 15, 2014 12:16 pm

Re: Word Output

Post by dorcutt »

Oh, devans, one more thing. I just did this myself accidentally.

Double-check that the ToC is actually using the Master Page that you think it's using. I accidentally linked to a Page Layout instead, and I just got this error again.
-Dan, Propellerhead-in-training
devans
Sr. Propeller Head
Posts: 108
Joined: Thu Sep 09, 2010 9:56 pm
Location: Sydney Australia

Re: Word Output

Post by devans »

Thanks to both of you for your suggestions. I will look into running headers, Wclass.

Dorcutt, my target is linked to a Master Page Layout on the General tab. The Master Page on the Advanced tab is set to Default. I think I remember reading that master pages are used for online outputs while master page layouts are used for print output?
wclass
Propellus Maximus
Posts: 1238
Joined: Mon Feb 27, 2006 5:56 am
Location: Melbourne, Australia

Re: Word Output

Post by wclass »

On the Advanced tab, you should also tick "Disable master Pages ..." to ensure that you use the Page Layout on the general tab rather than the Master Page on the Advanced tab.
Margaret Hassall - Melbourne
dorcutt
Sr. Propeller Head
Posts: 234
Joined: Thu May 15, 2014 12:16 pm

Re: Word Output

Post by dorcutt »

Master pages are also used for Word output, oddly. It's just not mentioned much because Word is definitely the poor, ignored cousin of most other output types.

I actually specify which Master Page I'm using for my word output directly from the ToC. I set up a new section break and pick the Master Page that I want to use. As I recall, (it's been a while since I had to mess with this) if no default Page Layout is set in the target, the master page will be applied correctly in Word output, even if there's also a Chapter/Page Layout break that specifies a Page Layout. Best yet, this does not interfere with the HTML5 master page, which takes precedent over the ones specified by Section breaks.

I don't actually mess around with Master Page Layouts at all, so I couldn't tell you much about that. I'm not sure if the way that I do it is best or not, but it definitely works for me.

In any case, I was mostly recommending just making sure that the Master Page that you think is being applied is in fact what is being applied. If there is a Page Layout with an identical appearance, it might be secretly being used instead. Another way of testing would be to add (temporarily of course) something obnoxious to the master page you're trying to use like THIS IS THE WORD MASTER PAGE.
-Dan, Propellerhead-in-training
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Word Output

Post by Nita Beck »

dorcutt wrote:I actually specify which Master Page I'm using for my word output directly from the ToC. I set up a new section break and pick the Master Page that I want to use...
Dan, I think you're muddying the waters here, but I ultimately think it's poor labeling in the Flare UI that is to blame.

First, some history: When Flare was first invented and for several of its early releases, there were only master pages. Master pages were used for both online output and Word output (and I really can't recall if for PDF output, too). Master pages traditionally are stored in Resources\Master Pages.

Somewhere around Flare 4, page layouts were introduced. These were offered as a better way to design the layout of pages for print output (Word, PDF, probably XPS [which I've never used]). Page layouts are traditionally stored in Resources\Page Layouts.

Also, at that time, a new option was added to the Target Editor's General tab for print targets, unfortunately labeled as "Master Page Layout". People get confused by this. Does this mean a "master page" or a "page layout"? It means the "page layout" to be considered the "master" page layout in the Flare UI, the same as one can specify a "master" stylesheet.

When you say that you specify a "master page" on your TOC, I don't think that's right. I just looked in TOC properties for a TOC item and I see no field anywhere with which one specifies a "master page." I do see where one specifies a "page layout."

Dan, please don't feel picked on. I think the UI labeling makes this confusing for lots of users. I just want to ensure that we're all using the terms "master page" and "page layout" with precision.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
dorcutt
Sr. Propeller Head
Posts: 234
Joined: Thu May 15, 2014 12:16 pm

Re: Word Output

Post by dorcutt »

Hi Nita,

First off, by all means, I welcome feedback and being corrected. One of the reasons why I actually post on the forums is so that I can test my knowledge and to see if the good advice that I think that I'm giving is actually good advice.

I was cranking along pretty quickly on this one, so I was not as clear as I needed to be given the confusing terminology. Sorry about that. I should have just left well enough alone until I had more time. What I meant by this:
I don't actually mess around with Master Page Layouts at all, so I couldn't tell you much about that.


was that on the General tab, I leave the Master Page Layout as default for Word targets. This is very important, or my method does not work for some reason. I don't even specify a Master Page to use in the Master Page drop-down on the Advanced tab either... I just leave it as "Default." I actually do specify the Master Page to use at the ToC level.

What I do is I right-click a ToC item, select "Properties," and activate the Printed Output tab. I check the Section Break checkbox, then select the Master Page that I want to use from the drop-down menu. This is a screenshot of one of the items in my actual main ToC. I use it to generate Word output all the time, so it definitely works:

Image

The Section Break coexists peacefully with the Page Layout breaks that are specified for the same ToC item, and so it's super convenient. I can use different Master Pages for my document, just like I'd use different Page Layouts. For instance, I have a blank Master Page that I use for the Title page, Table of Contents, and the like, and a different one with the standard headers, footers, and page numbers that I use for the actual content pages.

Using this method, I am able to use the same main ToC to generate all of my main variations of my HTML5, PDF, and Word output. It works really well and lets me have a very polished-looking Word output once my cleanup macros are run.

Sorry about the confusion. Is this any clearer?
-Dan, Propellerhead-in-training
devans
Sr. Propeller Head
Posts: 108
Joined: Thu Sep 09, 2010 9:56 pm
Location: Sydney Australia

Re: Word Output

Post by devans »

Lots of interesting information and suggestions, thanks. I do have Disable Master Pages ticked, and basically everything works ok except that original issue with the footers. Sounds like there's plenty of experimenting I can do though to tweak things and make them work better.
alijs28
Jr. Propeller Head
Posts: 5
Joined: Thu Mar 05, 2015 7:57 am

Re: Word Output

Post by alijs28 »

Thank you so much for all the helpful information and suggestions! I am going to play around with it and bit more and see if I can get this resolved! I may have further questions and I really appreciate all the feedback!
alijs28
Jr. Propeller Head
Posts: 5
Joined: Thu Mar 05, 2015 7:57 am

Re: Word Output

Post by alijs28 »

I tried wclass's suggestion in editing the running H/F variables as I think this is the key to getting rid of that error message, but how do I know what to put there.
I didn't originally create this project, so I'm not sure how it was setup initially.

Thanks for the help guys!
Last edited by alijs28 on Fri Jul 10, 2015 6:11 am, edited 1 time in total.
wclass
Propellus Maximus
Posts: 1238
Joined: Mon Feb 27, 2006 5:56 am
Location: Melbourne, Australia

Re: Word Output

Post by wclass »

When you create Word from a Flare project, the main styles, like H1 or H2, will keep the same names and you won't have to edit anything.

If you have subclasses, for example, "H1.mystyle", then this is generated as a Word style with an underscore, like "H1_mystyle".
To have the running headers and footers work in Word then you have to make sure the field uses the style name that Word sees, which is the generated one with the underscore.

If you imported a Word document originally and either preserved styles or accepted the defaults, then you would end up with styles like "H1.Heading1". If you then export these out again as a Word document, the export process will put in an underscore, so it becomes "H1_Heading1". At this point you will get an error in the default running header as the header field is expecting just "H1".

So, what you have to edit is the Flare HeaderFooter variable definition to have the name of the style as it will appear once it is exported to Word.

I accept that this can get very confusing. I have found that I get best results by importing with NO styles preserved, but on the Paragraph sSyles tab for the import, make sure that styles map to the plain Flare style (h1) rather than the version that looks like "h1.(Ms Word Style)". This keeps the styles as simple as possible. Then, when exporting out, I run a macro that puts the content into a template of my choice and renames the styles (so I don't really use the Flare running headers anymore).
Margaret Hassall - Melbourne
Post Reply