(Access) 的 Report.PrtDevNames 屬性

使用 PrtDevNames 屬性可設定或傳回表單或報表的 [ 列印 ] 對話方塊中所選取印表機的相關資訊。 讀取/寫入的 Variant

語法

運算式PrtDevNames

表達 代表 Report 物件的變數。

註解

強烈建議您參閱 Win32 軟體發展工具組,以取得 PrtDevModePrtDevNamesPrtMip 屬性的完整檔。

PrtDevNames 屬性是 Win32 Software Development Kit 中所定義的 DEVNAMES 結構的可變長度的結構。

PrtDevNames 屬性使用下列成員。

成員 描述
DriverOffset Specifies the offset from the beginning of the structure to a Null- terminated string that specifies the file name (without an extension) of the device driver. This string is used to specify which printer is initially displayed in the Print dialog box.
DeviceOffset 指定從結構開始之處到指定裝置名稱以 Null 結束的字串間的位移。 此字串不能長於 32 個位元組 (包含空字元) 並且必須和 DEVMODE 結構的 DeviceName 成員是完全相同的。
OutputOffset 指定從結構開始之處到指定實體輸出媒體 (輸出埠) 的 MS-DOS 裝置名稱 (例如 "LPT1:") 以 Null 結束的字串間的位移。
預設值 Specifies whether the strings specified in the DEVNAMES structure identify the default printer. 在 [列印] 對話方塊顯示之前,如果預設值設定為 1,而且在 DEVNAMES 結構之中的全部的值都符合目前的預設印表機,則所選的取印表機將被設定成預設印表機。 Default is set to 1 if the current default printer has been selected.

Microsoft Access 設定 PrtDevNames 屬性當您在 [ 列印 ] 對話方塊的 [印表機] 區段中進行選取。 您也可以使用 Visual Basic 來設定 屬性。

Access 會使用 DEVNAMES 結構來初始化 [列印 ] 對話方塊。 當使用者選擇 [確定] 關閉對話方塊時, PrtDevNames 屬性會傳回所選印表機的相關資訊。

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應