Filling Word with OLE2

From: <bruin.arjan_at_gmail.com>
Date: 16 Jun 2006 04:52:30 -0700
Message-ID: <1150458750.587804.71170_at_y41g2000cwy.googlegroups.com>



[Quoted] Hello, I'm Arjan from the Netherlands,

I have many Word templates.
I have to fill the bookmarks/mergefields with data from an Oracle application (made in Forms 10g).

I think OLE2 is the solution.
I already found codes to go to a specified bookmark and fill it. However, that's not enought for me.
The data is already known and the many Word templates are also already existed. I want to fill all bookmarks/mergefields of a Word template without knowing which Word template will be open and the names of the bookmarks.

I was searching for all OLE2.invoke methods, but I can't find them by name (to see what possibilities I can use).

In my thoughts I want to do the following: 1. Opening Word and a word template (works). 2. Find the next bookmark (couldn't find a method like GoToNextBookmark or something? Is this possible?).
3. Grab the name of the Bookmark (didn't tried yet, because step 2 didn't work so far).
4. Fill the bookmark (on the hand of the name) with the specified data from forms.
5. Go to the next bookmark and also fill that one... until there is no next bookmark anymore.

Anyone who knows how I have to handle this? Alternatives are also welcome...

I will also be happy if anyone has a nice list of all methods I can fill in with OLE2.invoke to handle a word document. Thank you!

Arjan Received on Fri Jun 16 2006 - 13:52:30 CEST

Original text of this message