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



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


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.