{"id":4027,"date":"2015-10-19T17:27:56","date_gmt":"2015-10-19T08:27:56","guid":{"rendered":"http:\/\/excelwork.info\/excel\/?p=4027"},"modified":"2015-10-19T17:27:56","modified_gmt":"2015-10-19T08:27:56","slug":"headerfooter06","status":"publish","type":"post","link":"https:\/\/excelwork.info\/excel\/headerfooter06\/","title":{"rendered":"\u5370\u5237\u8a2d\u5b9a\uff08\u5148\u982d\u30da\u30fc\u30b8\u306e\u30d8\u30c3\u30c0\u30fc\u30fb\u30d5\u30c3\u30bf\u30fc\u3092\u8a2d\u5b9a\uff09DifferentFirstPageHeaderFooter, FirstPage"},"content":{"rendered":"<h2>\u5148\u982d\u30da\u30fc\u30b8\u306b\u5225\u306e\u30d8\u30c3\u30c0\u30fc\u304a\u3088\u3073\u30d5\u30c3\u30bf\u30fc\u3092\u8a2d\u5b9a<\/h2>\n<div class=\"m30-l\">\n<p>\u5148\u982d\u30da\u30fc\u30b8\u306e\u30d8\u30c3\u30c0\u30fc\u304a\u3088\u3073\u30d5\u30c3\u30bf\u30fc\u306e\u5185\u5bb9\u3092\u8a2d\u5b9a\u3059\u308b\u306b\u306f\u3001<strong>PageSetup.FirstPage \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<strong>PageSetup.DifferetFirstPageHeaderFooter \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong> \u306b\u3001<strong>True<\/strong> \u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001<strong>PageSetup.FirstPage \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong> \u306b\u8a2d\u5b9a\u3057\u305f\u5185\u5bb9\u304c\u6709\u52b9\u306b\u306a\u308a\u307e\u3059\u3002\uff08\u203b Excel 2007 \u4ee5\u964d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306e\u307f\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002\uff09<\/p>\n<br \/>\n<h3>PageSetup.DifferentFirstPageHeaderFooter \u30d7\u30ed\u30d1\u30c6\u30a3<\/h3>\n<p><strong>True<\/strong> \u306b\u8a2d\u5b9a\u3059\u308b\u3068\u3001\u5148\u982d\u30da\u30fc\u30b8\u3067\u306f\u4ed6\u306e\u30da\u30fc\u30b8\u3068\u7570\u306a\u308b\u30d8\u30c3\u30c0\u30fc\u3068\u30d5\u30c3\u30bf\u30fc\u304c\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u5024\u306e\u53d6\u5f97\u304a\u3088\u3073\u8a2d\u5b9a\u304c\u53ef\u80fd\u3067\u3059\u3002\u30d6\u30fc\u30eb\u578b\uff08Boolean\uff09\u306e\u5024\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u53d6\u5f97\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>PageSetup<\/strong>.<strong>DifferentFirstPageHeaderFooter<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u8a2d\u5b9a\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>PageSetup<\/strong>.<strong>DifferentFirstPageHeaderFooter<\/strong> = <em>boolean<\/em><\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Worksheet \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span> \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>boolean&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;<strong>True<\/strong> \u307e\u305f\u306f\u3001<strong>False<\/strong> \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul><\/div>\n<br \/>\n<h3>PageSetup.FirstPage \u30d7\u30ed\u30d1\u30c6\u30a3<\/h3>\n<p>\u5370\u5237\u5bfe\u8c61\u306e\u5148\u982d\u30da\u30fc\u30b8\u306e\u30d8\u30c3\u30c0\u30fc\u304a\u3088\u3073\u30d5\u30c3\u30bf\u30fc\u3092\u8a2d\u5b9a\u3059\u308b\u969b\u306b\u4f7f\u7528\u3059\u308b <strong>Page \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong> \u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<br \/>\n    <strong>Page \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong> \u306f\u3001<strong>LeftHeader \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u3001<strong>CenterHeader \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong> \u306a\u3069\u3092\u4f7f\u7528\u3057\u3066\u3001\u5404\u30d8\u30c3\u30c0\u30fc\u3001\u30d5\u30c3\u30bf\u30fc\u7b49\u3092\u8868\u3059 <strong>HeaderFooter \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong> \u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n    <strong>HeaderFooter \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong> \u306e <strong>Text \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong> \u3092\u4f7f\u7528\u3057\u3066\u3001\u5404\u30d8\u30c3\u30c0\u30fc\u30fb\u30d5\u30c3\u30bf\u30fc\u306e\u6587\u5b57\u5217\u7b49\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u3001<strong>Picture \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong> \u3092\u4f7f\u7528\u3057\u3066\u3001\u753b\u50cf\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002\uff08 <a href=\"https:\/\/excelwork.info\/excel\/headerfooter05\/\">\u5370\u5237\u8a2d\u5b9a\uff08\u30da\u30fc\u30b8\u3054\u3068\u306b\u7570\u306a\u308b\u30d8\u30c3\u30c0\u30fc\u30fb\u30d5\u30c3\u30bf\u30fc\u3092\u8a2d\u5b9a\uff09Page \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30fbHeaderFooter \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/a> \u3092\u53c2\u7167\uff09<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>PageSetup<\/strong>.<strong>FirstPage<\/strong><\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Worksheet \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span> \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul><\/div>\n<\/div>\n<br \/><br \/>\n<h2>\u5148\u982d\u30da\u30fc\u30b8\u3060\u3051\u4ed6\u306e\u30da\u30fc\u30b8\u3068\u7570\u306a\u308b\u30d8\u30c3\u30c0\u30fc\u306b\u8a2d\u5b9a\u3057\u305f\u4f8b<\/h2>\n<div class=\"m30-l\">\n<h3 id=\"vba_sample\">\u30b5\u30f3\u30d7\u30ebVBA\u30bd\u30fc\u30b9<\/h3>\n<pre class=\"lang:vb mark:0 decode:true \" title=\"FirstPage \u30d7\u30ed\u30d1\u30c6\u30a3\" data-url=\"http:\/\/example.co.jp\" >\r\n\u3000\r\nSub Sample_HeaderFooter06()\r\n    \r\n    Dim w As Worksheet\r\n    Dim pict As String\r\n    \r\n    Set w = ActiveSheet\r\n    pict = CreateObject(\"WScript.Shell\").SpecialFolders(\"MyDocuments\") & \"\/sample01.jpg\"\r\n        \r\n    '\u30d7\u30ea\u30f3\u30bf\u3068\u306e\u901a\u4fe1\u3092\u906e\u65ad\uff08\u5370\u5237\u8a2d\u5b9a\u3092\u9ad8\u901f\u5316\uff09\r\n    Application.PrintCommunication = False\r\n    \r\n    With w.PageSetup\r\n    \r\n        '\u5148\u982d\u30da\u30fc\u30b8\u306e\u307f\u4ed6\u30da\u30fc\u30b8\u3068\u7570\u306a\u308b\u30d8\u30c3\u30c0\u30fc\u304a\u3088\u3073\u30d5\u30c3\u30bf\u30fc\u3092\u8a2d\u5b9a\u3059\u308b\r\n        .DifferentFirstPageHeaderFooter = True\r\n        \r\n        \r\n        '\u3010\u5148\u982d\u30da\u30fc\u30b8\u306e\u30d8\u30c3\u30c0\u30fc\u30fb\u30d5\u30c3\u30bf\u30fc\u306e\u8a2d\u5b9a\u3011\r\n        \r\n        '\u30d8\u30c3\u30c0\u30fc\u4e2d\u592e\u306b\u3001\u6587\u5b57\u5217\u300c[\u30b7\u30fc\u30c8\u540d] \u5148\u982d\u306e\u30da\u30fc\u30b8\u300d\u6587\u5b57\u30b5\u30a4\u30ba 24\u3001\u8272 \u9752\u3001\u592a\u5b57\u3001\u4e8c\u91cd\u4e0b\u7dda\r\n        .FirstPage.CenterHeader.Text = \"&24&K0000FF&B&E&A \u5148\u982d\u306e\u30da\u30fc\u30b8\"\r\n        \r\n        '\u30d5\u30c3\u30bf\u30fc\u4e2d\u592e\u306b\u3001\u30da\u30fc\u30b8\u6570\u3068\u7dcf\u30da\u30fc\u30b8\u6570\u3092\u8868\u793a\r\n        .FirstPage.CenterFooter.Text = \"&P \/ &N \u30da\u30fc\u30b8\"\r\n                \r\n                \r\n        \r\n        '\u3010\u5148\u982d\u30da\u30fc\u30b8\u4ee5\u5916\u306e\u30d8\u30c3\u30c0\u30fc\u30fb\u30d5\u30c3\u30bf\u30fc\u306e\u8a2d\u5b9a\u3011\r\n        \r\n        '\u8868\u793a\u3059\u308b\u753b\u50cf\u306e\u30d1\u30b9\uff06\u540d\u524d\r\n        .CenterHeaderPicture.Filename = pict\r\n\r\n        '\u753b\u50cf\u306e\u6bd4\u7387\u3092\u7dad\u6301\r\n        '\u203b\u5143\u753b\u50cf\u3068\u306e\u6bd4\u7387\u304c\u7570\u306a\u308b\u5834\u5408\u306f Height \u306e\u5024\u304c\u57fa\u6e96\u3068\u306a\u308b\r\n        .CenterHeaderPicture.LockAspectRatio = msoTrue\r\n        \r\n        '\u5143\u753b\u50cf\u306e\u30b5\u30a4\u30ba 500\r\n        .CenterHeaderPicture.Width = 500\r\n        \r\n        '\u5143\u753b\u50cf\u306e\u30b5\u30a4\u30ba 300\r\n        .CenterHeaderPicture.Height = 150\r\n        \r\n        '\u753b\u50cf\u306e\u8272\uff08\u81ea\u52d5\uff09\r\n        .CenterHeaderPicture.ColorType = msoPictureAutomatic\r\n        \r\n        '\u753b\u50cf\u306e\u660e\u5ea6\uff08 50% \uff09\r\n        .CenterHeaderPicture.Brightness = 0.5\r\n        \r\n        '\u753b\u50cf\u306e\u30b3\u30f3\u30c8\u30e9\u30b9\u30c8\uff08 50% \uff09\r\n        .CenterHeaderPicture.Contrast = 0.5\r\n\r\n        '\u30c8\u30ea\u30df\u30f3\u30b0\u306e\u7bc4\u56f2\u3092\u8a2d\u5b9a\r\n        .CenterHeaderPicture.CropTop = 0\r\n        .CenterHeaderPicture.CropBottom = 250\r\n        .CenterHeaderPicture.CropLeft = 0\r\n        .CenterHeaderPicture.CropRight = 210\r\n        \r\n        '\u30d8\u30c3\u30c0\u30fc\u4e2d\u592e\u306b\u753b\u50cf\u3092\u8868\u793a\r\n        .CenterHeader = \"&G\"\r\n        \r\n        '\u30d5\u30c3\u30bf\u30fc\u4e2d\u592e\u306b\u3001\u30da\u30fc\u30b8\u6570\u3068\u7dcf\u30da\u30fc\u30b8\u6570\u3092\u8868\u793a\r\n        .CenterFooter = \"&P \/ &N \u30da\u30fc\u30b8\"\r\n    \r\n    End With\r\n\r\n    '\u30d7\u30ea\u30f3\u30bf\u3068\u306e\u901a\u4fe1\u3092\u518d\u958b\r\n    Application.PrintCommunication = True\r\n    \r\n    '\u30d7\u30ec\u30d3\u30e5\u30fc\u8868\u793a\r\n    w.PrintPreview\r\n    \r\nEnd Sub\r\n\u3000\r\n  <\/pre>\n<br \/>\n<h3>\u5b9f\u884c\u7d50\u679c<\/h3>\n<p><a href=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/10\/headerfooter06_01.jpg?ssl=1\" rel=\"lightbox[4027]\"><img loading=\"lazy\" src=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/10\/headerfooter06_01.jpg?resize=580%2C815&#038;ssl=1\" alt=\"\u5148\u982d\u30da\u30fc\u30b8\u3060\u3051\u5225\u306e\u30d8\u30c3\u30c0\u30fc\u30fb\u30d5\u30c3\u30bf\u30fc\u3092\u8a2d\u5b9a\u3059\u308b\u4f8b\" width=\"580\" height=\"815\" class=\"alignnone size-large wp-image-4032\" srcset=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/10\/headerfooter06_01.jpg?resize=580%2C815&amp;ssl=1 580w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/10\/headerfooter06_01.jpg?resize=285%2C400&amp;ssl=1 285w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/10\/headerfooter06_01.jpg?w=840&amp;ssl=1 840w\" sizes=\"(max-width: 580px) 100vw, 580px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<\/div>\n<br \/>\n","protected":false},"excerpt":{"rendered":"<p>\u5148\u982d\u30da\u30fc\u30b8\u306b\u5225\u306e\u30d8\u30c3\u30c0\u30fc\u304a\u3088\u3073\u30d5\u30c3\u30bf\u30fc\u3092\u8a2d\u5b9a \u5148\u982d\u30da\u30fc\u30b8\u306e\u30d8\u30c3\u30c0\u30fc\u304a\u3088\u3073\u30d5\u30c3\u30bf\u30fc &#8230; <\/p>\n","protected":false},"author":1,"featured_media":4103,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"amp_status":"","spay_email":"","jetpack_publicize_message":""},"categories":[357],"tags":[617,618,567,63,311,38,360,566],"jetpack_featured_media_url":"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/10\/headerfooter06_01-580x8151.jpg?fit=580%2C815&ssl=1","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4Ye9i-12X","_links":{"self":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/4027"}],"collection":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/comments?post=4027"}],"version-history":[{"count":14,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/4027\/revisions"}],"predecessor-version":[{"id":4102,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/4027\/revisions\/4102"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media\/4103"}],"wp:attachment":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media?parent=4027"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/categories?post=4027"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/tags?post=4027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}