{"id":2243,"date":"2012-09-06T15:20:53","date_gmt":"2012-09-06T06:20:53","guid":{"rendered":"http:\/\/www.ka-net.org\/blog\/?p=2243"},"modified":"2013-08-19T17:26:56","modified_gmt":"2013-08-19T08:26:56","slug":"word%e3%83%9e%e3%82%af%e3%83%ad%e3%81%a7%e6%96%87%e5%ad%97%e6%95%b0%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95%e3%82%92%e3%81%be%e3%81%a8%e3%82%81%e3%81%a6%e3%81%bf%e3%81%be","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=2243","title":{"rendered":"Word\u30de\u30af\u30ed\u3067\u6587\u5b57\u6570\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u3092\u307e\u3068\u3081\u3066\u307f\u307e\u3057\u305f\u3002"},"content":{"rendered":"<p>\u300c<a href=\"\/\/www.ka-net.org\/blog\/?p=2221\" title=\"\u86cd\u5149\u30da\u30f3\u3067\u30de\u30fc\u30af\u3057\u305f\u90e8\u5206\u306e\u6587\u5b57\u6570\u3092\u30ab\u30a6\u30f3\u30c8\u3059\u308bWord\u30de\u30af\u30ed\" target=\"_blank\">\u86cd\u5149\u30da\u30f3\u3067\u30de\u30fc\u30af\u3057\u305f\u90e8\u5206\u306e\u6587\u5b57\u6570\u3092\u30ab\u30a6\u30f3\u30c8\u3059\u308bWord\u30de\u30af\u30ed<\/a>\u300d\u3067\u86cd\u5149\u30da\u30f3\u3067\u30de\u30fc\u30af\u3057\u305f\u90e8\u5206\u306e\u6587\u5b57\u6570\u3092\u30ab\u30a6\u30f3\u30c8\u3059\u308b\u51e6\u7406\u3092\u66f8\u304d\u307e\u3057\u305f\u304c\u3001\u4eca\u56de\u306f\u3044\u304f\u3064\u304b\u3042\u308b\u6587\u5b57\u6570\u30ab\u30a6\u30f3\u30c8\u51e6\u7406\u65b9\u6cd5\u3092\u307e\u3068\u3081\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Public Sub WordCount()\r\n  'Document\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306eComputeStatistics\u30e1\u30bd\u30c3\u30c9\r\n  'http:\/\/msdn.microsoft.com\/en-us\/library\/office\/ff840638%28v=office.15%29.aspx\r\n  '\u203b \u7d71\u8a08\u60c5\u5831\u306b\u811a\u6ce8\u306e\u60c5\u5831\u3092\u542b\u3081\u308b\u5834\u5408\u306f\u5f15\u6570(IncludeFootnotesAndEndnotes)\u3092True\u306b\u3059\u308b\u3002\r\n  Debug.Print &quot;\u25a0 Document\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306eComputeStatistics\u30e1\u30bd\u30c3\u30c9\u4f7f\u7528&quot;\r\n  Debug.Print &quot;\u6587\u5b57\u6570:&quot; &amp; ActiveDocument.ComputeStatistics(Statistic:=wdStatisticCharacters, IncludeFootnotesAndEndnotes:=False)\r\n  Debug.Print &quot;\u30b9\u30da\u30fc\u30b9\u3092\u542b\u3081\u305f\u6587\u5b57\u6570:&quot; &amp; ActiveDocument.ComputeStatistics(Statistic:=wdStatisticCharactersWithSpaces, IncludeFootnotesAndEndnotes:=False)\r\n  Debug.Print &quot;-----&quot;\r\n  \r\n  'Document\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306eBuiltInDocumentProperties\u30d7\u30ed\u30d1\u30c6\u30a3\r\n  'http:\/\/msdn.microsoft.com\/en-us\/library\/office\/ff196862%28v=office.15%29.aspx\r\n  '\u203b \u5f15\u6570\u306e\u8a73\u7d30\u306f http:\/\/msdn.microsoft.com\/en-us\/library\/office\/ff195105%28v=office.15%29.aspx \u53c2\u7167\r\n  Debug.Print &quot;\u25a0 Document\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306eBuiltInDocumentProperties\u30d7\u30ed\u30d1\u30c6\u30a3\u4f7f\u7528&quot;\r\n  Debug.Print &quot;\u6587\u5b57\u6570:&quot; &amp; ActiveDocument.BuiltInDocumentProperties(wdPropertyCharacters)\r\n  Debug.Print &quot;\u30b9\u30da\u30fc\u30b9\u3092\u542b\u3081\u305f\u6587\u5b57\u6570:&quot; &amp; ActiveDocument.BuiltInDocumentProperties(wdPropertyCharsWSpaces)\r\n  Debug.Print &quot;-----&quot;\r\n  \r\n  'Dialog\u30aa\u30d6\u30b8\u30a7\u30af\u30c8(wdDialogToolsWordCount)\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\r\n  '\u203b \u5404\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u8a73\u7d30\u306f http:\/\/msdn.microsoft.com\/en-us\/library\/office\/ff836540%28v=office.15%29 \u53c2\u7167\r\n  Selection.Collapse '\u203b \u6587\u5b57\u5217\u304c\u9078\u629e\u3055\u308c\u3066\u3044\u308b\u3068\u9078\u629e\u90e8\u5206\u306e\u307f\u306e\u30ab\u30a6\u30f3\u30c8\u306b\u306a\u308b\u305f\u3081\u9078\u629e\u89e3\u9664\r\n  Debug.Print &quot;\u25a0 Dialog\u30aa\u30d6\u30b8\u30a7\u30af\u30c8(wdDialogToolsWordCount)\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u4f7f\u7528&quot;\r\n  Debug.Print &quot;\u6587\u5b57\u6570:&quot; &amp; Application.Dialogs(wdDialogToolsWordCount).Characters\r\n  Debug.Print &quot;\u30b9\u30da\u30fc\u30b9\u3092\u542b\u3081\u305f\u6587\u5b57\u6570:&quot; &amp; Application.Dialogs(wdDialogToolsWordCount).CharactersIncludingSpaces\r\n  Debug.Print &quot;-----&quot;\r\n  \r\n  'Dialog\u30aa\u30d6\u30b8\u30a7\u30af\u30c8(wdDialogDocumentStatistics)\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\r\n  '\u203b \u5404\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u8a73\u7d30\u306f http:\/\/msdn.microsoft.com\/en-us\/library\/office\/ff836540%28v=office.15%29 \u53c2\u7167\r\n  Debug.Print &quot;\u25a0 Dialog\u30aa\u30d6\u30b8\u30a7\u30af\u30c8(wdDialogDocumentStatistics)\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u4f7f\u7528&quot;\r\n  Debug.Print &quot;\u6587\u5b57\u6570:&quot; &amp; Application.Dialogs(wdDialogDocumentStatistics).Characters\r\n  Debug.Print &quot;-----&quot;\r\n  \r\n  '\u7279\u5b9a\u306e\u7bc4\u56f2\u306e\u6587\u5b57\u30ab\u30a6\u30f3\u30c8\r\n  'http:\/\/msdn.microsoft.com\/en-us\/library\/office\/ff196924%28v=office.15%29\r\n  Debug.Print &quot;\u25a0 \u7279\u5b9a\u306e\u7bc4\u56f2\u306e\u6587\u5b57\u30ab\u30a6\u30f3\u30c8(Range\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306eComputeStatistics\u30e1\u30bd\u30c3\u30c9\u4f7f\u7528)&quot;\r\n  Debug.Print &quot;\u6587\u5b57\u6570:&quot; &amp; ActiveDocument.Paragraphs(1).Range.ComputeStatistics(Statistic:=wdStatisticCharacters)\r\n  Debug.Print &quot;\u30b9\u30da\u30fc\u30b9\u3092\u542b\u3081\u305f\u6587\u5b57\u6570:&quot; &amp; ActiveDocument.Paragraphs(1).Range.ComputeStatistics(Statistic:=wdStatisticCharactersWithSpaces)\r\n  Debug.Print &quot;-----&quot;\r\n  \r\n  'Shell\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u5229\u7528\u3057\u3066Word\u306e\u5916\u304b\u3089\u5358\u8a9e\u6570\u53d6\u5f97\r\n  'http:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/bb787870%28v=vs.85%29.aspx\r\n  '\u203b \u4ed6\u306e\u65b9\u6cd5\u306b\u6bd4\u3079\u3066\u4e0d\u6b63\u78ba\r\n  Debug.Print &quot;\u25a0 Shell\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u5229\u7528\u3057\u3066Word\u306e\u5916\u304b\u3089\u5358\u8a9e\u6570\u53d6\u5f97(Folder\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306eGetDetailsOf\u30e1\u30bd\u30c3\u30c9\u4f7f\u7528)&quot;\r\n  With CreateObject(&quot;Shell.Application&quot;).NameSpace(ThisDocument.Path)\r\n    Debug.Print &quot;\u5358\u8a9e\u6570:&quot; &amp; .GetDetailsOf(.ParseName(ThisDocument.Name), 151)\r\n  End With\r\n  Debug.Print &quot;-----&quot;\r\nEnd Sub<\/pre>\n<p>ComputeStatistics\u30e1\u30bd\u30c3\u30c9\u3084BuiltInDocumentProperties\u30d7\u30ed\u30d1\u30c6\u30a3\u304b\u3089\u6587\u5b57\u6570\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u304c\u3042\u308b\u306e\u3067\u3001\u30b1\u30fc\u30b9\u30d0\u30a4\u30b1\u30fc\u30b9\u3067\u4f7f\u3044\u5206\u3051\u308b\u306e\u304c\u826f\u3044\u3067\u3057\u3087\u3046\u3002<br \/>\n\u4e0a\u8a18\u30b3\u30fc\u30c9\u3067\u306f\u30aa\u30de\u30b1\u3068\u3057\u3066\u3001Shell\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u5229\u7528\u3057\u3066Word\u306e\u5916\u304b\u3089\u5358\u8a9e\u6570\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u3082\u66f8\u304d\u307e\u3057\u305f\u304c\u3001\u4ed6\u306e\u65b9\u6cd5\u306b\u6bd4\u3079\u308b\u3068\u6b63\u78ba\u6027\u306b\u6b20\u3051\u308b\u305f\u3081\u3001\u4f7f\u7528\u3059\u308b\u6a5f\u4f1a\u306f\u7121\u3044\u3060\u308d\u3046\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u300c\u86cd\u5149\u30da\u30f3\u3067\u30de\u30fc\u30af\u3057\u305f\u90e8\u5206\u306e\u6587\u5b57\u6570\u3092\u30ab\u30a6\u30f3\u30c8\u3059\u308bWord\u30de\u30af\u30ed\u300d\u3067\u86cd\u5149\u30da\u30f3\u3067\u30de\u30fc\u30af\u3057\u305f\u90e8\u5206\u306e\u6587\u5b57\u6570\u3092\u30ab\u30a6\u30f3\u30c8\u3059\u308b\u51e6\u7406\u3092\u66f8\u304d\u307e\u3057\u305f\u304c\u3001\u4eca\u56de\u306f\u3044\u304f\u3064\u304b\u3042\u308b\u6587\u5b57\u6570\u30ab\u30a6\u30f3\u30c8\u51e6\u7406\u65b9\u6cd5\u3092\u307e\u3068\u3081\u3066\u307f\u307e\u3057\u305f\u3002 Public Sub Wo [&hellip;]","protected":false},"author":1,"featured_media":7134,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,49],"tags":[45,85],"class_list":["post-2243","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office","category-word-office","tag-word-","tag-word-vba-2"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Word.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-Ab","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2243","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=2243"}],"version-history":[{"count":2,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2243\/revisions"}],"predecessor-version":[{"id":2245,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2243\/revisions\/2245"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7134"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}