× 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.



> I'd add only that you need to add the OLE library for Word 
> (or Office) to the VB project, so that you have access to 
> the object hierarchy.

Eh??? Ok, maybe I've been out of VB longer than I thought. <g>

> You'd need to have a way for the VB app to get the name of the RTF
> file. 

No, the RTF file name would be hard-coded.  This would not be a problem
since as soon as it's created in the IFS, it gets inserted into a Word
document, and I won't need the file in the IFS after that.

> Also, if you had position markers in the document, you could 
> execute a search and position to that, then insert the RTF - 
> could be a replacement for current cursor position, maybe.

Again, just trying to keep this simple, and just whereever the cursor
is in the document, that's where to insert the RTF.

Thanks, guys, looks like this is going to be a little more complicated
than I thought.

- Dan

--- Vern Hamberg <vhamberg@centerfieldtechnology.com> wrote:
> Ean & Griz
> 
> Nice, Griz. This way you are not running the macro, you are actually 
> executing the functions directly. I'd add only that you need to add
> the OLE 
> library for Word (or Office) to the VB project, so that you have
> access to 
> the object hierarchy. Then the VB app needs to find the running Word
> app, 
> then the macro code will be applied to the returned Application
> object - 
> can probably use something like
> 
>    With WordApp
> 
>    End With
> 
> Then all the code is in one place, too. Otherwise, a macro is part of
> a 
> Word hierarchy and can be run.
> 
> You'd need to have a way for the VB app to get the name of the RTF
> file. 
> Also, if you had position markers in the document, you could execute
> a 
> search and position to that, then insert the RTF - could be a
> replacement 
> for current cursor position, maybe.
> 
> HTH
> 
> Vern
> 
> At 03:43 PM 1/15/2003 -0600, you wrote:
> >Dan,
> >You can do what you asked in regards to running a Macro outside of a
> work 
> >document, sort of anyway. All a macro is, is VB code that runs
> behind the 
> >scenes of a word, or excel application. Try recording a macro, do
> what 
> >ever you want and then degub the macro. You can see what the VB code
> is. 
> >This code can than be plucked from the recorded macro and put inside
> a VB 
> >program that looks for the open Word document and then executes the
> code 
> >that you got from recording the macro. I've done it with Excel, and
> it 
> >worked nicely. Let me know if you would like any more information.
> >Griz
> >
> >-----Original Message-----
> >From: Dan [mailto:dbcemid@yahoo.com]
> >Sent: Wednesday, January 15, 2003 2:06 PM
> >To: Midrange Systems Technical Discussion
> >Subject: Re: Need AS400-based magic box to insert RTF file into
> Worddocument
> >
> >
> >Vern (& others who may know),
> >
> >Do you know if the VB (or whatever) app we're talking about would be
> a 
> >short & simple 10-liner type app?  Would it be straight VB code or
> would 
> >APIs (or whatever VB uses) be required?
> >
> >- Dan


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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.