Solved

RTF files: Hard Return codes at end of each line

Posted on 2003-11-11
2
723 Views
Last Modified: 2012-08-14
I am using a database that saves files in RTF format. When opening the RTF files in Word or WordPerfect, 'hard return' codes are inserted at the end of each line in a paragraph (essentially making each line a separate paragraph). A tedious 'search and replace' must be performed to eliminate this incorrect formatting. I have been searching the web for hours and can't find a solution to this problem. Why does this happen and (most importantly) is there any way to avoid this?
0
Comment
Question by:Cindy64
2 Comments
 
LVL 5

Accepted Solution

by:
Goofytouy earned 250 total points
ID: 9723748
Check the database which carriage return is inserting

When saving the RTF, one thing is to insert a chr(10) "new line", and other is to insert a chr(13)+chr(10) "carriage return + new line".
If you are using VBA or VB, vbLf should be what you are needing, and not vbCrLf.
0
 

Author Comment

by:Cindy64
ID: 9724850
(I hope this is the correct way to ask clarification of a comment. HELP was a little vague on how to do this.)

"Check the database which carriage return is inserting."
>>Am I correct in assuming from your comment that the database program is inserting chr(13)+chr(10) at the end of each line when the file is "saved as" an RTF file?
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
The viewer will learn common shortcuts with easy ways to remember them. The viewer will then learn where to find all of the keyboard shortcuts, how to create/change them, and how to speed up their workflow.
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now