Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert UNIX formfeed to word page break?

Status
Not open for further replies.

CoolDudeeh

IS-IT--Management
Oct 21, 2003
21
US
Here is the situation.
I receive emailed reports from a UNIX box.
The reports have the unix formfeed character which shows up as a small character box( ) in notepad or a reverse image FF in some other editor I have.
Decimal = 12
Hex = C
Octal = 014
When I open the report in Word, it converts this code to an underbar(_)
What I want is for word to convert it to a page break.

Can anyone help?
 
If the UNIX report was FTP'ed using binary, it will add the boxes. If you transfer it as ascii, it will not. IF this is the case, it may be easier to fix this before it is e-mailed.

[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
This should be easy to fix using Find & Replace.

Find _

Replace ^m

A ReplaceAll will replace all underscores ("_") with a manual page break.

However, this may not, in fact, be exactly ehat you want.

faq219-2884

Gerry
My paintings and sculpture
 
Thanks for the replies so far.

In response to the replies so far.

1. The report containts lots of legitimate _ so the scan and replace option will not work.

2. The file in not being ftp'd .... it is being emailed in the body of the email from the unix box. The copy and pasted into word.
When pasted into word, that is when the box or FF is changed to _

I can definitely replace it on the unix end before emailing and that would be the preferred solution, if I could figure out the octal/hex values for the MS Word page break.
 
Only other option I can think of is to paste special into word and try the options.

[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
The report containts lots of legitimate _ "

I was afraid you would come back with that. So in actual fact...

"What I want is for word to convert it to a page break."

is not accurate. You want to convert some "_" into page breaks.

OK. Same thing. Use Find and Replace. Just do not use ReplaceAll. It will progress through the document letting you choose to replace, or not, each found "_".

Other than, if you want an automated solution, you are going to have to come up with logic to determine if any given "_" is to be replaced with a page break, or not.

That would be fun.

faq219-2884

Gerry
My paintings and sculpture
 
With Word 2007, Unix files with a form feed (ctrl+L - hex 0c) converts automatically to a page break.

Unless you are using another version that does not convert, or IF the character you are referring to is NOT the standard FF on Unix, then maybe you are opening the document in word the wrong way.

Regards

Frederico Fonseca
SysSoft Integrated Ltd

FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top