LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Detect printer properties

Hi Jos,

WMI can be used to retrieve the printerconfiguration properties BUT you
cannot manipulate them using WMI as they are readonly.

However the code below lists only the standard props.

Go into the immediate pane in VBE and mine all 86 properties
of the Win32_Printer WMI object.

You'll need API programming to set them with code.
Certainly if it concerns some special manufacturers properties,
this aint going to be easy.

If you find the proper property's ID with the WMI script
let me know. Maybe I can help.

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


michelxld wrote in
<news:<michelxld.23a251_1140018302.9229@excelfor um-nospam.com


Hello

if WindowsXP is installed you may use


Sub proprietesImprimantes()
'
'http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmis
dk/wmi/win32_printerconfiguration.asp '
Dim objWMIService As Object, colItems As Object
Dim objItem As Object
Dim strComputer As String
Dim i As Byte

On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer &
"\root\cimv2")

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
members on my network printer not able to print to default printer smeheut Excel Discussion (Misc queries) 0 June 18th 07 06:42 PM
Excel document printer properties overwrite users output bin joost Excel Discussion (Misc queries) 0 November 8th 06 08:27 AM
Save with preset Printer Properties alex3867 Excel Discussion (Misc queries) 0 August 18th 06 02:24 PM
Send printer escape commands to a printer using VBA mikeburg[_41_] Excel Programming 3 October 6th 05 07:36 PM
Use VBA to access Printer Properties (Resolution, Tray etc) Alan Excel Programming 4 April 14th 04 12:11 AM


All times are GMT +1. The time now is 04:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"