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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Do I Save a Word Form as a Delimited Text File

Status
Not open for further replies.

ACH381

Technical User
Apr 3, 2002
49
US
I have forms created in MS Word that use FormFields. Is there a way to save one of these completed forms as a delimited text file so the data can be imported into a database that can accept delimited text data.

We use Lotus Notes, which will accept data in delimited text format. We would like to be able to use the form design and completion capabilities of Word to capture data for a Lotus Notes database; but I can't seem to be able to save the Word file as a delimited text file.

It is not imperative that I use a delimited text file; if there is some other way to easily transfer the data from Word to Lotus Notes I'll be glad to use it.
 
It's easy to generate any kind of text file, including comma-delimited ones, using VBA. I am not familiar with form fields, but assuming you can read the values through VBA, you could generate the text file using something like:

open "Delimited.txt" for output as #1
for each formfieldrow 'you fill in real code here
for each formfieldcolumn (except the last one)
print#1, (form field item) + ",";
next formfieldcolumn
print#1, (form field item for last column)
next formfieldrow
close#1

(Clearly, you'll have to modify the code to actually loop through and properly specify the items on your form field)
Rob
[flowerface]
 
ACH381,

An alternative:

1) Save your completed (blank) Form document as you would normally, if you haven't already done so.

2) Go to Tools/Options and select the Save tab. Check "Save data only for forms".

3) Fill in your form fields.

4) Click on the File menu. In place of Save As... you will see Save Copy As... Select this. In the dialog box Save As Type should default to "Text Only". Give your data a filename and click OK. The data is saved as a comma delimeted text file.

HTH
Mike
 
Thats better yet. Thanks a lot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top