白黒印刷(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ソース 実行前
実行後
関連記事
-
-
印刷範囲の設定・解除(PageSetup.PrintArea プロパティ)
PageSetup.PrintArea プロパティ 印刷範囲を設定するには、Pa …
-
-
0 を表示するかどうかを設定(DisplayZeros プロパティ)
DisplayZeros プロパティ DisplayZeros プロパティに、T …
-
-
数式バーの設定(DisplayFormulaBar, FormulaBarHeight)
数式バーの設定 数式バーの表示・非表示の設定を行うには、DisplayFormu …
-
-
ブックの表示を変更(View プロパティ)
ブックの表示を変更(View プロパティ) View プロパティ で、ブックの表 …
-
-
印刷設定(フッターに画像を指定)LeftFooterPicture,CenterFooterPicture,RightFooterPicture
フッターに画像を表示するには LeftFooterPicture プロパティ、C …
-
-
背景に画像を表示(SetBackgroundPicture メソッド)
SetBackgroundPicture メソッド SetBackgroundP …
-
-
印刷設定(ページごとに異なるヘッダー・フッターを設定)Page オブジェクト・HeaderFooter オブジェクト
Page オブジェクト ページごとに異なるヘッダーおよびフッターを設定する場合、 …
-
-
ワークシートをアクティブにする・選択する(Activate, Select)
Activate メソッド・Select メソッド Activate メソッドは …
-
-
ワークシートの数を数える(Count プロパティ)
Count プロパティ 指定したWorksheets コレクションやSheets …
-
-
行列の見出しの表示・非表示(DisplayHeadings プロパティ)
DisplayHeadings プロパティ 行と列の見出しの表示・非表示を設定お …

