印刷設定を高速化(PrintCommunication プロパティ)
PrintCommunication プロパティ
PrintCommunication プロパティに、False を指定することで、プリンターとの通信を無効化し、True を指定することで有効化することができます。
印刷の各種設定(PageSetup オブジェクト を使用する動作)は、時間がかかる場合があります。その時は、Excel とプリンタとの通信を一時的に遮断することで、PageSetup オブジェクト の動作を高速化することができます。(※ Excel 2010 以降のバージョンでのみ使用できます。)
<取得>
object.PrintCommunication
<設定>
object.PrintCommunication = boolean
引数・戻り値
- object ・・・ 対象となる Application オブジェクト を指定します。
- boolean ・・・ プリンタとの通信を有効にする場合は、True、無効にするには、False を指定します。
PrintCommunication プロパティ 使用例
サンプルVBAソース
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
Sub Sample_PrintCommunication() Dim w As Worksheet Set w = ActiveSheet 'プリンタとの通信を遮断(印刷設定を高速化) Application.PrintCommunication = False '印刷の設定 With w.PageSetup .Zoom = 50 '印刷の拡大縮小率を 50 % に設定 .CenterHorizontally = True '印刷を水平方向中央に設定 End With 'プリンタとの通信を再開 Application.PrintCommunication = True 'プレビュー表示 w.PrintPreview End Sub |
実行結果
関連記事
-
-
ウィンドウを整列(Windows.Arrange メソッド)
ウィンドウを整列(Windows.Arrange メソッド) Windows コ …
-
-
ウィンドウのタイトル(Window.Caption プロパティ)
ウィンドウのタイトル(Caption プロパティ) Windows.Captio …
-
-
ユーザー設定のビュー(CustomViews プロパティ)
ユーザー設定のビュー CustomViews コレクションは、ユーザー設定ビュー …
-
-
セルのコメントを印刷(PageSetup.PrintComments プロパティ)
PageSetup.PrintComments プロパティ PageSetup. …
-
-
保存時にバックアップファイルが作成されるかどうかを確認(CreateBackup プロパティ)
バックアップファイルが作成されるかどうかを確認 CreateBackup プロパ …
-
-
ウィンドウの分割(Split プロパティ,SplitColumn プロパティ,SplitRow プロパティ)
ウィンドウの分割と解除 ウィンドウ(ワークシート画面)を分割するには、Split …
-
-
ワークブックを保護・保護を解除(Protect メソッド・Unprotect メソッド)
Protect メソッド・Unprotect メソッド Protect メソッド …
-
-
ブックを別名で保存(SaveAs メソッド)
ブックを別名で保存(SaveAs メソッド) ブックの変更を保存したり、新規ブッ …
-
-
画面の上端・左端を設定(ScrollRow プロパティ、ScrollColumn プロパティ)
画面の上端・左端を設定 ScrollRow プロパティで、指定した行を画面上端に …
-
-
背景に画像を表示(SetBackgroundPicture メソッド)
SetBackgroundPicture メソッド SetBackgroundP …
