白黒印刷(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ソース 実行前
実行後
関連記事
-
-
印刷:余白を設定 TopMargin,BottomMargin,LeftMargin,RightMargin,HeaderMargin,FooterMargin
余白を設定する 余白を設定する単位は、pt(ポイント:約 0.03528 cm) …
-
-
ブックのプロパティ(BuiltinDocumentProperties プロパティ)
BuiltinDocumentProperties プロパティ ブックのプロパテ …
-
-
ブックを閉じる(Close メソッド)
ブックを閉じる(Close メソッド) Close メソッド で、ブックを閉じる …
-
-
印刷設定(フッターに画像を指定)LeftFooterPicture,CenterFooterPicture,RightFooterPicture
フッターに画像を表示するには LeftFooterPicture プロパティ、C …
-
-
選択されているシートを参照する(SelectedSheets プロパティ)
SelectedSheets プロパティ 選択されているすべてのシートをあらわす …
-
-
ウィンドウを整列(Windows.Arrange メソッド)
ウィンドウを整列(Windows.Arrange メソッド) Windows コ …
-
-
印刷時の改ページ設定(Add,ResetAllPageBreaks)
改ページの追加と解除 印刷時に改ページを指定するには、HPageBreaks コ …
-
-
新しいウィンドウを開く(NewWindow メソッド)
NewWindow メソッド NewWindow メソッドで、任意のブックのコピ …
-
-
ウィンドウを拡大・縮小(Zoom プロパティ)
ウィンドウを拡大・縮小(Zoom プロパティ) ウィンドウの表示サイズをパーセン …
-
-
最近使用したファイル(RecentFile オブジェクト,RecentFiles コレクション)
最近使用したファイル(RecentFile オブジェクト,RecentFiles …

