Application.AvailablePrinters 属性 (Visio)

返回已安装的打印机的列表。 此为只读属性。

语法

表达式AvailablePrinters

expression:表示 Application 对象的变量。

返回值

字符串 ()

示例

以下 Microsoft Visual Basic for Applications (VBA) 宏显示如何使用 AvailablePrinters 属性获取可用打印机的列表。

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

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。