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!

Export RTF formatted file to MS Word

Status
Not open for further replies.

BillRossDenver

Instructor
Jun 13, 2002
6
US
I am not familiar with VFP - I'm a vb/SQL programmer - but I've been asked to export some data to MSWord in rtf format that is currently in a in DBF format. I can get the data out in text but the formatting is lost. Can anyone point me in the right direction?
 
Bill,
The is nothing "native" in VFP to do this. If it's a one-shot deal, then you could probably write a simple text-merge program to format the data with the appropriate RTF codes. Right now, one of the "big deals" is a program being offered (free) on the UT ( - click on the Download Icon on the left and choose Visual FoxPro (you may need to choose this as the forum also - they've been changing things around a bit), then enter FRX2ANY in the Title box and hit enter. You should get back:
FRX2ANY v 08.00.01 January 7, 2003
Without changing anything to your FRX reports, integrate them in MS Office 2000 and XP as DOC, XLS, RTF, HTML, BMP, PDF, XML and send them as e-mail with Outlook in any of those format. FRX2ANY is one great WYSIWYG tool that is ideally suited for any developer who wants to provide all the output necessary. Nothing comes close to what FRX2ANY can do with your FRX, it's an easy and quick way to convert your reports into HTML, DOC, RTF, XLS, PDF, XML and BMP files in a consistent manner. Try this n...

Rick
 
Thanks Rick,

This is a one shot deal. There are about 1000 records that in need to get into MSWord - one time. Each record has two columns - filename and text with RTF codes.

I need something like a "merge" option that will create 1000 .doc files with the correct file name and an RTF document.
 
Hi Bill,

What do you mean when you say the "formatting is lost"? There is no formatting imlied in a DBF file. If you could explain what the formatting issue is, it might help us to suggest a solution.
Mike Lewis
Edinburgh, Scotland
 
At the VFUG site ( is a file called FRX2Word that converts the output from a VFP Report (.frx) into an RTF format or a Word DOC format. Your choice.

The File Archive there is called frx2word.zip.

John Koziol, now with the MS Fox team, started this gem and it is currently maintained by another gentleman.

==Carl
Carl Warner
VFUG Officer,
MS MVP, VFP
FoxCentral
 
Hi all,

Thanks for the many sugestions but I'm still at square one. I don't have any reports or other parts of the original FoxPro project - just the DBF file which I can read as a linked file to MS Access. The records seem to contain the RTF codes and I do know that the data printed in what seemed to be an RTF format a couple of years ago.
 
Are you suggesting then that not only don't you have knowledge of FoxPro, but you don't have access to a VFP development machine? If that's the case, then you are right, the techniques suggested by Carl and I are pretty worthless.

You might want to contact some one locally in a FoxPro User Group that could help you out. (There are lists on the MS Mindshare site - and on the UT - ). In fact, someone here might help you out depending on the size of the .DBF & .FPT zipped up size and their mailbox restrictions. Of course there may be issues with the content of your data, so you'll need to decide the next step. You may even want to try posting the question on the Access forum - there are people there that work with DBF files.

Rick
 
Bill,

Are you saying that the RTF codes are actually embedded in the text of the fields?

If so, there is nothing that Foxpro can do to help you. You will need to export the table, via Access, then somehow paste the RTF text into a Word document.

I guess that puts you back where you started. The point is that you shouldn't waste time looking for a Foxpro solution. You need a more general text-handling solution.

Mike Lewis
Edinburgh, Scotland
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top