Is there a way to force a paragraph to the next right page in Word outputs? I've tried using page layouts and the page-break-before: right style attribute, but neither seem to work.
Thanks.
Forcing a paragraph to the next right page in Word outputs
-
lacastle
- Propellus Maximus
- Posts: 1028
- Joined: Thu Apr 12, 2007 7:28 am
- Location: Wilmington, DE
- Contact:
Re: Forcing a paragraph to the next right page in Word outputs
If you put the paragraph in it's own topic and apply a Right page layout to it from the TOC, does it work?
Laura A. Castle
http://www.lauracastle.com
http://www.lauracastle.com
Re: Forcing a paragraph to the next right page in Word outputs
Thanks Laura. This works, but is there a way to use one page layout for the first right page in a chapter and then use another page layout for subsequent right pages?
-
lacastle
- Propellus Maximus
- Posts: 1028
- Joined: Thu Apr 12, 2007 7:28 am
- Location: Wilmington, DE
- Contact:
Re: Forcing a paragraph to the next right page in Word outputs
You would use the First page layout, and make sure you have a Left and Right created. I think they will automatically be used if you start with First.
here is the page from the flare help - http://webhelp.madcapsoftware.com/flare ... ayouts.htm
here is the page from the flare help - http://webhelp.madcapsoftware.com/flare ... ayouts.htm
Laura A. Castle
http://www.lauracastle.com
http://www.lauracastle.com
Re: Forcing a paragraph to the next right page in Word outputs
This works, but the chapters always start on the next page regardless of whether that page is left or right. According to the Flare Help, the empty page layout type isn't supported by Word. I guess this means it's possible to have a different layout for the first page of each chapter or have each chapter start on a right page, but not both.
-
lacastle
- Propellus Maximus
- Posts: 1028
- Joined: Thu Apr 12, 2007 7:28 am
- Location: Wilmington, DE
- Contact:
Re: Forcing a paragraph to the next right page in Word outputs
Can you just make a PDF instead of Word? empty pages are supported in direct-to-PDF output. this is a sad limitation of Word.
Laura A. Castle
http://www.lauracastle.com
http://www.lauracastle.com
Re: Forcing a paragraph to the next right page in Word outputs
This is what we do for most outputs, but I need to provide a Word output to our translators for RTL languages and need to make it look as close as possible to our direct-to-PDF outputs.
-
wclass
- Propellus Maximus
- Posts: 1238
- Joined: Mon Feb 27, 2006 5:56 am
- Location: Melbourne, Australia
Re: Forcing a paragraph to the next right page in Word outputs
I suspect it's more of a bug (or oversight) in the Flare generator rather than a limitiation of Word, because you can certainly set pages to start on the right, or odd, page in Word. Possibly more of an oversight as Word manages those sorts of breaks at the section level, not the paragraph level, and it looks like you are trying to set the page-break-before attribute to a paragraph. You can definitely get it to work OK at the topic level by assigning the right page layout via the TOC.
However, I propose the following as a work-around - if you create and assign a specific style to the paragraphs that you want to start on the right side, you can generate the Word document and then run the following macro. It searches for the special style (in this case, 'h2_testbreak') and puts in an "odd page" section break immediately before the style.
However, I propose the following as a work-around - if you create and assign a specific style to the paragraphs that you want to start on the right side, you can generate the Word document and then run the following macro. It searches for the special style (in this case, 'h2_testbreak') and puts in an "odd page" section break immediately before the style.
Code: Select all
Public Sub sm_insert_section_break()
'
' Search for a specified style and insert a section break before it.
' Starts from the top of the Doc and searches to the end.
'
Dim tRng As Range
Dim SaveRng As Range
Dim i As Integer
Set SaveRng = Selection.Range
Selection.HomeKey Unit:=wdStory, Extend:=wdMove
Selection.Find.ClearFormatting
Selection.Find.Style = ActiveDocument.Styles("h2_testbreak")
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = ""
.Replacement.text = ""
.Forward = True
.Wrap = wdFindStop
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
While Selection.Find.Execute
Set tRng = Selection.Range
Selection.Collapse Direction:=wdCollapseStart
Selection.InsertBreak Type:=wdSectionBreakOddPage
tRng.Select
Selection.Collapse Direction:=wdCollapseEnd
i = i + 1
Wend
SaveRng.Select
Set SaveRng = Nothing
Set tRng = Nothing
Debug.Print "Inserted breaks: " & i
End SubMargaret Hassall - Melbourne