Table of contents
TOC
折叠目录
展开目录

Application.AvailablePrinters 属性 (Visio)Application.AvailablePrinters Property (Visio)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

返回已安装的打印机的列表。只读。Returns a list of installed printers. Read-only.

语法Syntax

表达式AvailablePrintersexpression . AvailablePrinters

表达式_一个表示应用程序对象的变量。_expression A variable that represents an Application object.

返回值Return Value

String()String()

示例Example

下面的 Microsoft Visual Basic for Applications (VBA) 宏显示如何使用AvailablePrinters属性来获取可用打印机的列表。The following Microsoft Visual Basic for Applications (VBA) macro shows how to use the AvailablePrinters property to get a list of available printers.

Public Sub AvailablePrinters_example() 

 Dim aStrPrinters() As String 
 Dim strPrinter As Variant 

 aStrPrinters = Application.AvailablePrinters 

 For Each strPrinter In aStrPrinters 

 Debug.Print strPrinter 

 Next 

End Sub
© 2018 Microsoft