印刷設定を高速化(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 |
実行結果
関連記事
-
-
数式バーの設定(DisplayFormulaBar, FormulaBarHeight)
数式バーの設定 数式バーの表示・非表示の設定を行うには、DisplayFormu …
-
-
ブックを開く(Open メソッド)
ブックを開く(Open メソッド) ブックを開くには、Workbooks コレク …
-
-
Excel を全画面表示(DisplayFullScreen プロパティ)
DisplayFullScreen プロパティ DisplayFullScree …
-
-
ブックの変更が保存されているかを確認する(Saved プロパティ)
ブックの変更が保存されているかを確認する(Saved プロパティ) Saved …
-
-
印刷位置を中央に設定(CenterHorizontally, CenterVertically)
PageSetup.CenterHorizontally プロパティ PageS …
-
-
ブックのパスを取得(FullName プロパティ,Path プロパティ)
FullName プロパティ・Path プロパティ ブックのパス(保存場所)を調 …
-
-
イベントの発生・無効をコントロール(EnableEvents プロパティ)
EnableEvents プロパティ EnableEvents プロパティに T …
-
-
共有ファイルを開いているユーザー情報を取得(UserStatus プロパティ)
共有ファイルを開いているユーザー情報を取得 UserStatus プロパティは、 …
-
-
並べて比較(CompareSideBySideWith,SyncScrollingSideBySide,BreakSideBySide)
並べて比較(CompareSideBySideWith メソッド) Compar …
-
-
ワークシートをファイルに保存する(SaveAs メソッド)
SaveAs メソッド ワークシートを名前を付けてファイルに保存します。Work …
