- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 84
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2025-4-8
               
|
¥»©«³Ì«á¥Ñ Hsieh ©ó 2010-8-7 23:45 ½s¿è
¦^´_ 1# basarasy - Sub NN()
- If IsNumeric(Application.Match(Split(ActivePrinter, " on")(0), Printer_List, 0)) Then
- ActiveSheet.PrintOut
- Else
- MsgBox "§ä¤£¨ì¦Lªí¾÷"
- End If
- End Sub
- Function Printer_List() As Variant
- '³]©w¤Þ¥Î¶µ¥ØMicrosoft Shell Controls And Automation
- Dim MySh As Shell32.Shell
- Dim MyPrinter As Shell32.FolderItem
- Dim Ar()
- Set MySh = CreateObject("Shell.Application")
- For Each MyPrinter In MySh.Namespace(ssfPRINTERS).Items
- If MyPrinter.Name <> "·s¼W¦Lªí¾÷" Then
- ReDim Preserve Ar(s)
- Ar(s) = MyPrinter.Name
- s = s + 1
- End If
- Next
- Printer_List = Ar
- End Function
½Æ»s¥N½X °ÝÃD2À³¸Ó¬O¥ÑWindows¨Ó±±¨î¥i±qAPI¨ç¼Æ¥h§äµª®× |
|