outputting html to be read by word

Crittar

Member
I have some code running on a unix box which generates some html code which is then emailed (using smtpmail) as an attachment.

I can read the attachment into word but want to be able to control where the page breaks occur within word.

Is there anything I can put out in the file I generate which word will pick up as a "hard" page break?

Thanks In Anticipation for your help.
 

Joel J.J. Heber

New Member
chr

plant a CHR(put the ascii decimal code for page break here)

and you will get your page break....

should work.

OUTPUT TO VALUE(email-file)
PUT
CHR(45). /*45 si an example */
OUTPUT CLOSE.



that is how I would do it...

I use CHR for line feeds, space and tab.....

works wonders for making reports with out COrvu or actuate

Joel
 

Crittar

Member
Joel,

I have tried that - unfortunately with no success. I used chr(12) which should be a form feed but it just seems to be totally ignored but many thanks for your input.

I'm sure there must be SOME way of doing it - I just haven't found it yet.

The nearest thing I have found to a solution is to use the page_break_before or page_break_after in html. This almost works in that I can print a paged version of the document generated but have to print the whole document - I can't print individual pages. I really need a way of forcing a "hard" page break.

Anyone out there got any ideas?
 
T

Try this

Guest
1 -- Type "
2 -- press ctrl and v
3 -- press ctrl and L
4 -- type "
the result should be "^L"

Enjoy
 

Crittar

Member
I tried the suggestion made by "guest" - Unfortunatley it doesnt seem to generate the "^L" as indicated.

Anyone out there got any further suggestions?

:confused:
 

warba

New Member
I manually create an HTML document in word with page breaks that display correctly.
MS/Word generates the following code:

(body lang=EN-US style='tab-interval:.5in'>

(div class=Section1>

(p class=MsoNormal>Page One(/p>

(span style='font-size:12.0pt;font-family:"Times New Roman";mso-fareast-font-family:
"Times New Roman";mso-ansi-language:EN-US;mso-fareast-language:EN-US;
mso-bidi-language:AR-SA'>(br clear=all style='page-break-before:always'>
(/span>

(p class=MsoNormal>Page Two(/p>

(span style='font-size:12.0pt;font-family:"Times New Roman";mso-fareast-font-family:
"Times New Roman";mso-ansi-language:EN-US;mso-fareast-language:EN-US;
mso-bidi-language:AR-SA'>(br clear=all style='page-break-before:always'>
(/span>

(p class=MsoNormal>Page Three(o:p>(/o:p>(/p>

(/div>

(/body>

...so could you generate similar tags as required to break your pages? (replace the "(" with "<"... needed to do this to post correctly without rendering)
 

Crittar

Member
Warren,

I will give this a try to see if it will work. I'll post the results as soon as I have tried it.

Thank you for your input!

;)
 

Crittar

Member
Warren,

I've given this a try and, sadly, I still have the same problem. The generated html will print fine from internet explorer BUT if I import it into word the paging is totally incorrect.

Also if I try to print a range of pages from word, word crashes.

:confused: :brick:
 

Crittar

Member
I give up!! :dead:

Everything I try seems to either crash word or not do what I want it to do.

Seems the only option is to print direct from Internet Explorer and cut Word out of the equation.

Many thanks to those of you who attempted to help.

:up:
 
Top