Article View: microsoft.public.vb.general.discussion
Article #2VB printer trick
From: AS
Date: Thu, 12 Nov 2026 15:39
Date: Thu, 12 Nov 2026 15:39
25 lines
1498 bytes
1498 bytes
very old trick but may be useful for those still using VB the printer object exposes a number of properties of the currently selected printer, but it only reflects the values retrieved at start and not the current ones; willing to update those values issue a Printer.Print ""; then read the proprties you're interested in and issue a KillDoc to cancel the print job and avoid any issue; the same trick also works with any printer in the printers collection, so if you do something like For Each objPrt in Printers objPrt.Print ""; ' here we retrieve the ' desired properties... objPrt.KillDoc Next it will work for any configured printer
Technical Details
Message-ID:
<20261112163957.00000783@invalid.invalid>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: AS <invalid@invalid.invalid> Newsgroups: microsoft.public.vb.general.discussion Subject: VB printer trick Date: Thu, 12 Nov 2026 16:39:57 +0100 Organization: n/a Message-ID: <20261112163957.00000783@invalid.invalid> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: solani.org; logging-data="1528714"; mail-complaints-to="abuse@news.solani.org" Cancel-Lock: sha1:670RztDYmhbpRJ2V4goKmz2BU5o= X-User-ID: eJwFwYEBwCAIA7CXBNsK5zAc/59gwi1TH4gCh9NJVoTlOnUW/UtcuAUiFu70Rv0NhyZL8nkBFBBR