From: JediKaiti on
Thanks, Greg, that is very helpful!

Next question: the data I'm pulling in from an external file is not in the
format I want to use in the document. It actually looks more like this:

%Verbs = (
"arm" => {
description => "
A prerequisite command for a potentially
hazardous
command.
",
discrete => 1,
},
"close" => {
description => "
Mechanically close a device controlled by the
command
element. \\emph{close} works in conjunction
with the
\\emph{open} verb.
",
discrete => 1,
},

And I want to turn it into a table with 3 columns: name (i.e. "arm" or
"close"), description, and discrete.

I am guessing that I could just import the external file into a string, and
parse out the string? Would that be the way to go, here? And how do I do that?

Thanks again!

Kaiti

"Greg Maxey" wrote:

> You would need an AutoNew macro in the template that contained the code
> statements.
>
> Sub AutoNew()
> ActiveDocument.Bookmarks("DIP1").Range.InsertFile FileName:="C:\Test.doc"
> End Sub
>
> Where DIP1 is the first data insertion point and "C\Test.doc" is the file
> that you want inserted at that point.
>
> "JediKaiti" <JediKaiti(a)discussions.microsoft.com> wrote in message
> news:D860241C-5863-41E4-9DE6-EB4078929C54(a)microsoft.com...
> > Hello! I am wondering if this is possible, and if so, how do I do it?
> >
> > What I want to do is this:
> >
> > I have a template, and I want to write a macro that will create a document
> > based on this template by pulling data out of other files, formatting the
> > data, and putting it in the appropriate section of the document.
> >
> > I have no experience with Word Macros or VBA, although I have programmed
> > in
> > VB.NET in the past.
> >
> > Any suggestions would be helpful!
> >
> > Thank you!
> >
> > Kaiti
>
>
> .
>