Problem with adsi functions and getobject
Hi ,
Even i have a similar problem, can you help me with it
I need to my program to pause, resume or cancel any job in the print queue. I am trying to use the ADSI functions to achieve this functionality. But I am having problems trying to use getobject function to access the print queue on my printer.
I get an error saying "Automation Error . Invalid syntax". My souce code is :
Dim pq as IADsPrintQueue
Dim pqo as IADsPrintQueueOperations
Dim pj as IADsPrintJob
Set pq = GetObject("WinNT://domain_name/computer_name/printer_name")
(I get error at the above statement)
Set pqo = pj
for each pj in pqo.PrintJobs
....
..
next
Can you help me with this ?
Thanks in advance for your help
Kamal