Prevent Word import from splitting topic at page breaks?

This forum is for all Flare issues related to importing files or projects.
Post Reply
kgdyall
Propeller Head
Posts: 12
Joined: Fri Jun 17, 2016 8:48 am

Prevent Word import from splitting topic at page breaks?

Post by kgdyall »

When importing a Word file that has page breaks, Flare splits the file into new topics at each page break. Is there a way of suppressing this? I only want to split the topic at the specified headings.

Background: the file was downloaded from Google docs as a Word file for import into Flare. The page breaks are inserted for download as PDF and printing for training sessions. The workaround is to not use page breaks but use extra lines to force the page break, but it would be much nicer if splitting files at page breaks were an option in the Word import wizard.
wclass
Propellus Maximus
Posts: 1238
Joined: Mon Feb 27, 2006 5:56 am
Location: Melbourne, Australia

Re: Prevent Word import from splitting topic at page breaks?

Post by wclass »

Currently you can't specify that manual page breaks should be ignored, so it might be worth putting in a feature request.
In the mean time, you can use this Word macro to remove manual page breaks. When we import, we make a copy of the document first and run a few macros to make it more import friendly. Hope this helps.

Code: Select all

Public Sub dl_RemoveHardBreaks()
'
' RemoveHardBreaks Macro
' Clear manual page breaks from current position to end of document
'
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .text = "^m"
        .Replacement.text = " "
        .Forward = True
        .Wrap = wdFindAsk
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Margaret Hassall - Melbourne
SteveS
Senior Propellus Maximus
Posts: 2087
Joined: Tue Mar 07, 2006 5:06 pm
Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).
Contact:

Re: Prevent Word import from splitting topic at page breaks?

Post by SteveS »

It gets back to the advice to clean up your word document as much as you can before importing. Microsoft's take on xml (and docx is in xml format) is a bit interesting...

If it is a one off, and you don't want to create a macro, you can use find and replace. Manual page break is listed under special on the find and replace dialog box. Use that in the find text box and leave the replace with text box blank.
Image
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
kgdyall
Propeller Head
Posts: 12
Joined: Fri Jun 17, 2016 8:48 am

Re: Prevent Word import from splitting topic at page breaks?

Post by kgdyall »

Thanks for the replies. This is (ultimately) intended for an automated procedure that is used multiple times, so scripting would be the way to go. The procedure doesn't actually go via Word, just Google > Word doc > Flare. I could probably write a Python script to automatically remove the page breaks from the .docx file.
just another user
Jr. Propeller Head
Posts: 1
Joined: Fri Nov 10, 2017 5:10 am

Re: Prevent Word import from splitting topic at page breaks?

Post by just another user »

@SteveS,

Calling it "interesting" is being very charitable, Steve. I have other words for their opinion :lol:

(Undercover Trent the Thief)
SteveS
Senior Propellus Maximus
Posts: 2087
Joined: Tue Mar 07, 2006 5:06 pm
Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).
Contact:

Re: Prevent Word import from splitting topic at page breaks?

Post by SteveS »

just another user wrote:@SteveS,

Calling it "interesting" is being very charitable, Steve. I have other words for their opinion :lol:

(Undercover Trent the Thief)
Howdy stranger...

Interesting is a word you can say through clenched teeth. Even if the flesh around your jaw is going white because you are clenching hard. :shock:
Image
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
Post Reply