|
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 --- Vern Hamberg <vhamberg@centerfieldtechnology.com> wrote: > Hi Dan > > I think you need to use regular VB to create a stand-alone executable > that will find your active Word instance. That's how to execute a > macro from > outside of Word itself. The section on creating an OLE client in VB > should > help you here. You'll need to delve into the object structure of Word > to > find how to call a macro. > > Incoming Remote Command is the server. As far as the autostart, I > guess that depends. This sounds sort of productionish, so I guess I'd > say yes; > you want to set up appropriate users on the PC. > > Neat idea - I once did (with others) something with STRSCNCPY that put > the screen, with attributes, into a file, then I'd change those to > various > attributes (bold, underline, etc.) in Word. At one place the > STRSCNCPY was > triggered with the Attn key, too. > > Good luck > > Vern > > At 10:48 AM 1/14/2003 -0800, you wrote: > >Hi Vern > > -snip- > > >Is there a way to get a macro executed from a source outside the > Word > >application and getting it to run on an already opened Word app and > an > >already opened Word document? I suppose if I can do this from the > >Windows Run command line, I should be able to remotely call it from > the > >400. Vern, you mention a VB client that the 400 could call via > >RunRmtCmd; would this be something I could build from Word's VBA? > Or > >will I need the VB development product? I'm guessing that the > client > >would have to find & activate the already-opened Word application, > then > >execute the macro? It's been awhile since I've done any VB, but I > know > >I've never written anything like that before. I am looking at the > MSDN > >article you provided a link for, but am going to have to wait til > some > >after-hours free time to go through it. Well, maybe not, says you > need > >VB 5.0 or 6.0, and I don't have access to that. > > > >I noticed in the "Opening PC docs thru AS/400" thread that you > >mentioned CA's Incoming Remote Command; I have set that up. Should > the > >"Automatically start IRC" box be checked? This is the "server" you > are > >talking about? How does one get it to "run on the PC"? > > -snip- __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo.cgi/midrange-l or email: MIDRANGE-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
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.