{"id":7211,"date":"2016-08-18T16:43:33","date_gmt":"2016-08-18T07:43:33","guid":{"rendered":"https:\/\/www.ka-net.org\/blog\/?p=7211"},"modified":"2016-08-18T16:43:33","modified_gmt":"2016-08-18T07:43:33","slug":"powershell%e3%81%8b%e3%82%89netoffice%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6word%e3%82%84powerpoint%e3%82%92%e6%93%8d%e4%bd%9c%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=7211","title":{"rendered":"PowerShell\u304b\u3089NetOffice\u3092\u4f7f\u3063\u3066Word\u3084PowerPoint\u3092\u64cd\u4f5c\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p><a href=\"https:\/\/www.ka-net.org\/blog\/?p=7207\" title=\"PowerShell\u304b\u3089NetOffice\u3092\u4f7f\u3063\u3066Excel\u3092\u64cd\u4f5c\u3059\u308b\u65b9\u6cd5 | \u521d\u5fc3\u8005\u5099\u5fd8\u9332\" target=\"_blank\">\u524d\u56de\u306e\u8a18\u4e8b<\/a>\u95a2\u9023\u3067\u3001<\/p>\n<blockquote class=\"twitter-tweet\" data-cards=\"hidden\" data-lang=\"ja\">\n<p lang=\"ja\" dir=\"ltr\">Word\u3084PowerPoint\u3082\u30c9\u30f3\u3068\u3053\u3044\u3067\u3059\u3002 [PowerShell\u304b\u3089NetOffice\u3092\u4f7f\u3063\u3066Excel\u3092\u64cd\u4f5c\u3059\u308b\u65b9\u6cd5] <a href=\"https:\/\/t.co\/kAm2EcZukH\">https:\/\/t.co\/kAm2EcZukH<\/a> <a href=\"https:\/\/t.co\/e943LhO5Vh\">pic.twitter.com\/e943LhO5Vh<\/a><\/p>\n<p>&mdash; \u304d\u306c\u3042\u3055 (@kinuasa) <a href=\"https:\/\/twitter.com\/kinuasa\/status\/766087069999300608\">2016\u5e748\u670818\u65e5<\/a><\/p><\/blockquote>\n<p><script async src=\"\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<p>\u306a\u3093\u3066\u3053\u3068\u3092\u30c4\u30a4\u30fc\u30c8\u3057\u305f\u306e\u3067\u3001NetOffice\u3067Word\u3084PowerPoint\u3092\u64cd\u4f5c\u3059\u308b\u30b3\u30fc\u30c9\u3082\u8f09\u305b\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<h4 class=\"style4a\">NetOffice\u3067Word\u3092\u64cd\u4f5c\u3059\u308b\u30b3\u30fc\u30c9<\/h4>\n<p>Word\u3067\u65b0\u898f\u6587\u66f8\u3092\u4f5c\u6210\u3057\u3066\u3001\u6587\u982d\u306b\u65e5\u4ed8\u3068\u6642\u523b\u3092\u633f\u5165\u3059\u308b\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<p><span style=\"color: #ff0000; font-weight: bold;\">\u203b \u8981<a href=\"https:\/\/www.nuget.org\/packages\/NetOffice.Word\/\" title=\"NuGet Gallery | NetOffice.Word 1.7.3\" target=\"_blank\">NetOffice.Word<\/a><\/span><\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">&#x5B;void]&#x5B;Reflection.Assembly]::LoadFile(&quot;C:\\System\\NetOffice\\NetOffice.dll&quot;)\r\n&#x5B;void]&#x5B;Reflection.Assembly]::LoadFile(&quot;C:\\System\\NetOffice\\OfficeApi.dll&quot;)\r\n&#x5B;void]&#x5B;Reflection.Assembly]::LoadFile(&quot;C:\\System\\NetOffice\\WordApi.dll&quot;)\r\n&#x5B;void]&#x5B;Reflection.Assembly]::LoadFile(&quot;C:\\System\\NetOffice\\VBIDEApi.dll&quot;)\r\n$app = New-Object NetOffice.WordApi.Application\r\n$app.Visible = $true\r\n$doc = $app.Documents.Add()\r\n$rng = $doc.Range(0,0)\r\n$rng.InsertAfter((Get-Date).ToString(&quot;yyyy\/MM\/dd HH:mm:ss&quot;))\r\n$rng.Bold = $true\r\n$rng.Font.ColorIndex = 5\r\n$doc.SaveAs(&quot;C:\\Test\\Sample.docx&quot;)\r\n$doc.Close()\r\n$app.Quit()\r\n$app.Dispose()<\/pre>\n<h4 class=\"style4a\">NetOffice\u3067PowerPoint\u3092\u64cd\u4f5c\u3059\u308b\u30b3\u30fc\u30c9<\/h4>\n<p>PowerPoint\u3067\u65b0\u898f\u30d7\u30ec\u30bc\u30f3\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3057\u3066\u3001\u30b9\u30e9\u30a4\u30c9\u3092\u8ffd\u52a0\u3001\u8ffd\u52a0\u3057\u305f\u30b9\u30e9\u30a4\u30c9\u306b\u30c6\u30ad\u30b9\u30c8\u30dc\u30c3\u30af\u30b9\u3092\u633f\u5165\u3059\u308b\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<p><span style=\"color: #ff0000; font-weight: bold;\">\u203b \u8981<a href=\"https:\/\/www.nuget.org\/packages\/NetOffice.PowerPoint\/\" title=\"NuGet Gallery | NetOffice.PowerPoint 1.7.3\" target=\"_blank\">NetOffice.PowerPoint<\/a><\/span><\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">&#x5B;void]&#x5B;Reflection.Assembly]::LoadFile(&quot;C:\\System\\NetOffice\\NetOffice.dll&quot;)\r\n&#x5B;void]&#x5B;Reflection.Assembly]::LoadFile(&quot;C:\\System\\NetOffice\\OfficeApi.dll&quot;)\r\n&#x5B;void]&#x5B;Reflection.Assembly]::LoadFile(&quot;C:\\System\\NetOffice\\PowerPointApi.dll&quot;)\r\n$app = New-Object NetOffice.PowerPointApi.Application\r\n$app.Visible = &#x5B;NetOffice.OfficeApi.Enums.MsoTriState]::msoTrue\r\n$pres = $app.Presentations.Add()\r\n$sld = $pres.Slides.Add(1, &#x5B;NetOffice.PowerPointApi.Enums.PpSlideLayout]::ppLayoutBlank)\r\n$tbox = $sld.Shapes.AddTextbox(&#x5B;NetOffice.OfficeApi.Enums.MsoTextOrientation]::msoTextOrientationHorizontal, 100, 100, 300, 200)\r\n$tbox.TextFrame2.TextRange.Text = (Get-Date).ToString(&quot;yyyy\/MM\/dd HH:mm:ss&quot;)\r\n$tbox.TextFrame2.TextRange.Font.Size = 24\r\n$pres.SaveAs(&quot;C:\\Test\\Sample.pptx&quot;)\r\n$app.Quit()\r\n$app.Dispose()<\/pre>\n","protected":false},"excerpt":{"rendered":"\u524d\u56de\u306e\u8a18\u4e8b\u95a2\u9023\u3067\u3001 Word\u3084PowerPoint\u3082\u30c9\u30f3\u3068\u3053\u3044\u3067\u3059\u3002 [PowerShell\u304b\u3089NetOffice\u3092\u4f7f\u3063\u3066Excel\u3092\u64cd\u4f5c\u3059\u308b\u65b9\u6cd5] https:\/\/t.co\/kAm2EcZukH pic.twitter [&hellip;]","protected":false},"author":1,"featured_media":7117,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"[PowerShell\u304b\u3089NetOffice\u3092\u4f7f\u3063\u3066Word\u3084PowerPoint\u3092\u64cd\u4f5c\u3059\u308b\u65b9\u6cd5]","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,49,58,94],"tags":[],"class_list":["post-7211","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office","category-word-office","category-powerpoint","category-powershell"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Office.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-1Sj","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/7211","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7211"}],"version-history":[{"count":1,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/7211\/revisions"}],"predecessor-version":[{"id":7212,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/7211\/revisions\/7212"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7117"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}