Importing Word Lists

This forum is for all Flare issues related to importing files or projects.
Post Reply
Sean
Propeller Head
Posts: 57
Joined: Mon Apr 14, 2014 7:45 am

Importing Word Lists

Post by Sean »

Hi,

Am using the latest version of Flare and am importing a Word 2010 document that uses styles well. I am having the following issue and any advice is appreciated:

Numbered and bulleted lists in Word are created using styles. When I import the Word document, I the lists are no longer bulleted or numbered. I see the following HTML:

<ol>
<p>Numbered list item does not appear numbered in Flare.</p>
<p>Numbered list item does not appear numbered in Flare.</p>
</ol>

It's similar for bullets, except with the ul container tag. I would have expected list item tags to be used inside the ol/ul container, not p tags, such as the following:

<ol>
<li>Numbered list item does not appear numbered in Flare.</li>
<li>Numbered list item does not appear numbered in Flare.</li>
</ol>

Any thoughts appreciated.

Sean
Chicago_HPT
Sr. Propeller Head
Posts: 133
Joined: Sun Feb 03, 2013 6:01 pm

Re: Importing Word Lists

Post by Chicago_HPT »

Hi Sean,

I feel your pain! But, as it happens, I recently developed a workable solution for myself. Hopefully, it can help you too.

Before I get to the solution, though, you should know that it uses Flare's AutoNumber feature, which has it's own limitations. In particular, there are three very important things to keep in mind.
  1. AutoNumbered paragraphs are not lists, in the strict sense of the word. That means that typical list operations, such as a Restart Numbering menu option, do not exist.
  2. A related item is that, to control which numbered item is first, you will need to create two AutoNumbered styles in Flare. One resets the AutoNumbering to 1 (or A, or i, or I, or whatever). The other increments the numbering. Note: If you're importing, you may want to create both styles in your Word document too (and then, of course, apply the MyNumberStyleFirst style to the appropriate paragraphs in Word before importing).
  3. I've had problems creating numbered Word output in Flare, using AutoNumbers. How sadly ironic.
Okay, below is the solution I discovered. It works really, really nicely for imported Word documents that I'm converting to HTML5 output.
  1. Create AutoNumber paragraph styles in Flare, which you will map to their corresponding Word styles at import.
    For example, I use List Number (normal, Arabic numerals), List Number 2 (indented, lower-case alpha), and List Number 3 (indented twice, lower-case Roman) styles in Word, so I created the same styles in Flare, using AutoNumbering. I also created a ListNumberFirst style in Flare (no spaces in Flare style names). Note: You will need to set up, both, numbered lists and bulleted lists, if your Word bullets are also based on styles. However, you don't need "First" styles in Flare for bullets, thank goodness.
  2. Optional. Create a "First" style in Word and format the first item of your Word lists. Alternatively, don't do this in Word but be prepared to manually format each list in Flare by applying the "First" style where needed.
  3. Save a copy of your Word document for back-up purposes. The next step will make it clear why.
  4. In Word, remove the numbering (and bullets) from your list styles! It'll look weird in Word but will look great in Flare.
    The easiest way to do this for me was with a Word macro, but that's because I had several numbered styles and it would have been a pain to remove the numbering from each style. If you only have a couple of styles, it may be easier to just modify your Word styles so they aren't actually numbered. If you'd like to use the macro, however, I've attached it below.
    MFlareImportPrep.txt
  5. Save your numberless Word document (hence the backup copy) and then import it into Flare.
  6. Map your Word list paragraph styles to your Flare AutoNumber paragraph styles.
  7. Breathe a sigh of relief when you see your paragraphs numbered in Flare!
    You can also number other paragraphs in Flare by applying the AutoNumber list styles, just as you would apply your numbered styles in Word. Remember you'll need to "reset" the numbering with the "First" style, though, when creating new lists.
AutoNumbers in Flare can be a little tricky if you have multi-level lists, such as the List Number>List Number 2>List Number 3 format that I use, but the Flare AutoNumber Guide is pretty helpful. All the same, I've attached a small CSS file below also.
autonumber_para_styles.css
It may help you to figure out how you want to format your own numbers and bullets, or feel free to just paste it into your CSS as is.

I hope that helps!
-Jeff

P.S. The Word macro is in a Visual Basic for Applications (VBA) module format (.bas extension). You can import it into Word's Visual Basic Editor. If you're not familiar with the VBE, here are the steps to follow:
  1. Save the VBA module somewhere you can find it on your hard drive.
  2. Change the file extension of the file you just saved, from .txt to .bas (the forum doesn't allow us to upload files with a .bas extension).
  3. Open Word.
  4. Press Alt+F11 to open the Visual Basic Editor.
    The Microsoft Visual Basic Editor window displays. You should see a "tree" structure on the left with at least two main (bold) items in it. This is the Project Explorer pane. One of the bold items should be Normal. If you don't see the tree structure, press Ctrl+R to open the Project Explorer pane.
  5. In the Project Explorer pane, right-click Normal in the tree structure, and then select Import File from the context menu.
    The Import File dialog box displays.
  6. Use the dialog to find and select the VBA module you saved, then click Open.
    The Import File dialog closes and Word adds the selected VBA module to your Normal template in the Project Explorer.
  7. Click the Save icon in the toolbar or press Ctrl+S.
    Word saves your Normal template.
  8. Close the Microsoft Visual Basic Editor window.
When you're ready to remove the numbers and bullets, run the jlcRemoveListNumbers macro. If you don't know how to run a Word macro, you can find the instructions in Word help (or the Internet).

Good luck!
You do not have the required permissions to view the files attached to this post.
Sean
Propeller Head
Posts: 57
Joined: Mon Apr 14, 2014 7:45 am

Re: Importing Word Lists

Post by Sean »

What a fantastic response! And I missed it. Was contracting, trying to persuade a client to go to Flare, with which I was not super familiar, and was posing the question as I kicked the tyres of a trial version.

I very much appreciate the time you took into creating that response.

Sean
paintedturtle
Propeller Head
Posts: 88
Joined: Wed May 25, 2016 3:35 pm

Re: Importing Word Lists

Post by paintedturtle »

Chicago_HPT wrote:Hi Sean,

Good luck!
This was an extremely helpful post! I've had terrible problems with how multi-level lists are importing into Flare from Word. Our company is using a Flare consultant, who I've told we need a format for each level of list, and he was unconvinced. Your post re-affirms my suspicious. Thanks, Jeff!
Technical Writer using and experimenting with Flare version 12.0.5991.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Importing Word Lists

Post by ChoccieMuffin »

paintedturtle wrote:
Chicago_HPT wrote:Hi Sean,

Good luck!
This was an extremely helpful post! I've had terrible problems with how multi-level lists are importing into Flare from Word. Our company is using a Flare consultant, who I've told we need a format for each level of list, and he was unconvinced. Your post re-affirms my suspicious. Thanks, Jeff!
Welcome to the forums, Jeff.

I can understand the point of your Flare consultant, because it is possible (and rather elegant) to JUST have list items <li>, which change format depending on where they are in a nested structure. This is done by using complex selectors in your stylesheet. Shout if you want a bit more info, but don't dismiss your consultant's ideas completely, because depending on how your document is put together it may well be just what you need.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
paintedturtle
Propeller Head
Posts: 88
Joined: Wed May 25, 2016 3:35 pm

Re: Importing Word Lists

Post by paintedturtle »

ChoccieMuffin wrote: I can understand the point of your Flare consultant, because it is possible (and rather elegant) to JUST have list items <li>, which change format depending on where they are in a nested structure. This is done by using complex selectors in your stylesheet. Shout if you want a bit more info, but don't dismiss your consultant's ideas completely, because depending on how your document is put together it may well be just what you need.
Thanks for your response!

Because most of the <li> are within tables, it seems like it's even more difficult to manipulate, which may be my newness to Flare. (Really hoping to get past this stage of hating Flare soon into the loving it stage that people talk about!) I've been told that tables don't map well during Word import, and most of our docs are made up of tables full of ordered lists where all of the numbers/letters aren't always importing. Right now it's taking a ton of manipulation to look decent after import because our templates and stylesheets aren't stabilized.

Any tips on manipulating ordered lists within tables upon Word import would be appreciated! (I've been reading past forum threads about them as well, but they haven't really solved my problems.)

~Sarah
Technical Writer using and experimenting with Flare version 12.0.5991.
RiverMonster
Sr. Propeller Head
Posts: 148
Joined: Fri May 09, 2008 8:51 am
Location: Alicante, Spain
Contact:

Re: Importing Word Lists

Post by RiverMonster »

Just wanted to give a massive thanks to Jeff (Chicago_HPT) for the Flare Import Prep macro. I have just converted 10 projects to Flare and your macro saved me a good few days' of extra work.

Jeff, you rock!

:D
kmacdowe
Propeller Head
Posts: 21
Joined: Fri Aug 19, 2016 10:26 am

Re: Importing Word Lists

Post by kmacdowe »

2021 saying hello and thank you, Brilliant elegant solution. Killing the bullets and numbers in Word before importing solved my problem of Flare adding in ol and li I didn't want.
Image
Post Reply