Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

printing text

90 views
Skip to first unread message

Paul N. Temple

unread,
Jan 20, 2004, 12:20:09 AM1/20/04
to
Please help or point me some other direction. Thanks!
I did not get an answer from a previous post. This is where it ended:

How do you get the object "printer" and where is the docs on what I can do
with printer (methods, events, properties, etc.) Someone told me "printer"
exists in vb but not vbs.

Thanks,
Paul Temple

"JR" <XX...@pandora.XXXX> wrote in message
news:qX%Gb.97754$sg7.4...@phobos.telenet-ops.be...
> print to the printer
>
> Printer.print "you text"
>
>
> --
> Met vriendelijke groeten.
> Jan
> "Paul.Temple" <paul....@templesystems.net> schreef in bericht
> news:%23SkhXq8...@tk2msftngp13.phx.gbl...
> > I have written text to lpt1 in vbs by writting to the file "LPT1:". What
> if
> > I want to write to a windows printer that is a USB printer? Also I would
> > really like to make the printer use a specific font or font size. Is
there
> > an easy way to do this? In foxpro, I created a DC and used that but I
> can't
> > do that in vbs. Any Ideas are appreciated.
> >
> > Thanks,
> > Paul Temple
> >
> >
>
>

Michael Harris \(MVP\)

unread,
Jan 20, 2004, 8:03:37 PM1/20/04
to
Paul N. Temple wrote:
> Please help or point me some other direction. Thanks!
> I did not get an answer from a previous post. This is where it ended:
>
> How do you get the object "printer" and where is the docs on what I
> can do with printer (methods, events, properties, etc.) Someone told
> me "printer" exists in vb but not vbs.


JR threw you a red herring. Unlike VB, there is no printer object
accessible from VBScript.

You could always try writing a simple VB ActiveX component that exposes the
VB Printer object as a public object property...


>> "JR" <XX...@pandora.XXXX> wrote in message
> news:qX%Gb.97754$sg7.4...@phobos.telenet-ops.be...
>> print to the printer
>>
>> Printer.print "you text"
>>
>>
>> --
>> Met vriendelijke groeten.
>> Jan
>> "Paul.Temple" <paul....@templesystems.net> schreef in bericht
>> news:%23SkhXq8...@tk2msftngp13.phx.gbl...
>>> I have written text to lpt1 in vbs by writting to the file "LPT1:".
>>> What if I want to write to a windows printer that is a USB printer?
>>> Also I would really like to make the printer use a specific font or
>>> font size. Is there an easy way to do this? In foxpro, I created a
>>> DC and used that but I can't do that in vbs. Any Ideas are
>>> appreciated.
>>>
>>> Thanks,
>>> Paul Temple

--
Michael Harris
Microsoft.MVP.Scripting

Windows 2000 Scripting Guide
Microsoft® Windows®2000 Scripting Guide
http://www.microsoft.com/technet/scriptcenter/scrguide/sagsas_overview.asp

TechNet Script Center Sample Scripts
http://www.microsoft.com/downloads/release.asp?ReleaseID=38942

WSH 5.6 documentation download
http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=en

Lee Peedin

unread,
Jan 23, 2004, 8:16:08 AM1/23/04
to
Michael,
I'm sure others may have already done it, but I have wrapped up the VB
PrinterObject into an activeX dll that should be fully usable within
VBScript. Personally I use it with Object Rexx. I have an earlier
version available for download (free) complete with documentation and
samples (in Object Rexx, but easily convertable). If anyone trys and
likes it, let me know if you'd like the latest version - I've added
such things as text rotation.
http://pragmaticlee.safedataisp.net

Lee Peedin
VP RexxLA
www.rexxla.org

0 new messages