-Collapse +Expand
Paradox
Search Paradox Group:

Advanced
Paradox To/From
To/FromCODEGuides
Paradox Store
PRESTWOODSTORE

Prestwood eMagazine

September Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyCorel Paradox / ObjectPAL Coding BoardObjectPAL Topic   Print This     

I need to create an rtf file.

I need to create an rtf file. in ObjectPAL topic (part of our Corel Paradox / ObjectPAL Coding group).

Quick Search: I create   I create rtf   file   
rkayd
-- UNK

I need a Rich Text file for a program I'm using (CorelDraw - merge).

I'm not sure if it works to create an rtf file using ObjectPAL but that would be the easiest, otherwise I would like to know how to access a batch file from ObjectPAL to run a program to convert a txt file to rtf.

Here is the code I am using to create a tab delimited text file: (if I would use the batchfile method I suppose I would have to call it just before it opens the CorelDRAW file)

method pushButton(var eventInfo Event)

var
 strBegin    String
 strEnd    String
 Counter    LongInt
 NumberOfBooks  LongInt
 BeginNum    LongInt
 z      LongInt
 y      LongInt
 Text     TextStream
 liSuccess    LongInt
 stPath,stFileName String
endvar

;define some variables
BeginNum   =  BeginningNumber - NumbersPerBook ;BeginningNumber & NumbersPerBook are fields on form
NumberOfBooks = (EndingNumber - BeginningNumber + 1) / NumbersPerBook  ;endingNumber is field on form
strEnd   = string(EndingNumber) ;convert endingNumber to string

Text.Open("Merge.txt","nw") ;open text file to write fields to
Text.writeLine("Company,Description,Numbers") ;write file header

;write records into text file
 for Counter from 0 to NumberOfBooks - 1 ;loop for however many book covers are needed (not sure why the -1 needs to be there)
  BeginNum=BeginNum+NumbersPerBook ;increment beginning number to next beginning number
  strBegin=string(BeginNum) ;convert beginning number to string
  strEnd=string(BeginNum+NumbersPerBook-1) ;calculate ending number and convert it to string
   ;make number of digits in beginning number equal number of digits in ending number
   if sizeEX(strBegin) < sizeEX(strEnd) then
    for y from sizeEX(strBegin) to sizeEX(strEnd)-1 ;not sure why the -1 needs to be there
     strBegin="0"+strBegin
    endfor
   endif
   ;if number of digits in numbers is less than 4 than add 0's to create 4 digits
   if sizeEX(strEnd) < 4 then
    z=sizeEX(strEnd)
    for y from z to 3
     strBegin="0"+strBegin
     strEnd="0"+strEnd
    endfor
   endif
  ;write record to text file with comma delimiters. Company, Description, Prefix and Suffix are fields on form
  Text.writeLine(Company+","+Description+","+Prefix+strBegin+Suffix+" to "+Prefix+strEnd+Suffix)
 endfor

Text.Close()

;open applicable CorelDRAW file
stPath = "Z:\\Covers"
stFileName = Size + Orientation + ".cdr"
liSuccess = cmLaunchFile(stPath, stFileName)

switch
  case liSuccess > 32 : message("Handle to executed process: " + string(liSuccess))
  case liSuccess = 0 : msgStop("Error","The operating system is out of memory
or resources.")
  case liSuccess = 2 : msgStop("Error","The specified file was not found.")
  case liSuccess = 3 : msgStop("Error","The specified path was not found.")
  case liSuccess = 5 : msgStop("Error","The operating system denied access
to the specified file.")
  case liSuccess = 8 : msgStop("Error","There was not enough memory to complete
the operation.")
  case liSuccess = 11 : msgStop("Error","The .EXE file is invalid (non-Win32
EXE or error in .EXE image).")
  case liSuccess = 26 : msgStop("Error","A sharing violation occurred.")
  case liSuccess = 27 : msgStop("Error","The filename association is incomplete
or invalid.")
  case liSuccess = 28 : msgStop("Error","The DDE transaction could not be
completed because the request timed out.")
  case liSuccess = 29 : msgStop("Error","The DDE transaction failed.")
  case liSuccess = 30 : msgStop("Error","The DDE transaction could not be
completed because other DDE transactions were being processed.")
  case liSuccess = 31 : msgStop("Error","There is no application associated
with the given filename extension.")
  case liSuccess = 32 : msgStop("Error","The specified dynamic-link library
was not found.")
  otherwise : message("Unknown Error: " + string(liSuccess))
endSwitch
endMethod

 Posted 16 years ago (Thread Starter)
Comment Quote
About rkayd
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #14278, 5 replies
Thread Started 9/8/2010 1:08:14 PM
View Counter=2398
Last Reply Posted 5/5/2026 12:58:03 PM)
Location=-- UNK 
Joined=16 years ago   MB Posts=1  
PS_5438
seo
-- USA

Amazing, this is great as you want to learn more, I invite to       This is my page. Kissimmee Exterminator

 Posted 5 months ago
Comment Quote
About PS_5438
Visit Profile
Membership pending.
Member subscribes to this thread with a verified email.
Member pending approval.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #21600 (Level 2) and Parent is 14278
Reply Posted 4/7/2026 3:21:04 AM
Location=-- USA 
Joined=7 months ago   MB Posts=832  
PS_5438
seo
-- USA

For this web site, you will see our account, remember to go through this info. Deleon Springs Exterminator

 Posted 5 months ago
Comment Quote
About PS_5438
Visit Profile
Membership pending.
Member subscribes to this thread with a verified email.
Member pending approval.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #21601 (Level 3) and Parent is 14278
Reply Posted 4/7/2026 3:23:41 AM
Location=-- USA 
Joined=7 months ago   MB Posts=832  
PS_5438
seo
-- USA

Can nicely write on similar topics! Welcome to      here you'll find out how it should look. Bed Bug Treatment Orlando

 Posted 5 months ago
Comment Quote
About PS_5438
Visit Profile
Membership pending.
Member subscribes to this thread with a verified email.
Member pending approval.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #21602 (Level 4) and Parent is 14278
Reply Posted 4/7/2026 3:24:55 AM
Location=-- USA 
Joined=7 months ago   MB Posts=832  
PS_5438
seo
-- USA

I recommend only good and reliable information, so see it:  Tampa Termite Control

 Posted 5 months ago
Comment Quote
About PS_5438
Visit Profile
Membership pending.
Member subscribes to this thread with a verified email.
Member pending approval.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #21603 (Level 5) and Parent is 14278
Reply Posted 4/7/2026 3:26:25 AM
Location=-- USA 
Joined=7 months ago   MB Posts=832  
Most Recent Post
PS_5337
-- USA

If you want to convert txt file into rtf file so you can do it search on internet that provide it the easiest way to do it process this work.

Best Commercial HVAC Services in Anaheim CA

 Posted 4 months ago
Comment Quote
About PS_5337
Visit Profile
Membership pending.
Member subscribes to this thread with a verified email.
Member pending approval.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #21796 (Level 6) and Parent is 14278
Reply Posted 5/5/2026 12:55:36 PM
Location=-- USA 
Joined=8 months ago   MB Posts=177  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1131A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #14278 Counter
2398
Since 9/8/2010
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2026 Prestwood IT Solutions.   [Security & Privacy]