白黒印刷(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ソース 実行前
実行後
関連記事
-
-
前後のワークシートを参照する(Previous プロパティ,Next プロパティ)
Previous プロパティ 指定したシートの前(左側)のシートを参照します。 …
-
-
ステータスバーにメッセージを表示(StatusBar プロパティ)
StatusBar プロパティ StatusBar プロパティで、ステータスバー …
-
-
印刷のページ区切り(DisplayPageBreaks プロパティ)
DisplayPageBreaks プロパティ 印刷したあとや印刷プレビューを表 …
-
-
印刷のタイトル行、タイトル列を設定(PrintTitleRows,PrintTitleColumns)
PageSetup.PrintTitleRows プロパティ PageSetup …
-
-
印刷設定を高速化(PrintCommunication プロパティ)
PrintCommunication プロパティ PrintCommunicat …
-
-
ユーザー設定のドキュメントプロパティ(CustomDocumentProperties プロパティ)
CustomDocumentProperties プロパティ ユーザー設定のドキ …
-
-
ウィンドウの位置を入れ替える(ActivatePrevious メソッド、ActivateNext メソッド)
ウィンドウの位置を入れ替える ActivatePrevious メソッド、Act …
-
-
ウィンドウの状態を取得・設定(WindowState プロパティ)
ウィンドウの状態を取得・設定(WindowState プロパティ) Window …
-
-
ウィンドウのタイトル(Window.Caption プロパティ)
ウィンドウのタイトル(Caption プロパティ) Windows.Captio …
-
-
シート見出しの色を設定(Tab プロパティ)
シート見出しの色を設定 Tab オブジェクトの Color プロパティ、Colo …

