Hello

I've been making a print module for a program I'm working on, and I figured it would be somewhat cleaner to avoid setting the built-in Printer object and just use my own. However, whenever I try to use any methods of my own Printer object, I get error 438: Object doesn't support this property or method.

Ex:
vb Code:
  1. Dim MyPrinter As Printer
  2.  
  3. For Each MyPrinter In Printers
  4.     MsgBox MyPrinter.DeviceName   'this always works
  5.     MsgBox MyPrinter.ScaleX(15, vbTwips, vbInches)   'this errors
  6. Next

However, the following works just fine

vb Code:
  1. Dim MyPrinter As Printer
  2.  
  3. For Each MyPrinter In Printers
  4.     Set Printer = MyPrinter
  5.    
  6.     MsgBox Printer.DeviceName   'this always works
  7.     MsgBox Printer.ScaleX(15, vbTwips, vbInches)   'this no longer errors
  8. Next


I would think that any Printer object should support the same set of methods... so this is really confusing me. I know I could work around it by just using the Printer object instead, but in any case I'd like to know what's going on.