Reply
 
Thread Tools Display Modes
  #1   Report Post  
Hoa Johnson
 
Posts: n/a
Default read and parse a flat file into word fields

I have a flat file coming from the mainframe. It is 1101 characters long and
fixed-width delimited. I can do this in access, throw it into a table and
create a report which can port into a Word file. However, the bossman wants
it all done in Word, not Access. The source file can vary in number of
records/lines.

I was thinking, can I create a Macro that executes my Access routine, write
it to a table and populate my Word file from that table...and, can it be done
with just a couple of clicks?

I can use either Word 97 or 2000. Please keep in mind I am relatively new
to VBA. Thanks in advance.
  #2   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

Hi ?B?SG9hIEpvaG5zb24=?=,

I have a flat file coming from the mainframe. It is 1101 characters long and
fixed-width delimited. I can do this in access, throw it into a table and
create a report which can port into a Word file. However, the bossman wants
it all done in Word, not Access. The source file can vary in number of
records/lines.

I was thinking, can I create a Macro that executes my Access routine, write
it to a table and populate my Word file from that table...and, can it be done
with just a couple of clicks?

First thing I'd try would be to use the fixed-with delimited text file as a Word
mail merge data source. Set up the main merge document as CATALOG type. Insert
the merge fields into a one-row table, then execute the merge to a new document.
Voilą, you have a Word table.

Save the main merge document. Re-open and execute the merge each time you need a
table from the text file (i.e. when it's been updated).

I can use either Word 97 or 2000. Please keep in mind I am relatively new
to VBA.


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:42 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"