Re: Can IDL be used to generate microsoft word documents automatically? [message #66428] |
Mon, 11 May 2009 05:30 |
Jean H.
Messages: 472 Registered: July 2006
|
Senior Member |
|
|
andrews32940 wrote:
> On May 10, 10:01 am, Dave <daikan1...@tom.com> wrote:
>> Dear people:
>> Everyday, i have lots of word documents to produce, which have the
>> same forms but different text and image contents. Please tell me if
>> there are any ways to using IDL to generate word automatically? thanks
>> a lot.
>>
>> dave
>
[...] Another way is to use
> visual basic built into the Office Apps and build document that way. I
> use that approach in Excel and PowerPoint 2003 to build 1000's of
> slides in a few minutes.
>
> Aaron
I support this suggestion... it's sometimes easier to work with just one
application than to learn how to connect/communicate between different
applications. VB is fairly easy, and typing Google will be your friend
(Word VB +your problem should have plenty of solutions!). You can dump
your text + img in different folder (or just files), then have the VB
application identify the data available, load the text, load the images,
save, next. Ah, and by doing it this way, you can create your template
"by hand", you don't have to code it from scratch...
Jean
|
|
|
|
Re: Can IDL be used to generate microsoft word documents automatically? [message #66435 is a reply to message #66434] |
Mon, 11 May 2009 02:33  |
andrews32940
Messages: 2 Registered: December 2008
|
Junior Member |
|
|
On May 10, 10:01 am, Dave <daikan1...@tom.com> wrote:
> Dear people:
> Everyday, i have lots of word documents to produce, which have the
> same forms but different text and image contents. Please tell me if
> there are any ways to using IDL to generate word automatically? thanks
> a lot.
>
> dave
You can also generate an XML file that Word understand using the
WordML schema. Its rather ugly (do a Save As XML on a Word document
and you'll see what I mean) but you could use the Saved XML file as a
template (images are a bit tricky though). Another way is to use
visual basic built into the Office Apps and build document that way. I
use that approach in Excel and PowerPoint 2003 to build 1000's of
slides in a few minutes.
Aaron
|
|
|
Re: Can IDL be used to generate microsoft word documents automatically? [message #66443 is a reply to message #66435] |
Sun, 10 May 2009 12:01  |
d.poreh
Messages: 406 Registered: October 2007
|
Senior Member |
|
|
On May 10, 7:22 am, "Jeff N." <jeffnettles4...@gmail.com> wrote:
> On May 10, 10:01 am, Dave <daikan1...@tom.com> wrote:
>
>> Dear people:
>> Everyday, i have lots of word documents to produce, which have the
>> same forms but different text and image contents. Please tell me if
>> there are any ways to using IDL to generate word automatically? thanks
>> a lot.
>
>> dave
>
> If you are using Windows and have a fairly recent version of IDL (6.3+
> i think), then yes you can theoretically do this using ActiveX/COM
> objects. I've tried it however, and have met with mixed results.
> It's fairly easy to get Word running with an IDL program, but beyond
> that I wasn't able to do much else that was useful. The reason for
> this was not anything that was the fault of IDL, but that Word's
> object model is so, well, obtuse i guess is the nice way to put it.
> So i had the same trouble controlling Word from several different
> ActiveX-aware languages, including perl and visual basic itself. But
> yes it's theoretically possible, look at IDLcomIDispatch objects in
> the IDL help files to get you started, and good luck!
maybe look at this:
http://www.faststone.org/
|
|
|
Re: Can IDL be used to generate microsoft word documents automatically? [message #66445 is a reply to message #66443] |
Sun, 10 May 2009 07:22  |
jeffnettles4870
Messages: 111 Registered: October 2006
|
Senior Member |
|
|
On May 10, 10:01 am, Dave <daikan1...@tom.com> wrote:
> Dear people:
> Everyday, i have lots of word documents to produce, which have the
> same forms but different text and image contents. Please tell me if
> there are any ways to using IDL to generate word automatically? thanks
> a lot.
>
> dave
If you are using Windows and have a fairly recent version of IDL (6.3+
i think), then yes you can theoretically do this using ActiveX/COM
objects. I've tried it however, and have met with mixed results.
It's fairly easy to get Word running with an IDL program, but beyond
that I wasn't able to do much else that was useful. The reason for
this was not anything that was the fault of IDL, but that Word's
object model is so, well, obtuse i guess is the nice way to put it.
So i had the same trouble controlling Word from several different
ActiveX-aware languages, including perl and visual basic itself. But
yes it's theoretically possible, look at IDLcomIDispatch objects in
the IDL help files to get you started, and good luck!
|
|
|