Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating form letters in MS Word from VFP.
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00028287
Message ID:
00028526
Views:
43
>>>>I need an easy way to allow users to create, edit and print form letters from a VFP3 application. Here are a few of the features that I would like to include:
>>>>1. Create/edit form letters in Word.
>>>>2. An easy way for the user to insert fields that will be replaced with VFP data (add my own menu to Word listing available fields)
>>>>3. Print a form letter that was created earlier without seeing Word.
>>>>4. Option to merge data with form letter then edit/view before printing.
>>>>
>>>>Any ideas (even better, samples)?
>>>>
>>>>Thanks,
>>>>Shane
>>>Hi Shane,
>>>I haven't done that in Word, but I have done it in Wordperfect,
>>>and basically what I do is create a text file from within Fox with
>>>information from the fields that my forms needs, then I call
>>>worperfect from within Fox, Wordperfect executes a macro that
>>>convert my text file to something that it recognizes as a "Record
>>>description file", and then merge that information with one or
>>>several "templates" or "Forms", previously defined.
>>>I know you can do the same or something much better in word,
>>>look for "merge", "merge codes","Import","DBF",etc.. under the
>>>word help, I have seen samples about that in there.
>>>Good Luck.
>>
>>It's even easier in Word, since Word will read an SDF format text file or a FoxBase 2.x style DBF in its MailMerge, so you can skip one of Luis' steps!
>>
>>Barbara
>What is SDF format?

SDF Creates an SDF (System Data Format) file. An SDF file is an ASCII text file in which records have a fixed length and end with a carriage return and linefeed. Fields aren’t delimited. The SDF file name is assigned a .TXT file extension if you do not include an extension.

Careful though. VFP (3 & 5)have a bug. If you have blank fields that you are outputting in SDF format they will not show up. If you output a file in SDF format it should create a text file with fields of fixed length. If the field is blank it is just not there in the text file and screws everything up.
Everything we see or seems
Is but a dream within a dream
- Edgar Allen Poe
Previous
Reply
Map
View

Click here to load this message in the networking platform