I have various macros that were originally written in Wordbasic. I have
rewritten or converted most to VBA code but one particular piece of code
won't seem to work in VBA so I must be doing something wrong. an instance is

WordBasic.Call "somemacorname.ITUPrintPSToDisk", filename

will work but If I drop the Wordbasic it will not. (filename is a variable
containing a name of the file to be printed by the macro)

This may be very basic but I can't seem to get it to work.

ps I have got other Call commands to work but not when they refer to a
subroutine in a macro as the one above does.

Thanks

Phil

Re: Replacing Wordbasic.Call in Macros by Martin

Martin
Wed Feb 02 09:40:42 CST 2005

Hey Phil

> WordBasic.Call "somemacorname.ITUPrintPSToDisk", filename
>
> will work but If I drop the Wordbasic it will not. (filename is a variable
> containing a name of the file to be printed by the macro)

Here are 2 possible solutions:

1. remove the "-s around your macroname and transform your code
into a normal VBA call:

Call somemacroname.ITUPrintPSToDisk(filename)

2. Use Application.Run instead:

Application.Run "somemacroname.ITUPrintPSToDisk", filename


Cheers,
Martin



Re: Replacing Wordbasic.Call in Macros by Howard

Howard
Wed Feb 02 09:45:21 CST 2005

somemacorname.ITUPrintPSToDisk filename


--
http://www.standards.com/; See Howard Kaikow's web site.
"Phil Stokes" <PhilStokes@discussions.microsoft.com> wrote in message
news:0E1356EF-A669-4169-BAB3-FDD6DC8BDE69@microsoft.com...
> I have various macros that were originally written in Wordbasic. I have
> rewritten or converted most to VBA code but one particular piece of code
> won't seem to work in VBA so I must be doing something wrong. an instance
is
>
> WordBasic.Call "somemacorname.ITUPrintPSToDisk", filename
>
> will work but If I drop the Wordbasic it will not. (filename is a variable
> containing a name of the file to be printed by the macro)
>
> This may be very basic but I can't seem to get it to work.
>
> ps I have got other Call commands to work but not when they refer to a
> subroutine in a macro as the one above does.
>
> Thanks
>
> Phil



Re: Replacing Wordbasic.Call in Macros by PhilStokes

PhilStokes
Thu Feb 03 06:41:01 CST 2005

Tried this
somemacorname.ITUPrintPSToDisk filename

but it didn't work.

I found that Application.Run worked ok and I'll use that code

Thanks to all that responded.

Phil

> > I have various macros that were originally written in Wordbasic. I have
> > rewritten or converted most to VBA code but one particular piece of code
> > won't seem to work in VBA so I must be doing something wrong. an instance
> is
> >
> > WordBasic.Call "somemacorname.ITUPrintPSToDisk", filename
> >
> > will work but If I drop the Wordbasic it will not. (filename is a variable
> > containing a name of the file to be printed by the macro)
> >
> > This may be very basic but I can't seem to get it to work.
> >
> > ps I have got other Call commands to work but not when they refer to a
> > subroutine in a macro as the one above does.
> >
> > Thanks
> >
> > Phil
>
>
>

Re: Replacing Wordbasic.Call in Macros by Howard

Howard
Sun Feb 06 13:40:38 CST 2005

Application.run is another alternative.
Depends on how things are set up.

--
http://www.standards.com/; See Howard Kaikow's web site.
"Phil Stokes" <PhilStokes@discussions.microsoft.com> wrote in message
news:787455CE-5FEA-41F5-8AB4-BEDC9ECAE2DA@microsoft.com...
> Tried this
> somemacorname.ITUPrintPSToDisk filename
>
> but it didn't work.
>
> I found that Application.Run worked ok and I'll use that code
>
> Thanks to all that responded.
>
> Phil
>
> > > I have various macros that were originally written in Wordbasic. I
have
> > > rewritten or converted most to VBA code but one particular piece of
code
> > > won't seem to work in VBA so I must be doing something wrong. an
instance
> > is
> > >
> > > WordBasic.Call "somemacorname.ITUPrintPSToDisk", filename
> > >
> > > will work but If I drop the Wordbasic it will not. (filename is a
variable
> > > containing a name of the file to be printed by the macro)
> > >
> > > This may be very basic but I can't seem to get it to work.
> > >
> > > ps I have got other Call commands to work but not when they refer to a
> > > subroutine in a macro as the one above does.
> > >
> > > Thanks
> > >
> > > Phil
> >
> >
> >