Hey guys,

I have a ms word document that contains a table. I'm looking for a
script that will read variables from a .txt file (output from another
program) and insert them into my word document (report) I cannot seem
to find anything on the web.

Thanks

Re: Reading a .txt file by Graham

Graham
Mon Jun 25 00:12:16 CDT 2007

On the face of it it sounds like mail merge, but if not, you will need to
provide more information.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

brad.canney@gmail.com wrote:
> Hey guys,
>
> I have a ms word document that contains a table. I'm looking for a
> script that will read variables from a .txt file (output from another
> program) and insert them into my word document (report) I cannot seem
> to find anything on the web.
>
> Thanks



Re: Reading a .txt file by Doug

Doug
Mon Jun 25 04:16:01 CDT 2007

Insert the variables into the .Range of the cells of the table.

[document object].Tables(n).Cell(i, j).Range.Text = [your variable]

You have not given enough information to give more specific assistance.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

<brad.canney@gmail.com> wrote in message
news:1182735292.504922.120120@w5g2000hsg.googlegroups.com...
> Hey guys,
>
> I have a ms word document that contains a table. I'm looking for a
> script that will read variables from a .txt file (output from another
> program) and insert them into my word document (report) I cannot seem
> to find anything on the web.
>
> Thanks
>



Re: Reading a .txt file by brad

brad
Mon Jun 25 20:48:30 CDT 2007

Yeah I can insert the variables into the table... that was easy. But
I'm looking for a starting point to get vba to read a set of variables
line by line from a text file so I can work with them in vba. I've
never read in variables from a text file.


On Jun 25, 5:16 am, "Doug Robbins - Word MVP"
<d...@REMOVECAPSmvps.org> wrote:
> Insert the variables into the .Range of the cells of the table.
>
> [document object].Tables(n).Cell(i, j).Range.Text = [your variable]
>
> You have not given enough information to give more specific assistance.
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> <brad.can...@gmail.com> wrote in message
>
> news:1182735292.504922.120120@w5g2000hsg.googlegroups.com...
>
>
>
> > Hey guys,
>
> > I have a ms word document that contains a table. I'm looking for a
> > script that will read variables from a .txt file (output from another
> > program) and insert them into my word document (report) I cannot seem
> > to find anything on the web.
>
> > Thanks- Hide quoted text -
>
> - Show quoted text -



Re: Reading a .txt file by Russ

Russ
Tue Jun 26 04:36:05 CDT 2007

What kind of structure are your text files going to have? Are they comma
separated values? One Value per line? Table Format? You haven't given enough
information. Can you copy and paste a good example of the text file
structure?

> Yeah I can insert the variables into the table... that was easy. But
> I'm looking for a starting point to get vba to read a set of variables
> line by line from a text file so I can work with them in vba. I've
> never read in variables from a text file.
>
>
> On Jun 25, 5:16 am, "Doug Robbins - Word MVP"
> <d...@REMOVECAPSmvps.org> wrote:
>> Insert the variables into the .Range of the cells of the table.
>>
>> [document object].Tables(n).Cell(i, j).Range.Text = [your variable]
>>
>> You have not given enough information to give more specific assistance.
>>
>> --
>> Hope this helps.
>>
>> Please reply to the newsgroup unless you wish to avail yourself of my
>> services on a paid consulting basis.
>>
>> Doug Robbins - Word MVP
>>
>> <brad.can...@gmail.com> wrote in message
>>
>> news:1182735292.504922.120120@w5g2000hsg.googlegroups.com...
>>
>>
>>
>>> Hey guys,
>>
>>> I have a ms word document that contains a table. I'm looking for a
>>> script that will read variables from a .txt file (output from another
>>> program) and insert them into my word document (report) I cannot seem
>>> to find anything on the web.
>>
>>> Thanks- Hide quoted text -
>>
>> - Show quoted text -
>
>

--
Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID


Re: Reading a .txt file by Doug

Doug
Tue Jun 26 04:07:51 CDT 2007

There is nothing particularly magic about text files. They can be opened in
Word and their contents can be accessed, but it is necessary to know how the
required information is laid out in the file to provide more specific
information. Open the file in Word and click on the Show/Hide ¶ button and
tell us what you see.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

<brad.canney@gmail.com> wrote in message
news:1182822510.844064.203230@q69g2000hsb.googlegroups.com...
> Yeah I can insert the variables into the table... that was easy. But
> I'm looking for a starting point to get vba to read a set of variables
> line by line from a text file so I can work with them in vba. I've
> never read in variables from a text file.
>
>
> On Jun 25, 5:16 am, "Doug Robbins - Word MVP"
> <d...@REMOVECAPSmvps.org> wrote:
>> Insert the variables into the .Range of the cells of the table.
>>
>> [document object].Tables(n).Cell(i, j).Range.Text = [your variable]
>>
>> You have not given enough information to give more specific assistance.
>>
>> --
>> Hope this helps.
>>
>> Please reply to the newsgroup unless you wish to avail yourself of my
>> services on a paid consulting basis.
>>
>> Doug Robbins - Word MVP
>>
>> <brad.can...@gmail.com> wrote in message
>>
>> news:1182735292.504922.120120@w5g2000hsg.googlegroups.com...
>>
>>
>>
>> > Hey guys,
>>
>> > I have a ms word document that contains a table. I'm looking for a
>> > script that will read variables from a .txt file (output from another
>> > program) and insert them into my word document (report) I cannot seem
>> > to find anything on the web.
>>
>> > Thanks- Hide quoted text -
>>
>> - Show quoted text -
>
>