白黒印刷(PageSetup.BlackAndWhite プロパティ)
PageSetup.BlackAndWhite プロパティ
PageSetup.BlackAndWhite プロパティ を True に設定すると白黒で印刷します。値の取得および設定が可能です。
【書式】
<取得>
object.PageSetup.BlackAndWhite
<設定>
object.PageSetup.BlackAndWhite = boolean
引数・戻り値
- object ・・・ 対象となる Worksheet オブジェクト を指定します。
- boolean ・・・ True に設定すると対象となるオブジェクト( object )を白黒で印刷します。
PageSetup.BlackAndWhite プロパティ 使用例
サンプルVBAソース
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
Sub Sample_PageSetupBlackAndWhite() Dim w As Worksheet Set w = ActiveSheet With w '印刷範囲を設定 .PageSetup.PrintArea = "B1:J26" '白黒で印刷 .PageSetup.BlackAndWhite = True '印刷プレビューを表示 .PrintPreview End With End Sub |
実行結果
サンプルVBAソース 実行前
実行後
関連記事
-
-
ブック作成時のシート数の取得・設定(SheetsInNewWorkbook プロパティ)
SheetsInNewWorkbook プロパティ Excel で新規ブックに自 …
-
-
アクティブプリンタを変更(ActivePrinter プロパティ)
ActivePrinter プロパティ ActivePrinter プロパティを …
-
-
ブックを閉じる(Close メソッド)
ブックを閉じる(Close メソッド) Close メソッド で、ブックを閉じる …
-
-
ウィンドウを拡大・縮小(Zoom プロパティ)
ウィンドウを拡大・縮小(Zoom プロパティ) ウィンドウの表示サイズをパーセン …
-
-
数式を表示(DisplayFormulas プロパティ)
数式を表示(DisplayFormulas プロパティ) セルに数式が入力されて …
-
-
ワークシートのコピー・移動(Copy メソッド Move メソッド)
Copy メソッド Copy メソッドで、指定した位置にワークシートの複製を作成 …
-
-
ウィンドウのタイトル(Window.Caption プロパティ)
ウィンドウのタイトル(Caption プロパティ) Windows.Captio …
-
-
ユーザー設定のドキュメントプロパティ(CustomDocumentProperties プロパティ)
CustomDocumentProperties プロパティ ユーザー設定のドキ …
-
-
並べて比較(CompareSideBySideWith,SyncScrollingSideBySide,BreakSideBySide)
並べて比較(CompareSideBySideWith メソッド) Compar …
-
-
背景に画像を表示(SetBackgroundPicture メソッド)
SetBackgroundPicture メソッド SetBackgroundP …