× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



What you want to do is doable. It can't be done directly from the 400, as it needs OLE access to the active Word application. But you could have a VB client that you could call with STRPCCMD or RUNRMTCMD, that'd find the open Word application and insert the RTF at the cursor.

Or can control originate at the PC, with the user who has the Word document open? A button could be created that fires off a macro to call the CL.

The scenario you describe feels like pretty loose linkage between the parts of the app. But maybe that's alright.

Tale a look at this site <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dno2kta/html/offaut.asp> on "Automating Microsoft Office 97 and Microsoft Office 2000"

HTH

Vern

At 08:29 AM 1/14/2003 -0800, you wrote:
Fellow Midrangers:

Is this "pie in the sky" or possible to do?

I have an AS/400 application that creates an RTF (Rich Text Format)
file on the 400 and then transfers the file to an IFS stream file via
CpyToStmf.  I am able to open the file in the IFS and bring it up in MS
Word.

WHAT I WOULD LIKE TO DO NOW is have a "magic box" thingy that takes the
stream file just created in the IFS, preferably in the same process
that creates the stream file, and execute an Insert File command on the
RTF file to insert it in the open Word document whereever the cursor is
in the document.  It should be "callable" from the CL program.  This
process will be repeated several times, and each generated RTF file
should automagically be inserted into the Word document.

Assumptions:  MS Word is already open on the client PC, and the
document to insert the RTF into is open and is the "active" window.
AS/400 is v4r5 (soon to be v5r2 if that makes any difference).  Client
PC is Win98se with plenty of memory and horses.  Windows has a drive
mapped to the IFS.

FWIW, the IFS file name is generated using the current timestamp (for
example DANW011403111125232.rtf), but I could easily make it a single
hard-coded name if it would make it easier to do.

TIA, Dan


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.