白黒印刷(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ソース 実行前
実行後
関連記事
-
-
ウィンドウのタイトル(Window.Caption プロパティ)
ウィンドウのタイトル(Caption プロパティ) Windows.Captio …
-
-
表示されているセル範囲を取得(VisibleRange プロパティ)
VisibleRange プロパティ 現在表示されているセル範囲(Range オ …
-
-
ユーザー設定のビュー(CustomView オブジェクト)
ユーザー設定のビュー CustomView オブジェクトは、登録されている各ビュ …
-
-
ブックを閉じる(Close メソッド)
ブックを閉じる(Close メソッド) Close メソッド で、ブックを閉じる …
-
-
ウィンドウを拡大・縮小(Zoom プロパティ)
ウィンドウを拡大・縮小(Zoom プロパティ) ウィンドウの表示サイズをパーセン …
-
-
0 を表示するかどうかを設定(DisplayZeros プロパティ)
DisplayZeros プロパティ DisplayZeros プロパティに、T …
-
-
ブックのパスを取得(FullName プロパティ,Path プロパティ)
FullName プロパティ・Path プロパティ ブックのパス(保存場所)を調 …
-
-
ブックが共有モードか確認する(MultiUserEditing プロパティ)
ブックが共有モードか確認する(MultiUserEditing プロパティ) 共 …
-
-
印刷設定(ヘッダーに画像を指定)LeftHeaderPicture, CenterHeaderPicture, RightHeaderPicture
ヘッダーに画像を表示するには LeftHeaderPicture プロパティ、C …
-
-
印刷の倍率(拡大/縮小)(PageSetup.Zoom プロパティ)
PageSetup.Zoom プロパティ PageSetup.Zoom プロパテ …

